From f8f6ea2f3dd4cf2f67cddde85885391692d60b7d Mon Sep 17 00:00:00 2001 From: zefie Date: Tue, 17 Jun 2025 18:55:08 -0400 Subject: [PATCH] dont send 332 if there is no channel topic --- zefie_wtvp_minisrv/includes/classes/WTVIRC.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/zefie_wtvp_minisrv/includes/classes/WTVIRC.js b/zefie_wtvp_minisrv/includes/classes/WTVIRC.js index a06ce436..152d3d9b 100644 --- a/zefie_wtvp_minisrv/includes/classes/WTVIRC.js +++ b/zefie_wtvp_minisrv/includes/classes/WTVIRC.js @@ -2097,17 +2097,9 @@ class WTVIRC { this.broadcastToAllServers(`:${this.serverId} SJOIN ${this.getDate()} ${ch} +${modes.join('')} :${prefix}${socket.uniqueId}\r\n`); if (this.channeltopics.has(ch)) { const topic = this.channeltopics.get(ch); - if (this.clientIsWebTV(socket)) { - await this.sendThrottled(socket, [`:${this.servername} 332 ${socket.nickname} ${ch} :${topic}\r\n`]); - } else { + if (topic) { socket.write(`:${this.servername} 332 ${socket.nickname} ${ch} :${topic}\r\n`); } - } else { - if (this.clientIsWebTV(socket)) { - await this.sendThrottled(socket, [`:${this.servername} 331 ${socket.nickname} ${ch} :\r\n`]); - } else { - socket.write(`:${this.servername} 331 ${socket.nickname} ${ch} :\r\n`); - } } var users = this.getUsersInChannel(ch); if (users.length > 0) { @@ -2140,11 +2132,7 @@ class WTVIRC { }); socket.write(`:${this.servername} 353 ${socket.nickname} = ${ch} :${userHosts.join(' ')}\r\n`); } else { - if (this.clientIsWebTV(socket)) { - await this.sendThrottled(socket, [`:${this.servername} 353 ${socket.nickname} = ${ch} :${users.join(' ')}\r\n`]); - } else { - socket.write(`:${this.servername} 353 ${socket.nickname} = ${ch} :${users.join(' ')}\r\n`); - } + socket.write(`:${this.servername} 353 ${socket.nickname} = ${ch} :${users.join(' ')}\r\n`); } } socket.write(`:${this.servername} 366 ${socket.nickname} ${ch} :End of /NAMES list\r\n`);