1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 02:36:38 +02:00

Implement support for the IRCv3 +draft/channel-context tag.

Closes #358.
This commit is contained in:
Sadie Powell
2024-02-26 15:16:01 +00:00
parent 83dd96b9f2
commit e341cac8d6
3 changed files with 26 additions and 3 deletions
+14
View File
@@ -411,6 +411,20 @@ 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)
{
IRCD->SendNoticeInternal(bi, target->GetUID(), Anope::printf("[%s] %s", context->name.c_str(), msg.c_str()), {
{ "+draft/channel-context", context->name },
});
}
void IRCDProto::SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg)
{
IRCD->SendPrivmsgInternal(bi, target->GetUID(), Anope::printf("[%s] %s", context->name.c_str(), msg.c_str()), {
{ "+draft/channel-context", context->name },
});
}
size_t IRCDProto::GetMaxChannel()
{
// We can cache this as its not allowed to change on rehash.