aboutsummaryrefslogtreecommitdiff
path: root/modules/monitor.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/monitor.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/monitor.cpp')
-rw-r--r--modules/monitor.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/monitor.cpp b/modules/monitor.cpp
index 9c14db837..34b58c989 100644
--- a/modules/monitor.cpp
+++ b/modules/monitor.cpp
@@ -66,7 +66,7 @@ class IRCv3::Monitor::Manager final
Manager& manager;
public:
- ExtItem(Module* mod, const std::string& extname, Manager& managerref)
+ ExtItem(const WeakModulePtr& mod, const std::string& extname, Manager& managerref)
: ExtensionItem(mod, extname, ExtensionType::USER)
, manager(managerref)
{
@@ -106,7 +106,7 @@ class IRCv3::Monitor::Manager final
};
public:
- Manager(Module* mod, const std::string& extname)
+ Manager(const WeakModulePtr& mod, const std::string& extname)
: ext(mod, extname, *this)
{
}
@@ -301,7 +301,7 @@ class CommandMonitor final
public:
unsigned long maxmonitor;
- CommandMonitor(Module* mod, IRCv3::Monitor::Manager& managerref)
+ CommandMonitor(const WeakModulePtr& mod, IRCv3::Monitor::Manager& managerref)
: SplitCommand(mod, "MONITOR", 1)
, manager(managerref)
{
@@ -382,11 +382,11 @@ private:
public:
ModuleMonitor()
: Module(VF_VENDOR, "Adds the /MONITOR command which allows users to find out when their friends are connected to the server.")
- , ISupport::EventListener(this)
- , Monitor::APIBase(this)
- , manager(this, "monitor")
- , cmd(this, manager)
- , extendedcap(this, "extended-monitor")
+ , ISupport::EventListener(weak_from_this())
+ , Monitor::APIBase(weak_from_this())
+ , manager(weak_from_this(), "monitor")
+ , cmd(weak_from_this(), manager)
+ , extendedcap(weak_from_this(), "extended-monitor")
{
}