From 40bbfe6f97d5796dd6c0aee902de687926a4ab17 Mon Sep 17 00:00:00 2001 From: zefie Date: Tue, 17 Jun 2025 16:44:44 -0400 Subject: [PATCH] new features ofc means new bugs --- zefie_wtvp_minisrv/includes/classes/WTVIRC.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/zefie_wtvp_minisrv/includes/classes/WTVIRC.js b/zefie_wtvp_minisrv/includes/classes/WTVIRC.js index 5bbd16fc..f2b5c7d1 100644 --- a/zefie_wtvp_minisrv/includes/classes/WTVIRC.js +++ b/zefie_wtvp_minisrv/includes/classes/WTVIRC.js @@ -2916,14 +2916,6 @@ class WTVIRC { } } }); - var serverSocket = null; - for (const [srvSocket, users] of this.serverusers.entries()) { - if (users && typeof users.has === 'function' && users.has(nickname)) { - // Don't send QUIT to this server, as it owns the user - serverSocket = srvSocket; - continue; - } - } } @@ -2935,6 +2927,14 @@ class WTVIRC { } this.nicknames.delete(socket); if (!socket.signedoff) { + var serverSocket = null; + for (const [srvSocket, users] of this.serverusers.entries()) { + if (users && typeof users.has === 'function' && users.has(nickname)) { + // Don't send QUIT to this server, as it owns the user + serverSocket = srvSocket; + continue; + } + } this.broadcastToAllServers(`:${socket.uniqueId} QUIT :Client disconnected\r\n`, serverSocket); socket.signedoff = true; // Just in case }