1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 17:04:47 +02:00

Fix echoing tags on Solanum.

This commit is contained in:
Sadie Powell
2026-02-25 18:32:19 +00:00
parent decbab5d09
commit 0df341fa32
+30 -4
View File
@@ -421,12 +421,15 @@ struct IRCDMessagePass final
struct IRCDMessageNotice final
: Message::Notice
{
IRCDMessageNotice(Module *creator) : Message::Notice(creator) { }
IRCDMessageNotice(Module *creator)
: Message::Notice(creator)
{
}
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override
{
if (Servers::Capab.count("ECHO"))
Uplink::Send("ECHO", 'N', source.GetSource(), params[1]);
Uplink::Send(tags, "ECHO", 'N', source.GetSource(), params[1]);
Message::Notice::Run(source, params, tags);
}
@@ -435,17 +438,38 @@ struct IRCDMessageNotice final
struct IRCDMessagePrivmsg final
: Message::Privmsg
{
IRCDMessagePrivmsg(Module *creator) : Message::Privmsg(creator) { }
IRCDMessagePrivmsg(Module *creator)
: Message::Privmsg(creator)
{
}
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override
{
if (Servers::Capab.count("ECHO"))
Uplink::Send("ECHO", 'P', source.GetSource(), params[1]);
Uplink::Send(tags, "ECHO", 'P', source.GetSource(), params[1]);
Message::Privmsg::Run(source, params, tags);
}
};
struct IRCDMessageTagmsg final
: IRCDMessage
{
IRCDMessageTagmsg(Module *creator)
: IRCDMessage(creator, "TAGMSG", 1)
{
SetFlag(FLAG_REQUIRE_USER);
}
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override
{
if (Servers::Capab.count("ECHO"))
Uplink::Send(tags, "ECHO", 'T', source.GetSource());
// We only care about implementing ECHO for now.
}
};
class ProtoSolanum final
: public Module
{
@@ -487,6 +511,7 @@ class ProtoSolanum final
IRCDMessagePass message_pass;
IRCDMessagePrivmsg message_privmsg;
IRCDMessageServer message_server;
IRCDMessageTagmsg message_tagmsg;
static void AddModes()
{
@@ -550,6 +575,7 @@ public:
, message_pass(this)
, message_privmsg(this)
, message_server(this)
, message_tagmsg(this)
{
if (ModuleManager::LoadModule("ratbox", User::Find(creator)) != MOD_ERR_OK)
throw ModuleException("Unable to load ratbox");