General tidying

This fixes at least one NPE.  I can run and connect to the bouncer. There's the chance it might cause a parser bug in DMDirc though, but that might just have been coincidence.