Don't discard server messages

This commit is contained in:
Mark Veidemanis 2020-11-02 20:13:36 +00:00
parent 45fa21fea3
commit 14daa9dfef
2 changed files with 4 additions and 6 deletions

View File

@ -220,10 +220,10 @@ class IRCBot(IRCClient):
# remove server stuff # remove server stuff
if "muser" in cast.keys(): if "muser" in cast.keys():
if cast["muser"] == self.servername: if cast["muser"] == self.servername:
return cast["type"] = "conn"
if "channel" in cast.keys(): if "channel" in cast.keys():
if cast["channel"] == "*": if cast["channel"] == "*":
return cast["type"] = "conn"
## ##
# expand out the hostmask # expand out the hostmask
@ -254,7 +254,7 @@ class IRCBot(IRCClient):
# don't reprocess the same message twice # don't reprocess the same message twice
# if the type is in that list, it's already been here, don't run it again # if the type is in that list, it's already been here, don't run it again
if not cast["type"] in {"query", "self", "highlight", "znc", "who"}: if not cast["type"] in {"query", "self", "highlight", "znc", "who", "conn"}:
cast["num"] = self.num cast["num"] = self.num
if "channel" in cast.keys(): if "channel" in cast.keys():
if cast["type"] == "mode": if cast["type"] == "mode":
@ -279,7 +279,7 @@ class IRCBot(IRCClient):
# TODO: better way to do this # TODO: better way to do this
# as we changed the types above, check again # as we changed the types above, check again
if not cast["type"] in {"query", "self", "highlight", "znc", "who"}: if not cast["type"] in {"query", "self", "highlight", "znc", "who", "conn"}:
# we have been kicked # we have been kicked
if "user" in cast.keys(): if "user" in cast.keys():
if cast["user"].lower() == self.nickname.lower(): if cast["user"].lower() == self.nickname.lower():

View File

@ -6,8 +6,6 @@ import main
from utils.logging.debug import debug from utils.logging.debug import debug
def dedup(numName, b): def dedup(numName, b):
if b["type"] in ["quit", "nick"]:
return False # QUITs and NICKs can't be duplicated, they are global and duplications are likely
c = deepcopy(b) c = deepcopy(b)
if "time" in c.keys(): if "time" in c.keys():
del c["time"] del c["time"]