Support |usercount| message

This commit is contained in:
Cathy J. Fitzpatrick 2013-05-22 20:32:31 -05:00
parent e0dbc1ecc5
commit 9dd5a2935c

View File

@ -654,6 +654,10 @@
this.parseUserList(row[1]);
break;
case 'usercount':
this.userCount.globalUsers = parseInt(row[1], 10);
break;
case 'formats':
// deprecated; please send formats to the global room
app.parseFormats(row);
@ -906,7 +910,8 @@
'#': 8
},
updateUserCount: function() {
$('#usercount-users').html(this.room.userCount.users || '0');
var users = Math.max(this.room.userCount.users || 0, this.room.userCount.globalUsers || 0);
$('#usercount-users').html('' + users);
},
updateCurrentUser: function() {
$('.userlist > .cur').attr('class', '');