X-Git-Url: https://jfr.im/git/erebus.git/blobdiff_plain/444eb517c1cdd4e2638c62048c94cbac6d16d96b..63f741c2dfb3021753ac398f72abbd326dd92e70:/bot.py diff --git a/bot.py b/bot.py index ec471e3..44181f4 100644 --- a/bot.py +++ b/bot.py @@ -89,7 +89,8 @@ class Bot(object): chanword = pieces[1] if chanword[0] == '#': chan = self.parent.channel(chanword) - pieces.pop(1) + if chan is not None: #if chan is still none, there's no bot on "chanword", and chanword is used as a parameter. + pieces.pop(1) else: # message was sent to a channel chan = self.parent.channel(target) #TODO check if bot's on channel --- in Erebus.channel() maybe?