mirror of
https://github.com/ShadowKatStudios/OC-Minitel.git
synced 2024-11-22 18:18:05 +11:00
Merge pull request #36 from Hawk777/fix-listeners-deregistering
Do not unregister listeners on unexpected data
This commit is contained in:
commit
f8903ad587
@ -69,15 +69,15 @@ local function wentry(_,msg,level,service,host)
|
||||
end
|
||||
|
||||
local function remote_listener(_,from,port,data)
|
||||
if port ~= cfg.port then return false end
|
||||
if port ~= cfg.port then return end
|
||||
local service, level, msg = data:match("(.-)\t(%d)\t(.+)")
|
||||
if not service or not level or not msg then return false end
|
||||
if not service or not level or not msg then return end
|
||||
msg, level, service = tostring(msg),tonumber(level),tostring(service)
|
||||
wentry(nil,msg,level,service,from)
|
||||
end
|
||||
|
||||
local function local_listener(_,msg,level,service)
|
||||
if not service or not level or not msg then return false end
|
||||
if not service or not level or not msg then return end
|
||||
msg, level, service = tostring(msg),tonumber(level),tostring(service)
|
||||
wentry(nil,msg,level,service,hostname)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user