aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_timedbans.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-11-16 19:41:16 +0000
committerGravatar Sadie Powell2021-11-16 19:41:16 +0000
commit5ccf421cbf57a0efaf186df4fb0ec12bcb6e2e09 (patch)
tree4757c3edec6bd90b672300c1d2b24de1bdb28ff4 /src/modules/m_timedbans.cpp
parentUse a mode reference in the repeat module. (diff)
Use a mode reference in the timedbans module.
Diffstat (limited to 'src/modules/m_timedbans.cpp')
-rw-r--r--src/modules/m_timedbans.cpp7
1 files changed, 5 insertions, 2 deletions
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);
}
}