aboutsummaryrefslogtreecommitdiffstats
path: root/modules/namedmodes.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/namedmodes.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/namedmodes.cpp')
-rw-r--r--modules/namedmodes.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/namedmodes.cpp b/modules/namedmodes.cpp
index 995ea8e74..817dc5c02 100644
--- a/modules/namedmodes.cpp
+++ b/modules/namedmodes.cpp
@@ -61,7 +61,7 @@ class CommandProp final
: public SplitCommand
{
public:
- CommandProp(Module* parent)
+ CommandProp(const WeakModulePtr& parent)
: SplitCommand(parent, "PROP", 1)
{
syntax = { "<channel> [[(+|-)]<mode> [<value>]]" };
@@ -113,7 +113,7 @@ class DummyZ final
: public ModeHandler
{
public:
- DummyZ(Module* parent)
+ DummyZ(const WeakModulePtr& parent)
: ModeHandler(parent, "namebase", 'Z', PARAM_ALWAYS, MODETYPE_CHANNEL)
{
list = true;
@@ -138,14 +138,14 @@ private:
public:
ModuleNamedModes()
: Module(VF_VENDOR, "Provides support for adding and removing modes via their long names.")
- , cmd(this)
- , dummyZ(this)
+ , cmd(weak_from_this())
+ , dummyZ(weak_from_this())
{
}
void Prioritize() override
{
- ServerInstance->Modules.SetPriority(this, I_OnPreMode, PRIORITY_FIRST);
+ ServerInstance->Modules.SetPriority(shared_from_this(), I_OnPreMode, PRIORITY_FIRST);
}
ModResult OnPreMode(User* source, User* dest, Channel* channel, Modes::ChangeList& modes) override