Fix bug causing users to disconnect
This commit is contained in:
parent
20f0ca6666
commit
9947b537b6
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "shout",
|
"name": "shout",
|
||||||
"description": "The self-hosted web IRC client",
|
"description": "The self-hosted web IRC client",
|
||||||
"version": "0.38.6",
|
"version": "0.38.7",
|
||||||
"author": "Mattias Erming",
|
"author": "Mattias Erming",
|
||||||
"preferGlobal": true,
|
"preferGlobal": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|
|
@ -283,9 +283,14 @@ Client.prototype.sort = function(data) {
|
||||||
};
|
};
|
||||||
|
|
||||||
Client.prototype.quit = function() {
|
Client.prototype.quit = function() {
|
||||||
this.sockets.in(this.id).sockets.forEach(function(socket) {
|
var sockets = this.sockets.sockets;
|
||||||
socket.disconnect(true);
|
var room = sockets.adapter.rooms[this.id] || [];
|
||||||
});
|
for (var user in room) {
|
||||||
|
var socket = sockets.adapter.nsp.connected[user];
|
||||||
|
if (socket) {
|
||||||
|
socket.disconnect();
|
||||||
|
}
|
||||||
|
}
|
||||||
this.networks.forEach(function(network) {
|
this.networks.forEach(function(network) {
|
||||||
var irc = network.irc;
|
var irc = network.irc;
|
||||||
if (network.connected) {
|
if (network.connected) {
|
||||||
|
|
Loading…
Reference in New Issue