Hide implementation of irc and event modules

* Use hash table in the irc handler to register handlers for IRC server
  messages.