I wrote one for my website http://www.mpip.org/chat/chat.html
The client is in java, the server in perl. The server starts on demand and dies after the last chatter leaves, thus it can be run as a cgi-bin script on an ISP that might not ordinarily allow a chat server to run.