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/hidemode.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/hidemode.cpp') diff --git a/modules/hidemode.cpp b/modules/hidemode.cpp index c3ee69da7..eecb5dd77 100644 --- a/modules/hidemode.cpp +++ b/modules/hidemode.cpp @@ -39,7 +39,7 @@ public: return 0; } - void Load(const Module* mod) + void Load(const WeakModulePtr& mod) { RanksToSeeMap newranks; @@ -176,7 +176,7 @@ class ModeHook final public: Settings settings; - ModeHook(Module* mod) + ModeHook(const WeakModulePtr& mod) : ClientProtocol::EventHook(mod, "MODE", 10) { } @@ -192,13 +192,13 @@ private: public: ModuleHideMode() : Module(VF_VENDOR, "Allows mode changes to be hidden from users without a prefix mode ranked equal to or higher than a defined level.") - , modehook(this) + , modehook(weak_from_this()) { } void ReadConfig(ConfigStatus& status) override { - modehook.settings.Load(this); + modehook.settings.Load(weak_from_this()); } }; -- cgit v1.3.1-10-gc9f91