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
if "muser" in cast.keys():
if cast["muser"] == self.servername:
return
cast["type"] = "conn"
if "channel" in cast.keys():
if cast["channel"] == "*":
return
cast["type"] = "conn"
##
# expand out the hostmask
@ -254,7 +254,7 @@ class IRCBot(IRCClient):
# 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 not cast["type"] in {"query", "self", "highlight", "znc", "who"}:
if not cast["type"] in {"query", "self", "highlight", "znc", "who", "conn"}:
cast["num"] = self.num
if "channel" in cast.keys():
if cast["type"] == "mode":
@ -279,7 +279,7 @@ class IRCBot(IRCClient):
# TODO: better way to do this
# 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
if "user" in cast.keys():
if cast["user"].lower() == self.nickname.lower():

View File

@ -6,8 +6,6 @@ import main
from utils.logging.debug import debug
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)
if "time" in c.keys():
del c["time"]