update chat.js and iochat module to echo right