From a59fdc67ce9b57dea3d67f7c434a4cfb44594750 Mon Sep 17 00:00:00 2001 From: Les De Ridder Date: Wed, 14 Oct 2020 06:52:42 +0200 Subject: [PATCH] Send ERR_NOSUCHCHANNEL on TOPIC for non-existent channel (non-strict) --- source/ircd/connection.d | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/source/ircd/connection.d b/source/ircd/connection.d index 610913d..dfdf2f6 100644 --- a/source/ircd/connection.d +++ b/source/ircd/connection.d @@ -657,10 +657,16 @@ class Connection && (!(c.modes.canFind('s') || c.modes.canFind('p')) || c.members.canFind(this)))) { //NOTE: The RFCs don't allow ERR_NOSUCHCHANNEL as a response to TOPIC - //TODO: If RFC-strictness is off, do send ERR_NOSUCHCHANNEL - send(Message(_server.name, "331", [ - nick, channelName, "No topic is set" - ], true)); + version (BasicFixes) + { + sendErrNoSuchChannel(channelName); + } + else + { + send(Message(_server.name, "331", [ + nick, channelName, "No topic is set" + ], true)); + } } else {