From 130e4e9b43bd6d9190474eadb4ddbb2c50f6279a Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 16 Jan 2020 15:18:17 +0000 Subject: Check tag list after checking if the message-tag cap is enabled. This fixes a confusion created in c299adb31a where users without the message-tags cap would get errors instead of being silently ignored. --- src/modules/m_ircv3_ctctags.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/m_ircv3_ctctags.cpp b/src/modules/m_ircv3_ctctags.cpp index e22c1f125..d0012b752 100644 --- a/src/modules/m_ircv3_ctctags.cpp +++ b/src/modules/m_ircv3_ctctags.cpp @@ -216,6 +216,10 @@ class CommandTagMsg : public Command if (CommandParser::LoopCall(user, this, parameters, 0)) return CMD_SUCCESS; + // Check that the source has the message tags capability. + if (IS_LOCAL(user) && !cap.get(user)) + return CMD_FAILURE; + // The specified message tags were empty. if (parameters.GetTags().empty()) { @@ -223,10 +227,6 @@ class CommandTagMsg : public Command return CMD_FAILURE; } - // Check that the source has the message tags capability. - if (IS_LOCAL(user) && !cap.get(user)) - return CMD_FAILURE; - // The target is a server glob. if (parameters[0][0] == '$') return HandleServerTarget(user, parameters); -- cgit v1.2.3