Add the network number in ZNC relay notifications

This commit is contained in:
2019-08-06 12:49:29 +01:00
parent c0b45c1db6
commit 56840e0060
2 changed files with 19 additions and 19 deletions

View File

@@ -50,7 +50,7 @@ def magicFunction(A, B):
else:
return all(A[k] in B[k] for k in set(A) & set(B)) and set(B) <= set(A)
def event(name, cast, event=None):
def event(name, numberedName, cast, event=None):
if "target" in cast.keys():
target = cast["target"]
else:
@@ -58,7 +58,7 @@ def event(name, cast, event=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(name, {"type": "znc", "message": cast["message"]})
sendRelayNotification(numberedName, {"type": "znc", "message": cast["message"]})
return
sendRelayNotification(name, cast)