1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 03:56:38 +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
@@ -388,18 +388,18 @@ Anope::string IRCDProto::NormalizeMask(const Anope::string &mask)
return Entry("", mask).GetNUHMask();
}
void IRCDProto::SendContextNotice(BotInfo *bi, User *target, Channel *context, const Anope::string &msg)
void IRCDProto::SendContextNotice(BotInfo *bi, User *target, Channel *context, const Anope::string &msg, const Anope::map<Anope::string> &tags)
{
IRCD->SendNotice(bi, target->GetUID(), Anope::Format("[%s] %s", context->name.c_str(), msg.c_str()), {
{ "+draft/channel-context", context->name },
});
auto newtags = tags;
newtags["+draft/channel-context"] = context->name;
IRCD->SendNotice(bi, target->GetUID(), Anope::Format("[%s] %s", context->name.c_str(), msg.c_str()), newtags);
}
void IRCDProto::SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg)
void IRCDProto::SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg, const Anope::map<Anope::string> &tags)
{
IRCD->SendPrivmsg(bi, target->GetUID(), Anope::Format("[%s] %s", context->name.c_str(), msg.c_str()), {
{ "+draft/channel-context", context->name },
});
auto newtags = tags;
newtags["+draft/channel-context"] = context->name;
IRCD->SendPrivmsg(bi, target->GetUID(), Anope::Format("[%s] %s", context->name.c_str(), msg.c_str()), newtags);
}
MessageSource::MessageSource(const Anope::string &src) : source(src)