additions and fixes to  message handler functions.

Signed-off-by: Miethpo <miethpomail@yahoo.co.uk>
added support for channel modes, not yet complete and maybe not correctly functioning.

Signed-off-by: Miethpo <miethpomail@yahoo.co.uk>