mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-05-09 12:34:58 -05:00
Support |usercount| message
This commit is contained in:
parent
e0dbc1ecc5
commit
9dd5a2935c
|
|
@ -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', '');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user