better code for irc bot