X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_ircv3_echomessage.cpp;h=b407aece4a1af3a4c29519f1424f204b8af0f7bd;hb=318d50bc868fb64a7d5e1edeff3ec23e38925638;hp=68505a1957363121a7d1f3b2ea1323d7ee498074;hpb=23e29119f82a373e641b6bf9479c39149e36b1dd;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_ircv3_echomessage.cpp b/src/modules/m_ircv3_echomessage.cpp index 68505a195..b407aece4 100644 --- a/src/modules/m_ircv3_echomessage.cpp +++ b/src/modules/m_ircv3_echomessage.cpp @@ -33,32 +33,33 @@ class ModuleIRCv3EchoMessage : public Module void OnUserPostMessage(User* user, const MessageTarget& target, const MessageDetails& details) CXX11_OVERRIDE { - if (!cap.get(user)) + if (!cap.get(user) || !details.echo) return; // Caps are only set on local users LocalUser* const localuser = static_cast(user); - const std::string& text = details.echooriginal ? details.originaltext : details.text; + 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(); 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(); 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(); 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); } } @@ -66,7 +67,7 @@ class ModuleIRCv3EchoMessage : public Module void OnUserMessageBlocked(User* user, const MessageTarget& target, const MessageDetails& details) CXX11_OVERRIDE { // Prevent spammers from knowing that their spam was blocked. - if (details.echooriginal) + if (details.echo_original) OnUserPostMessage(user, target, details); }