Fixed an infinite loop bug in irc.py