]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_ircv3_echomessage.cpp
Expand searching in m_httpd_stats, add global handling of GET parameters (#1566)
[user/henk/code/inspircd.git] / src / modules / m_ircv3_echomessage.cpp
index f6eae5a00741c92038d8ca61c3811ad8831b026a..b407aece4a1af3a4c29519f1424f204b8af0f7bd 100644 (file)
@@ -40,25 +40,26 @@ class ModuleIRCv3EchoMessage : public Module
                LocalUser* const localuser = static_cast<LocalUser*>(user);
 
                const std::string& text = details.echo_original ? details.original_text : details.text;
+               const ClientProtocol::TagMap& tags = details.echo_original ? details.tags_in : details.tags_out;
                if (target.type == MessageTarget::TYPE_USER)
                {
                        User* destuser = target.Get<User>();
                        ClientProtocol::Messages::Privmsg privmsg(ClientProtocol::Messages::Privmsg::nocopy, user, destuser, text, details.type);
-                       privmsg.AddTags(details.tags_in);
+                       privmsg.AddTags(tags);
                        localuser->Send(ServerInstance->GetRFCEvents().privmsg, privmsg);
                }
                else if (target.type == MessageTarget::TYPE_CHANNEL)
                {
                        Channel* chan = target.Get<Channel>();
                        ClientProtocol::Messages::Privmsg privmsg(ClientProtocol::Messages::Privmsg::nocopy, user, chan, text, details.type, target.status);
-                       privmsg.AddTags(details.tags_in);
+                       privmsg.AddTags(tags);
                        localuser->Send(ServerInstance->GetRFCEvents().privmsg, privmsg);
                }
                else
                {
                        const std::string* servername = target.Get<std::string>();
                        ClientProtocol::Messages::Privmsg privmsg(ClientProtocol::Messages::Privmsg::nocopy, user, *servername, text, details.type);
-                       privmsg.AddTags(details.tags_in);
+                       privmsg.AddTags(tags);
                        localuser->Send(ServerInstance->GetRFCEvents().privmsg, privmsg);
                }
        }