diff options
author | Sadie Powell <sadie@witchery.services> | 2020-01-16 15:18:17 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-01-16 15:18:17 +0000 |
commit | 130e4e9b43bd6d9190474eadb4ddbb2c50f6279a (patch) | |
tree | 35411613949075671d10ccd4c6250a9b333a7ad2 | |
parent | b0faa27567d7f6e7d10741180a6b3224f75d6e6e (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.
-rw-r--r-- | src/modules/m_ircv3_ctctags.cpp | 8 |
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); |