A few changes...

Send mode options to the OnModeChange hook  (For modes that use options like +bieqfovhj)
Add OnSend hook  (Logging)
Use concatenation instead of format()  (Don't have to escape messages send())
Add PreRegister hook  (Allows for CAP commands and SASL)

If you like I could try to split these into branches.