From bd30e67a66b56d952de17b0005c654c971deae2a Mon Sep 17 00:00:00 2001 From: HarHar Date: Thu, 24 Jan 2013 20:49:52 -0200 Subject: [PATCH] [irc] fix IndexError exception --- syncplay/ircBot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/syncplay/ircBot.py b/syncplay/ircBot.py index accc321..00f02da 100644 --- a/syncplay/ircBot.py +++ b/syncplay/ircBot.py @@ -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---