online count fixes for cluster

This commit is contained in:
barisusakli
2014-09-04 17:41:00 -04:00
parent 8a996c4524
commit 98f338b41c
6 changed files with 82 additions and 47 deletions

View File

@@ -78,13 +78,19 @@ SocketMeta.rooms.enter = function(socket, data, callback) {
module.parent.exports.updateRoomBrowsingText(data.enter);
if (data.enter !== 'admin') {
websockets.in('admin').emit('event:meta.rooms.update', null, websockets.server.sockets.manager.rooms);
}
//if (data.enter !== 'admin') {
// websockets.in('admin').emit('event:meta.rooms.update', null, websockets.server.sockets.manager.rooms);
//}
};
SocketMeta.rooms.getAll = function(socket, data, callback) {
callback(null, websockets.server.sockets.manager.rooms);
var userData = {
onlineGuestCount: websockets.getOnlineAnonCount(),
onlineRegisteredCount: websockets.getConnectedClients().length,
rooms: websockets.server.sockets.manager.rooms
}
callback(null, userData);
};
/* Exports */