Send ERR_NOSUCHCHANNEL on MODE for non-existent channel (non-strict)

This commit is contained in:
Les De Ridder 2020-10-14 07:24:47 +02:00
parent a3f306b9ba
commit b5616c4a0b
1 changed files with 5 additions and 1 deletions

View File

@ -1096,7 +1096,11 @@ class Connection
auto channelRange = _server.findChannelByName(message.parameters[0]);
if (channelRange.empty)
{
//TODO: If RFC-strictness is off, send an error message when the channel doesn't exist
//NOTE: The RFCs don't allow ERR_NOSUCHCHANNEL as a response to MODE
version (BasicFixes)
{
sendErrNoSuchChannel(message.parameters[0]);
}
return;
}
auto channel = channelRange[0];