aboutsummaryrefslogtreecommitdiffstats
path: root/modules/delayjoin.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/delayjoin.cpp
parentMove service code from base to its own header. (diff)
downloadinspircd++-cbc5431d62e3fe9166f18395dce3ddf2af0906d3.tar.gz
inspircd++-cbc5431d62e3fe9166f18395dce3ddf2af0906d3.tar.bz2
inspircd++-cbc5431d62e3fe9166f18395dce3ddf2af0906d3.zip
Switch modules from reference<> to shared_ptr<> and weak_ptr<>.
Diffstat (limited to 'modules/delayjoin.cpp')
-rw-r--r--modules/delayjoin.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/delayjoin.cpp b/modules/delayjoin.cpp
index bd1597505..686f06e7d 100644
--- a/modules/delayjoin.cpp
+++ b/modules/delayjoin.cpp
@@ -39,7 +39,7 @@ private:
IRCv3::ServerTime::API servertime;
public:
- DelayJoinMode(Module* Parent, IntExtItem& ext)
+ DelayJoinMode(const WeakModulePtr& Parent, IntExtItem& ext)
: SimpleChannelMode(Parent, "delayjoin", 'D')
, unjoined(ext)
, servertime(Parent)
@@ -80,7 +80,7 @@ private:
const IntExtItem& unjoined;
public:
- JoinHook(Module* mod, const IntExtItem& unjoinedref)
+ JoinHook(const WeakModulePtr& mod, const IntExtItem& unjoinedref)
: ClientProtocol::EventHook(mod, "JOIN", 10)
, unjoined(unjoinedref)
{
@@ -127,13 +127,13 @@ private:
public:
ModuleDelayJoin()
: Module(VF_VENDOR, "Adds channel mode D (delayjoin) which hides JOIN messages from users until they speak.")
- , CTCTags::EventListener(this)
- , Names::EventListener(this)
- , Who::EventListener(this)
- , Who::VisibleEventListener(this)
- , unjoined(this, "delayjoin", ExtensionType::MEMBERSHIP)
- , joinhook(this, unjoined)
- , djm(this, unjoined)
+ , CTCTags::EventListener(weak_from_this())
+ , Names::EventListener(weak_from_this())
+ , Who::EventListener(weak_from_this())
+ , Who::VisibleEventListener(weak_from_this())
+ , unjoined(weak_from_this(), "delayjoin", ExtensionType::MEMBERSHIP)
+ , joinhook(weak_from_this(), unjoined)
+ , djm(weak_from_this(), unjoined)
{
}