diff --git a/lib/ClientConnect.js b/lib/ClientConnect.js index b176d47..e6dd5e5 100644 --- a/lib/ClientConnect.js +++ b/lib/ClientConnect.js @@ -770,11 +770,15 @@ class ClientConnect { continue; } if (data[0] == "ERROR") { - if (this.client.gone) { + /*if (this.client.gone) { clearTimeout(this.client.gone); this.client.gone = ''; this.client.goneTime = ''; - } + }*/ + try { + this.connections[this.client.hash].end(); + } catch (e) { } + delete this.connections[this.client.hash]; } if (lines[n].length > 1) { for (let m = 0; m < this.client.parents.length; m++) { @@ -850,6 +854,9 @@ class ClientConnect { } } else if (lines[n].split(" ")[2] && global.ircCommandRedistributeMessagesOnConnect.has(lines[n].split(" ")[2].trimEnd())) { + if (lines[n].split(" ")[1].substr(1).split("!")[0] == this.client.nick) { + continue; + } for (let key in this.client.buffers) { if (Object.prototype.hasOwnProperty.call(this.client.buffers, key)) { let _n = "server.irc";