Merged mcunha's channel join/leave support. 

Merged mcunha's channel join/leave support.