mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
took out userSockets, using io.sockets.clients() now'
This commit is contained in:
@@ -64,11 +64,12 @@ SocketAdmin.user.createUser = function(socket, user, callback) {
|
||||
SocketAdmin.user.banUser = function(socket, theirid) {
|
||||
admin.user.banUser(socket.uid, theirid, socket, function(isBanned) {
|
||||
if(isBanned) {
|
||||
if(index.userSockets[theirid]) {
|
||||
for(var i=0; i<index.userSockets[theirid].length; ++i) {
|
||||
index.userSockets[theirid][i].emit('event:banned');
|
||||
}
|
||||
var sockets = index.getUserSockets(theirid);
|
||||
|
||||
for(var i=0; i<sockets.length; ++i) {
|
||||
sockets[i].emit('event:banned');
|
||||
}
|
||||
|
||||
module.parent.exports.logoutUser(theirid);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user