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

@@ -181,11 +181,8 @@ SocketModules.chats.send = function(socket, data, callback) {
Messaging.verifySpammer(socket.uid, function(err, isSpammer) {
if (!err && isSpammer) {
var sockets = server.getUserSockets(socket.uid);
for(var i = 0; i < sockets.length; ++i) {
sockets[i].emit('event:banned');
}
server.in('uid_' + socket.uid).emit('event:banned');
// We're just logging them out, so a "temporary ban" to prevent abuse. Revisit once we implement a way to temporarily ban users
server.logoutUser(socket.uid);