Implement a single function for all callbacks from IRC hooks and send a seperate notification if an action takes place that concerns a bot

This commit is contained in:
2019-08-11 20:52:10 +01:00
parent 56840e0060
commit 2757256d4f
10 changed files with 106 additions and 113 deletions

View File

@@ -55,11 +55,6 @@ def event(name, numberedName, cast, event=None):
target = cast["target"]
else:
target = None
if set(["nick", "ident", "host", "message"]).issubset(set(cast)):
if main.config["Compat"]["ZNC"] and "message" in cast.keys():
if cast["nick"][0] == main.config["Tweaks"]["ZNC"]["Prefix"] and cast["ident"] == "znc" and cast["host"] == "znc.in":
sendRelayNotification(numberedName, {"type": "znc", "message": cast["message"]})
return
sendRelayNotification(name, cast)
monitorGroups = testNetTarget(name, target)