aboutsummaryrefslogtreecommitdiff
path: root/modules/knock.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/knock.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/knock.cpp')
-rw-r--r--modules/knock.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/knock.cpp b/modules/knock.cpp
index 411a6a981..1dc0463e5 100644
--- a/modules/knock.cpp
+++ b/modules/knock.cpp
@@ -67,7 +67,7 @@ private:
public:
int notify;
- CommandKnock(Module* Creator, SimpleChannelMode& Noknockmode)
+ CommandKnock(const WeakModulePtr& Creator, SimpleChannelMode& Noknockmode)
: Command(Creator, "KNOCK", 2, 2)
, noknockmode(Noknockmode)
, inviteonlymode(Creator, "inviteonly")
@@ -163,8 +163,8 @@ class ModuleKnock final
public:
ModuleKnock()
: Module(VF_VENDOR | VF_OPTCOMMON, "Adds the /KNOCK command which allows users to request access to an invite-only channel and channel mode K (noknock) which allows channels to disable usage of this command.")
- , kn(this, "noknock", 'K')
- , cmd(this, kn)
+ , kn(weak_from_this(), "noknock", 'K')
+ , cmd(weak_from_this(), kn)
{
}