diff options
| author | 2021-11-16 19:41:16 +0000 | |
|---|---|---|
| committer | 2021-11-16 19:41:16 +0000 | |
| commit | 5ccf421cbf57a0efaf186df4fb0ec12bcb6e2e09 (patch) | |
| tree | 4757c3edec6bd90b672300c1d2b24de1bdb28ff4 /src | |
| parent | Use a mode reference in the repeat module. (diff) | |
Use a mode reference in the timedbans module.
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/m_timedbans.cpp | 7 |
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); } } |
