Added a loghandler to output errors to irc.

Fixes #63, fixes #41