fixed maximum chat message length on client-side. #1151
removed some unused code