1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 17:43:13 +02:00

Allow protocol modules to apply tags to sent messages.

This is useful because for some IRCv3 specifications we need to
apply tags to all messages and its annoying to have to do this
inline when sending each message.
This commit is contained in:
Sadie Powell
2026-06-10 09:05:14 +01:00
parent b9d0762f2b
commit ca8fcbe119
3 changed files with 20 additions and 2 deletions
+5 -2
View File
@@ -73,8 +73,11 @@ void Uplink::SendInternal(const Anope::map<Anope::string> &tags, const MessageSo
return;
}
Anope::map<Anope::string> fulltags(tags);
IRCD->PopulateTags(fulltags, source, command, params);
Anope::string message;
if (!IRCD->Format(message, tags, source, command, params))
if (!IRCD->Format(message, fulltags, source, command, params))
return;
UplinkSock->sent_msgs++;
@@ -84,7 +87,7 @@ void Uplink::SendInternal(const Anope::map<Anope::string> &tags, const MessageSo
if (Anope::ProtocolDebug)
{
auto sent_tag = false;
for (const auto &[tname, tvalue] : tags)
for (const auto &[tname, tvalue] : fulltags)
{
if (IRCD->IsTagValid(tname, tvalue))
{