]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_ircv3_ctctags.cpp
Update copyright headers.
[user/henk/code/inspircd.git] / src / modules / m_ircv3_ctctags.cpp
index e22c1f12527b075e90ddf8b4570cecdbed9f9779..421bf89c385dac9cfecb90ccf3406a8e738e7008 100644 (file)
@@ -2,7 +2,7 @@
  * InspIRCd -- Internet Relay Chat Daemon
  *
  *   Copyright (C) 2019 linuxdaemon <linuxdaemon.irc@gmail.com>
- *   Copyright (C) 2018-2019 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2018-2020 Sadie Powell <sadie@witchery.services>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
  * redistribute it and/or modify it under the terms of the GNU General Public
@@ -82,7 +82,7 @@ class CommandTagMsg : public Command
                        return CMD_FAILURE;
 
                unsigned int minrank = pm ? pm->GetPrefixRank() : 0;
-               CTCTags::TagMessage message(source, chan, msgdetails.tags_out);
+               CTCTags::TagMessage message(source, chan, msgdetails.tags_out, msgtarget.status);
                message.SetSideEffect(true);
                const Channel::MemberMap& userlist = chan->GetUsers();
                for (Channel::MemberMap::const_iterator iter = userlist.begin(); iter != userlist.end(); ++iter)
@@ -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);