Rewrite most of IRC message handling, closes #4