[irc] fix IndexError exception

This commit is contained in:
HarHar 2013-01-24 20:49:52 -02:00
parent b81f24ae17
commit bd30e67a66

View File

@ -175,8 +175,9 @@ def handlingThread(sock, bot):
lsplit = line.split(':')
if len(lsplit) >= 2:
if lsplit[1].split(' ')[1] == '404':
bot.join(bot.channel, bot.channelPassword)
if lsplit[1].split(' ') > 1:
if lsplit[1].split(' ')[1] == '404':
bot.join(bot.channel, bot.channelPassword)
if 'PRIVMSG' in lsplit[1] or 'NOTICE' in lsplit[1]:
# ---BEGIN WTF BLOCK---