1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-11-23 10:38:05 +11:00

added an option to display log messages over a certain priority

This commit is contained in:
Izaya 2018-07-28 17:22:22 +10:00
parent ff4ab9c0b9
commit 43c6f5279d

View File

@ -12,7 +12,8 @@ cfg.receive = false
cfg.write = true
cfg.destination = "/dev/null"
cfg.minlevel = 6
cfg.beeplevel = 3
cfg.beeplevel = -1
cfg.displevel = 2
cfg.filter = {} -- todo
local listeners = {}
@ -62,6 +63,9 @@ local function wentry(_,msg,level,service,host)
if level <= cfg.beeplevel then
computer.beep()
end
if level <= cfg.displevel then
io.write(string.format("%.2f\t%s\t",ut,host)..entry)
end
end
local function remote_listener(_,from,port,data)