mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 17:46:16 +01:00
online count fixes for cluster
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user