From d5759d1de26a3cf1428a2050a0cfa1abba0fb274 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 29 Nov 2022 05:12:42 +0000 Subject: Extract the logic for tags that need message-tags to its own type. --- src/modules/m_botmode.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/modules/m_botmode.cpp') diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp index 1a24a5c65..caf7ca323 100644 --- a/src/modules/m_botmode.cpp +++ b/src/modules/m_botmode.cpp @@ -30,17 +30,15 @@ #include "modules/whois.h" class BotTag final - : public ClientProtocol::MessageTagProvider + : public CTCTags::TagProvider { private: SimpleUserMode& botmode; - CTCTags::CapReference ctctagcap; public: BotTag(Module* mod, SimpleUserMode& bm) - : ClientProtocol::MessageTagProvider(mod) + : CTCTags::TagProvider(mod) , botmode(bm) - , ctctagcap(mod) { } @@ -50,11 +48,6 @@ public: if (user && user->IsModeSet(botmode)) msg.AddTag("bot", this, ""); } - - bool ShouldSendTag(LocalUser* user, const ClientProtocol::MessageTagData& tagdata) override - { - return ctctagcap.IsEnabled(user); - } }; class ModuleBotMode final -- cgit v1.3.1-10-gc9f91