X-Git-Url: https://jfr.im/git/erebus.git/blobdiff_plain/fd8ff6299b9ba4d451552753589da54eeffa11c5..33af27c632e4227f266466ffd26260986cfcc5f7:/modules/sockets.py diff --git a/modules/sockets.py b/modules/sockets.py index 060057b..cf79e70 100644 --- a/modules/sockets.py +++ b/modules/sockets.py @@ -57,7 +57,10 @@ def gotParent(parent): return lines def parse(self, line): - bot = lib.parent.randbot() + try: + bot = lib.parent.channel(self.chan).bot + except AttributeError: # 'NoneType' object has no attribute 'bot' + bot = lib.parent.randbot() maxlen = bot.maxmsglen() - len("PRIVMSG :") - len(self.chan) while len(line) > maxlen: cutat = line.rfind(' ', 0, maxlen)