Chatmode switch

Message incoming stops when client hits enter and turns on chat mode. When client finish entering message and hit enter again, chat mode turns off and messages starts to flow in again.