try this clark : http://moodle.org/mod/data/view.php?rid=2259&page=385
The shoutbox refreshes using Ajax and does exactly what you require
Chat
Chat Block in sidebar?
Dán digaštallan lea giddejuvvon, it don sáhte šat vástidit dasa.