Refactor irc_get_*()