Fix various bugs in the event system
Squash many bugs in the event notification system and simplify the code.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
from copy import deepcopy
|
||||
from json import dumps
|
||||
from datetime import datetime
|
||||
|
||||
import main
|
||||
from core.relay import sendRelayNotification
|
||||
@@ -9,8 +8,8 @@ from modules import regproc
|
||||
from utils.dedup import dedup
|
||||
|
||||
order = ["type", "net", "num", "channel", "msg", "nick",
|
||||
"ident", "host", "mtype", "user", "modes", "modeargs"
|
||||
"realname", "server", "status"]
|
||||
"ident", "host", "mtype", "user", "mode", "modearg",
|
||||
"realname", "server", "status", "time"]
|
||||
|
||||
def testNetTarget(name, target):
|
||||
called = False
|
||||
@@ -88,6 +87,7 @@ def event(numName, c): # yes I'm using a short variable because otherwise it goe
|
||||
|
||||
if "muser" in c.keys():
|
||||
del c["muser"]
|
||||
|
||||
sendRelayNotification({k: c[k] for k in order if k in c}) # Sort dict keys according to order
|
||||
|
||||
# only monitors below
|
||||
|
||||
Reference in New Issue
Block a user