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/repeat.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/repeat.cpp') diff --git a/modules/repeat.cpp b/modules/repeat.cpp index f14ba8c91..f49fadda5 100644 --- a/modules/repeat.cpp +++ b/modules/repeat.cpp @@ -151,7 +151,7 @@ public: ModuleSettings ms; SimpleExtItem MemberInfoExt; - RepeatMode(Module* Creator) + RepeatMode(const WeakModulePtr& Creator) : ParamMode>(Creator, "repeat", 'E') , MemberInfoExt(Creator, "repeat", ExtensionType::MEMBERSHIP) { @@ -386,9 +386,9 @@ private: public: RepeatModule() : Module(VF_VENDOR | VF_COMMON, "Adds channel mode E (repeat) which helps protect against spammers which spam the same message repeatedly.") - , banmode(this, "ban") - , exemptionprov(this) - , rm(this) + , banmode(weak_from_this(), "ban") + , exemptionprov(weak_from_this()) + , rm(weak_from_this()) { } @@ -468,7 +468,7 @@ public: void Prioritize() override { - ServerInstance->Modules.SetPriority(this, I_OnUserPreMessage, PRIORITY_LAST); + ServerInstance->Modules.SetPriority(shared_from_this(), I_OnUserPreMessage, PRIORITY_LAST); } void GetLinkData(LinkData& data) override -- cgit v1.3.1-10-gc9f91