online counter now working

This commit is contained in:
HansPinckaers 2011-04-07 21:18:49 +02:00
parent efdb3b8963
commit ad86901f0b
2 changed files with 16 additions and 1 deletions

View file

@ -468,6 +468,19 @@ var paduserlist = (function() {
}
updateInviteNotice();
console.log(self.updateNumberOfOnlineUsers());
},
updateNumberOfOnlineUsers: function(){
var online = 1; // you are always online!
for(var i=0;i<otherUsersData.length;i++) {
if(otherUsersData[i].status == "")
{
online++;
}
}
$("#online_count").text(online);
return online;
},
userLeave: function(info) {
var existingIndex = findExistingIndex(info.userId);
@ -498,6 +511,8 @@ var paduserlist = (function() {
userData.leaveTimer = thisLeaveTimer;
}
updateInviteNotice();
console.log(self.updateNumberOfOnlineUsers());
},
showGuestPrompt: function(userId, displayName) {
if (knocksToIgnore[userId]) {