From cbc5431d62e3fe9166f18395dce3ddf2af0906d3 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 28 Mar 2026 21:32:23 +0000 Subject: Switch modules from reference<> to shared_ptr<> and weak_ptr<>. --- modules/botmode.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/botmode.cpp') diff --git a/modules/botmode.cpp b/modules/botmode.cpp index c56907603..f9d39e10d 100644 --- a/modules/botmode.cpp +++ b/modules/botmode.cpp @@ -34,7 +34,7 @@ private: SimpleUserMode& botmode; public: - BotTag(Module* mod, SimpleUserMode& bm) + BotTag(const WeakModulePtr& mod, SimpleUserMode& bm) : CTCTags::TagProvider(mod) , botmode(bm) { @@ -62,11 +62,11 @@ private: public: ModuleBotMode() : Module(VF_VENDOR, "Adds user mode B (bot) which marks users with it set as bots.") - , ISupport::EventListener(this) - , Who::EventListener(this) - , Whois::EventListener(this) - , bm(this, "bot", 'B') - , tag(this, bm) + , ISupport::EventListener(weak_from_this()) + , Who::EventListener(weak_from_this()) + , Whois::EventListener(weak_from_this()) + , bm(weak_from_this(), "bot", 'B') + , tag(weak_from_this(), bm) { } -- cgit v1.3.1-10-gc9f91