Show the message on one line in monitor notifications

This commit is contained in:
Mark Veidemanis 2018-07-28 22:32:24 +01:00
parent 9e3ae677e1
commit ae017eab36
1 changed files with 3 additions and 4 deletions

View File

@ -1,6 +1,5 @@
import main
import modules.keyword as keyword
from pprint import pformat
from copy import deepcopy
def testNetTarget(name, target):
@ -31,13 +30,13 @@ def event(name, target, cast):
if "send" in main.monitor[monitorGroup].keys():
for i in main.monitor[monitorGroup]["send"].keys():
if isinstance(main.monitor[monitorGroup]["send"][i], bool):
keyword.sendMaster("ERRDELIV MONITOR [%s] (%s/%s) %s " % (monitorGroup, name, target, pformat(cast)))
keyword.sendMaster("ERRDELIV MONITOR [%s] (%s/%s) %s " % (monitorGroup, name, target, cast))
continue
if not i in main.pool.keys():
keyword.sendMaster("ERROR on monitor %s: No such name: %s" % (monitorGroup, i))
if not i in main.IRCPool.keys():
keyword.sendMaster("ERROR on monitor %s: No such instance: %s" % (monitorGroup, i))
for x in main.monitor[monitorGroup]["send"][i]:
main.IRCPool[i].msg(x, "MONITOR [%s] (%s/%s) %s" % (monitorGroup, name, target, pformat(cast)))
main.IRCPool[i].msg(x, "MONITOR [%s] (%s/%s) %s" % (monitorGroup, name, target, cast))
else:
keyword.sendMaster("MONITOR [%s] (%s/%s) %s " % (monitorGroup, name, target, pformat(cast)))
keyword.sendMaster("MONITOR [%s] (%s/%s) %s " % (monitorGroup, name, target, cast))