From 50c243a063b17fd9793f30b8eeb5048f6ac384da Mon Sep 17 00:00:00 2001 From: zefie Date: Sat, 14 Jun 2025 19:09:02 -0400 Subject: [PATCH] only let ssl user set ssl only --- zefie_wtvp_minisrv/includes/classes/WTVIRC.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zefie_wtvp_minisrv/includes/classes/WTVIRC.js b/zefie_wtvp_minisrv/includes/classes/WTVIRC.js index 1c9ae515..ad98d6c6 100644 --- a/zefie_wtvp_minisrv/includes/classes/WTVIRC.js +++ b/zefie_wtvp_minisrv/includes/classes/WTVIRC.js @@ -122,9 +122,6 @@ class WTVIRC { socket.push(firstChunk); secureSocket.on('error', (err) => { - if (this.debug) { - console.error('TLS error:', err); - } this.terminateSession(secureSocket, true); }); @@ -1863,6 +1860,10 @@ class WTVIRC { if (!chan_modes || chan_modes === true) { chan_modes = []; } + if (!socket.secure) { + socket.write(`:${this.servername} 484 ${nickname} ${channel} :You must be connected via SSL/TLS to set +z\r\n`); + return; + } this.channelmodes.set(channel, [...chan_modes, 'z']); if (this.kick_insecure_on_z) { const usersInChannel = this.channels.get(channel) || new Set();