return lines
def parse(self, line):
- bot = lib.parent.randbot()
+ try:
+ bot = lib.parent.channel(self.chan).bot
+ except AttributeError: # <class '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)