aboutsummaryrefslogtreecommitdiff
path: root/modules/repeat.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-03-28 21:32:23 +0000
committerGravatar Sadie Powell2026-03-29 00:42:15 +0000
commitcbc5431d62e3fe9166f18395dce3ddf2af0906d3 (patch)
tree48a87fc27dc4826ce0caf4071e2060a9ff9e24c5 /modules/repeat.cpp
parentMove service code from base to its own header. (diff)
Switch modules from reference<> to shared_ptr<> and weak_ptr<>.
Diffstat (limited to 'modules/repeat.cpp')
-rw-r--r--modules/repeat.cpp10
1 files changed, 5 insertions, 5 deletions
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<MemberInfo> MemberInfoExt;
- RepeatMode(Module* Creator)
+ RepeatMode(const WeakModulePtr& Creator)
: ParamMode<RepeatMode, SimpleExtItem<ChannelSettings>>(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