From 0df341fa32905a4ae51ada4da416149d71b5ff60 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 25 Feb 2026 18:32:19 +0000 Subject: [PATCH] Fix echoing tags on Solanum. --- modules/protocol/solanum.cpp | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/modules/protocol/solanum.cpp b/modules/protocol/solanum.cpp index 32b9e3647..091f1843a 100644 --- a/modules/protocol/solanum.cpp +++ b/modules/protocol/solanum.cpp @@ -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 ¶ms, const Anope::map &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 ¶ms, const Anope::map &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 ¶ms, const Anope::map &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");