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/knock.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/knock.cpp') 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) { } -- cgit v1.3.1-10-gc9f91