Add PreRegister hook

This is useful for CAP commands and SASL.
Use concatenation instead of format()
Add OnSend hook
Send mode options to the OnModeChange hook