diff options
author | Peter Powell <petpow@saberuk.com> | 2019-01-10 11:45:06 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-01-10 11:45:59 +0000 |
commit | 21ae8e31440c40c5168f8451558a308b1317a2f7 (patch) | |
tree | 4484d734e096db51f9767090bd531db745ba5735 /src/modules/m_ircv3_echomessage.cpp | |
parent | 00a11bd0b50b2f2b72b568b7e08b941d05436426 (diff) |
m_ircv3_echomessage: only echo the tags which were actually used.
Diffstat (limited to 'src/modules/m_ircv3_echomessage.cpp')
-rw-r--r-- | src/modules/m_ircv3_echomessage.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_ircv3_echomessage.cpp b/src/modules/m_ircv3_echomessage.cpp index f6eae5a00..b407aece4 100644 --- a/src/modules/m_ircv3_echomessage.cpp +++ b/src/modules/m_ircv3_echomessage.cpp @@ -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); } } |