fix: lost modes ohv in that last commit

This commit is contained in:
zefie
2025-06-19 16:28:53 -04:00
parent ef774d4be8
commit 9c04869d38

View File

@@ -4048,7 +4048,7 @@ class WTVIRC {
processChannelModes(nickname, channel, modes, params, socket) { processChannelModes(nickname, channel, modes, params, socket) {
// Split modes into array and process each character // Split modes into array and process each character
let modeChars = modes.split(''); let modeChars = modes.split('');
let supportedChannelModes = this.supported_channel_modes.split(',').join('').split(''); let supportedChannelModes = (this.supported_channel_modes.split(',').join('') + this.supported_prefixes[0]).split('');
var serverModeMsg = ''; var serverModeMsg = '';
var target = null; var target = null;
if (socket.isserver) { if (socket.isserver) {
@@ -4140,7 +4140,9 @@ class WTVIRC {
continue; continue;
} }
if (!supportedChannelModes.includes(mc)) { if (!supportedChannelModes.includes(mc)) {
socket.write(`:${this.servername} 472 ${nickname} ${channel} :Unknown channel mode char: ${mc}\r\n`); if (!socket.isserver) {
socket.write(`:${this.servername} 472 ${nickname} ${channel} :Unknown channel mode char: ${mc}\r\n`);
}
continue; continue;
} }
modeStr += mc; modeStr += mc;