mirror of
https://github.com/ShadowKatStudios/OC-Minitel.git
synced 2024-11-23 02:28: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
|
end
|
||||||
|
|
||||||
local function remote_listener(_,from,port,data)
|
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(.+)")
|
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)
|
msg, level, service = tostring(msg),tonumber(level),tostring(service)
|
||||||
wentry(nil,msg,level,service,from)
|
wentry(nil,msg,level,service,from)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function local_listener(_,msg,level,service)
|
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)
|
msg, level, service = tostring(msg),tonumber(level),tostring(service)
|
||||||
wentry(nil,msg,level,service,hostname)
|
wentry(nil,msg,level,service,hostname)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user