Skip to content

Commit 38647a7

Browse files
authored
Merge pull request #83 from Madriix/master
Update ClientConnect.js
2 parents e58db0a + 4741ae5 commit 38647a7

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

lib/ClientConnect.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,11 +770,15 @@ class ClientConnect {
770770
continue;
771771
}
772772
if (data[0] == "ERROR") {
773-
if (this.client.gone) {
773+
/*if (this.client.gone) {
774774
clearTimeout(this.client.gone);
775775
this.client.gone = '';
776776
this.client.goneTime = '';
777-
}
777+
}*/
778+
try {
779+
this.connections[this.client.hash].end();
780+
} catch (e) { }
781+
delete this.connections[this.client.hash];
778782
}
779783
if (lines[n].length > 1) {
780784
for (let m = 0; m < this.client.parents.length; m++) {
@@ -850,6 +854,9 @@ class ClientConnect {
850854
}
851855
}
852856
else if (lines[n].split(" ")[2] && global.ircCommandRedistributeMessagesOnConnect.has(lines[n].split(" ")[2].trimEnd())) {
857+
if (lines[n].split(" ")[1].substr(1).split("!")[0] == this.client.nick) {
858+
continue;
859+
}
853860
for (let key in this.client.buffers) {
854861
if (Object.prototype.hasOwnProperty.call(this.client.buffers, key)) {
855862
let _n = "server.irc";

0 commit comments

Comments
 (0)