Refactored irc handling a bit