diff options
| author | 2026-03-28 21:32:23 +0000 | |
|---|---|---|
| committer | 2026-03-29 00:42:15 +0000 | |
| commit | cbc5431d62e3fe9166f18395dce3ddf2af0906d3 (patch) | |
| tree | 48a87fc27dc4826ce0caf4071e2060a9ff9e24c5 /modules/hidemode.cpp | |
| parent | Move service code from base to its own header. (diff) | |
Switch modules from reference<> to shared_ptr<> and weak_ptr<>.
Diffstat (limited to 'modules/hidemode.cpp')
| -rw-r--r-- | modules/hidemode.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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()); } }; |
