From b5616c4a0b960030ca86bbcf82fcac4ed8390141 Mon Sep 17 00:00:00 2001 From: Les De Ridder Date: Wed, 14 Oct 2020 07:24:47 +0200 Subject: [PATCH] Send ERR_NOSUCHCHANNEL on MODE for non-existent channel (non-strict) --- source/ircd/connection.d | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/ircd/connection.d b/source/ircd/connection.d index c347e03..73de268 100644 --- a/source/ircd/connection.d +++ b/source/ircd/connection.d @@ -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];