1
0
mirror of https://github.com/anope/anope.git synced 2026-07-08 04:23:14 +02:00

Add an IRCv3 time tag to entry messages.

This commit is contained in:
Sadie Powell
2025-10-18 00:38:25 +01:00
parent 84dc0f3cc8
commit b9554f8539
5 changed files with 42 additions and 21 deletions
+8 -8
View File
@@ -249,25 +249,25 @@ public:
Uplink::Send(bi, "PRIVMSG", "$" + dest->GetName(), msg);
}
void SendContextNotice(BotInfo *bi, User *target, Channel *context, const Anope::string &msg) override
void SendContextNotice(BotInfo *bi, User *target, Channel *context, const Anope::string &msg, const Anope::map<Anope::string> &tags) override
{
if (spanningtree_proto_ver >= 1206)
{
IRCD->SendNotice(bi, target->GetUID(), msg, {
{ "~context", context->name },
});
auto newtags = tags;
newtags["~context"] = context->name;
IRCD->SendNotice(bi, target->GetUID(), msg, newtags);
return;
}
IRCDProto::SendContextNotice(bi, target, context, msg);
}
void SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg) override
void SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg, const Anope::map<Anope::string> &tags) override
{
if (spanningtree_proto_ver >= 1206)
{
IRCD->SendPrivmsg(bi, target->GetUID(), msg, {
{ "~context", context->name },
});
auto newtags = tags;
newtags["~context"] = context->name;
IRCD->SendPrivmsg(bi, target->GetUID(), msg, newtags);
return;
}
IRCDProto::SendContextPrivmsg(bi, target, context, msg);