Add usercount indicator

This commit is contained in:
calzoneman 2013-03-06 19:38:16 -06:00
parent 5ca419d3e3
commit 259c72e7da
3 changed files with 13 additions and 0 deletions

View file

@ -42,6 +42,10 @@ function initCallbacks() {
}
});
socket.on('usercount', function(data) {
$('#usercount').text(data.count + " connected users");
});
socket.on('chatMsg', function(data) {
var div = formatChatMessage(data);
$('#messagebuffer')[0].appendChild(div);