limit channel modes to supported modes
This commit is contained in:
@@ -4048,6 +4048,7 @@ class WTVIRC {
|
||||
processChannelModes(nickname, channel, modes, params, socket) {
|
||||
// Split modes into array and process each character
|
||||
let modeChars = modes.split('');
|
||||
let supportedChannelModes = this.supported_channel_modes.split(',').join('').split('');
|
||||
var serverModeMsg = '';
|
||||
var target = null;
|
||||
if (socket.isserver) {
|
||||
@@ -4138,6 +4139,10 @@ class WTVIRC {
|
||||
serverModeMsg += '-';
|
||||
continue;
|
||||
}
|
||||
if (!supportedChannelModes.includes(mc)) {
|
||||
socket.write(`:${this.servername} 472 ${nickname} ${channel} :Unknown channel mode char: ${mc}\r\n`);
|
||||
continue;
|
||||
}
|
||||
modeStr += mc;
|
||||
// Modes that require a parameter
|
||||
if (['o', 'I', 'b', 'e', 'v', 'h', 'l', 'k'].includes(mc)) {
|
||||
|
||||
Reference in New Issue
Block a user