added a beeplevel option, any events equal to or above that level will make the server beep.

This commit is contained in:
Izaya 2018-07-28 05:34:31 +10:00
parent 80a059342e
commit b212d13010
1 changed files with 4 additions and 0 deletions

View File

@ -12,6 +12,7 @@ cfg.receive = false
cfg.write = true
cfg.destination = "/dev/null"
cfg.minlevel = 6
cfg.beeplevel = 3
cfg.filter = {} -- todo
local listeners = {}
@ -58,6 +59,9 @@ local function wentry(_,msg,level,service,host)
if drelay then
net.usend(cfg.relayhost, cfg.port, entry)
end
if level <= cfg.beeplevel then
computer.beep()
end
end
local function remote_listener(_,from,port,data)