Move code into irc base.