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/auditorium.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'modules/auditorium.cpp') diff --git a/modules/auditorium.cpp b/modules/auditorium.cpp index ba1118aa2..ced1550a1 100644 --- a/modules/auditorium.cpp +++ b/modules/auditorium.cpp @@ -33,7 +33,7 @@ class AuditoriumMode final : public SimpleChannelMode { public: - AuditoriumMode(Module* Creator) + AuditoriumMode(const WeakModulePtr& Creator) : SimpleChannelMode(Creator, "auditorium", 'u') { ranktoset = ranktounset = OP_VALUE; @@ -80,11 +80,11 @@ class ModuleAuditorium final public: ModuleAuditorium() : Module(VF_VENDOR, "Adds channel mode u (auditorium) which hides unprivileged users in a channel from each other.") - , Names::EventListener(this) - , Who::EventListener(this) - , Who::VisibleEventListener(this) - , exemptionprov(this) - , aum(this) + , Names::EventListener(weak_from_this()) + , Who::EventListener(weak_from_this()) + , Who::VisibleEventListener(weak_from_this()) + , exemptionprov(weak_from_this()) + , aum(weak_from_this()) , joinhook(this) { } @@ -199,7 +199,7 @@ public: }; JoinHook::JoinHook(ModuleAuditorium* mod) - : ClientProtocol::EventHook(mod, "JOIN", 10) + : ClientProtocol::EventHook(mod->weak_from_this(), "JOIN", 10) , parentmod(mod) { } -- cgit v1.3.1-10-gc9f91