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/watch.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/watch.cpp') diff --git a/modules/watch.cpp b/modules/watch.cpp index 119a5a6d0..9d1d004f8 100644 --- a/modules/watch.cpp +++ b/modules/watch.cpp @@ -126,7 +126,7 @@ class CommandWatch final public: unsigned long maxwatch; - CommandWatch(Module* mod, IRCv3::Monitor::Manager& managerref) + CommandWatch(const WeakModulePtr& mod, IRCv3::Monitor::Manager& managerref) : SplitCommand(mod, "WATCH") , manager(managerref) { @@ -212,10 +212,10 @@ private: public: ModuleWatch() : Module(VF_VENDOR, "Adds the /WATCH command which allows users to find out when their friends are connected to the server.") - , Away::EventListener(this) - , ISupport::EventListener(this) - , manager(this, "watch") - , cmd(this, manager) + , Away::EventListener(weak_from_this()) + , ISupport::EventListener(weak_from_this()) + , manager(weak_from_this(), "watch") + , cmd(weak_from_this(), manager) { } -- cgit v1.3.1-10-gc9f91