src/irc: restructure, modularize things