Don't crash if the part message is null

This commit is contained in:
Mark Veidemanis 2019-08-15 22:14:45 +01:00
parent f34ddab6fc
commit 22bd0d3ac6
1 changed files with 9 additions and 8 deletions

View File

@ -177,6 +177,7 @@ class IRCBot(IRCClient):
if not cast["target"].lower() == self.nickname.lower(): # modes has been set on us directly
self.event(**castDup) # don't tell anyone else
if "message" in cast.keys() and not cast["type"] == "query": # Don't highlight queries
if not cast["message"] == None:
if self.nickname.lower() in cast["message"].lower():
castDup = deepcopy(cast)
castDup["mtype"] = cast["type"]
@ -380,8 +381,8 @@ class IRCBot(IRCClient):
if not channel in self.channels:
self.channels.append(channel)
self.names(channel).addCallback(self.got_names)
self.who(channel).addCallback(self.got_who)
if main.config["Toggles"]["Who"]:
self.who(channel).addCallback(self.got_who)
lc = LoopingCall(self.who, channel)
self._getWho[channel] = lc
intrange = main.config["Tweaks"]["Delays"]["WhoRange"]