ModChat is a very small chatserver using PHP and mysql. Rooms can be moderated or not. Traffic is minimized through javascript document.write an dynamic refresh-delay.
All the source is just about 80 KB. So it is easy to understand and adapt.
If you want to see more of my software, some educational games for Windows and Java-Handys, please visit my homepage at www.schilken.de or www.num-num.de
The pages are in german, but google may translate it for you ;-)
modchat is based on webchat, which is also hosted here at sourceforge.
If you don`t need the moderation feature but instead want private rooms and emoticons then take a look at webchat.