From 5ccf421cbf57a0efaf186df4fb0ec12bcb6e2e09 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 16 Nov 2021 19:41:16 +0000 Subject: Use a mode reference in the timedbans module. --- src/modules/m_timedbans.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp index 5743088f8..b1432270c 100644 --- a/src/modules/m_timedbans.cpp +++ b/src/modules/m_timedbans.cpp @@ -213,12 +213,15 @@ class ChannelMatcher class ModuleTimedBans : public Module { + private: + ChanModeReference banmode; CommandTban cmd; BanWatcher banwatcher; public: ModuleTimedBans() - : cmd(this) + : banmode(this, "ban") + , cmd(this) , banwatcher(this) { } @@ -260,7 +263,7 @@ class ModuleTimedBans : public Module } Modes::ChangeList setban; - setban.push_remove(ServerInstance->Modes->FindMode('b', MODETYPE_CHANNEL), mask); + setban.push_remove(*banmode, mask); ServerInstance->Modes->Process(ServerInstance->FakeClient, cr, NULL, setban); } } -- cgit v1.3.1-10-gc9f91