This code started out as a demo for node.js. I have taken it and added a little framework for chat commands, including things like rolling dice, random choice of a number of options, and changing your nickname. As it stands, it's probably suitable for a small group of people who work in the same office to use as a constant informal chat room for the office.
To run it, you will need to have node.js installed (see ry's node.js repository). Once you have node.js installed, you can fork or clone this repo and run the server like this:
$ /usr/local/bin/node server.js