Node JS telnet server weird input and strange output

Hey guys I'm running this server It runs great on my mac. But when I connect to the server, which is running on my mac, via telnet on my windows computer all the text is skew and input is in single characters. Help would be greatly appreciated.

Thank you in advance.

Looks like your telnet client does not operate in line mode by default. When you try to type the password it reads the first character and your server compares it with the expected password:

$ telnet localhost 8000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Password:RPassword rejected:RConnection closed by foreign host.

Try using netcat http://en.wikipedia.org/wiki/Netcat. It is line buffered:

$ nc localhost 8000
Password:Rushabh
[me]: has joined the chattest
[me]:test
second test
[me]:second test

If you really want to use telnet, you can either change your server to deal with character by character input, or try escaping (^]) and set mode line (For some reason, I was not successful with this. I'm using the telnet client distributed by the Cygwin project.)