LoLei / ircbot

~Small~ bloated IRC bot 🤖

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Message split error

LoLei opened this issue · comments

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/home/pi/git/ircbot/ircbot.py", line 247, in receive_and_parse_msg_loop
    self.receive_and_parse_msg()
  File "/home/pi/git/ircbot/ircbot.py", line 252, in receive_and_parse_msg
    self.receive_and_parse_irc_msg(ircmsg)
  File "/home/pi/git/ircbot/ircbot.py", line 263, in receive_and_parse_irc_msg
    message = ircmsg.split('PRIVMSG', 1)[1].split(':', 1)[1]
IndexError: list index out of range

Possibly occurs due to rare split-up message between socket recvs.