parent
d8f2d7fc10
commit
05f8bfe906
@ -491,14 +491,20 @@ Client.prototype.names = function(data) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Client.prototype.quit = function() {
|
Client.prototype.quit = function() {
|
||||||
var sockets = this.sockets.sockets;
|
const sockets = this.sockets.sockets;
|
||||||
var room = sockets.adapter.rooms[this.id] || [];
|
const room = sockets.adapter.rooms[this.id];
|
||||||
for (var user in room) {
|
|
||||||
var socket = sockets.adapter.nsp.connected[user];
|
if (room && room.sockets) {
|
||||||
if (socket) {
|
for (const user in room.sockets) {
|
||||||
socket.disconnect();
|
const socket = sockets.connected[user];
|
||||||
|
|
||||||
|
if (socket) {
|
||||||
|
socket.emit("sign-out");
|
||||||
|
socket.disconnect();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.networks.forEach((network) => {
|
this.networks.forEach((network) => {
|
||||||
if (network.irc) {
|
if (network.irc) {
|
||||||
network.irc.quit(Helper.config.leaveMessage);
|
network.irc.quit(Helper.config.leaveMessage);
|
||||||
|
Loading…
Reference in New Issue
Block a user