summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-01-16 15:18:17 +0000
committerSadie Powell <sadie@witchery.services>2020-01-16 15:18:17 +0000
commit130e4e9b43bd6d9190474eadb4ddbb2c50f6279a (patch)
tree35411613949075671d10ccd4c6250a9b333a7ad2 /src/modules
parentb0faa27567d7f6e7d10741180a6b3224f75d6e6e (diff)
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.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_ircv3_ctctags.cpp8
1 files 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);