diff --git a/exec/load/ircd_server.js b/exec/load/ircd_server.js index df2057afbf8d9547f78907780daaef4a3632aad5..7579e9caa181ff364130a7431373cea6da822d6f 100644 --- a/exec/load/ircd_server.js +++ b/exec/load/ircd_server.js @@ -1212,19 +1212,18 @@ function Server_Quit(str,suppress_bcast,is_netsplit,origin) { gnotice("Closing Link: " + this.nick + " (" + str + ")"); this.rawout("ERROR :Closing Link: [" + this.uprefix + "@" + this.hostname + "] (" + str + ")"); - if (this.socket!=undefined) { + if (this.socket!=undefined) this.socket.close(); - if (this.outgoing) { - if (YLines[this.ircclass].active > 0) { - YLines[this.ircclass].active--; - log(LOG_DEBUG, "Class "+this_cline.ircclass+" down to "+YLines[this_cline.ircclass].active+" active out of "+YLines[this_cline.ircclass].maxlinks); - } - else - log(LOG_ERROR, format("Class %d YLine going negative", this.ircclass)); - } - } delete Local_Sockets[this.id]; } + if (this.outgoing) { + if (YLines[this.ircclass].active > 0) { + YLines[this.ircclass].active--; + log(LOG_DEBUG, "Class "+this_cline.ircclass+" down to "+YLines[this_cline.ircclass].active+" active out of "+YLines[this_cline.ircclass].maxlinks); + } + else + log(LOG_ERROR, format("Class %d YLine going negative", this.ircclass)); + } delete Local_Sockets[this.id]; delete Local_Sockets_Map[this.id]; delete Local_Servers[this.id]; diff --git a/exec/load/ircd_user.js b/exec/load/ircd_user.js index 43d6ae774d22385f56a33af22dbbace1f2dad1a0..27900c1e034a76236ddc164889bbac14fbf6e45d 100644 --- a/exec/load/ircd_user.js +++ b/exec/load/ircd_user.js @@ -1548,18 +1548,17 @@ function User_Quit(str,suppress_bcast,is_netsplit,origin) { umode_notice(USERMODE_CLIENT,"Client","Client exiting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + str + "] [" + this.ip + "]"); - if (this.socket!=undefined) { + if (this.socket!=undefined) this.socket.close(); - if (this.outgoing) { - log(LOG_ERROR, "Outgoing USER connection detected!"); - if (YLines[this.ircclass].active > 0) { - YLines[this.ircclass].active--; - log(LOG_DEBUG, "Class "+this_cline.ircclass+" down to "+YLines[this_cline.ircclass].active+" active out of "+YLines[this_cline.ircclass].maxlinks); - } - else - log(LOG_ERROR, format("Class %d YLine going negative", this.ircclass)); - } + } + if (this.outgoing) { + log(LOG_ERROR, "Outgoing USER connection detected!"); + if (YLines[this.ircclass].active > 0) { + YLines[this.ircclass].active--; + log(LOG_DEBUG, "Class "+this_cline.ircclass+" down to "+YLines[this_cline.ircclass].active+" active out of "+YLines[this_cline.ircclass].maxlinks); } + else + log(LOG_ERROR, format("Class %d YLine going negative", this.ircclass)); } delete Local_Sockets[this.id];