IRC bot in Python using sockets