irc: Move irc-bot code to make use of generic methods