fix: return error if trying to perform operation on non-existant channel user

This commit is contained in:
zefie
2025-06-19 17:15:20 -04:00
parent 99a88c58a7
commit f25326d9d5

View File

@@ -4136,6 +4136,10 @@ class WTVIRC {
} else {
target = this.findUser(param);
}
if ((!target && !socket.isserver) || !this.channels.get(channel).has(target)) {
socket.write(`:${this.servername} 401 ${nickname} ${param} :No such nick/channel\r\n`);
return;
}
var result = this.processChannelModeParams(channel, plusminus + mc, target, socket);
paramIndex++;
} else {