Fix bug with using muser attribute when absent

This commit is contained in:
Mark Veidemanis 2020-11-01 19:03:56 +00:00
parent c10274ccd6
commit cb21ad8fca
2 changed files with 4 additions and 2 deletions

View File

@ -221,6 +221,7 @@ class IRCBot(IRCClient):
# expand out the hostmask # expand out the hostmask
if not {"nick", "ident", "host"}.issubset(set(cast.keys())): if not {"nick", "ident", "host"}.issubset(set(cast.keys())):
if "muser" in cast.keys():
cast["nick"], cast["ident"], cast["host"] = parsen(cast["muser"]) cast["nick"], cast["ident"], cast["host"] = parsen(cast["muser"])
# handle ZNC stuff # handle ZNC stuff

View File

@ -18,6 +18,7 @@ def parsemeta(numName, c):
# need to check if this was received from a relay # need to check if this was received from a relay
# in which case, do not do this # in which case, do not do this
if c["type"] in ["msg", "notice", "action", "topic", "mode"]: if c["type"] in ["msg", "notice", "action", "topic", "mode"]:
if "muser" in c.keys():
userinfo.editUser(c["net"], c["muser"]) userinfo.editUser(c["net"], c["muser"])
#if c["type"] == "mode": #if c["type"] == "mode":
# userinfo.updateMode(c) # userinfo.updateMode(c)