summaryrefslogtreecommitdiff
path: root/src/modules/m_timedbans.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-10-12 15:55:21 +0100
committerPeter Powell <petpow@saberuk.com>2017-10-12 15:55:21 +0100
commita3e0768758ca68429a29d9c78ce672f2d938c6e7 (patch)
treea66b4c4f917d56e1cef8ffda450d535ea532be35 /src/modules/m_timedbans.cpp
parentc46f8a368c42f64284244f3d2dfc022a383294fa (diff)
parent0337b92c158fa662f04056343affd59315da78db (diff)
Merge the latest changes from insp20 into master.
Diffstat (limited to 'src/modules/m_timedbans.cpp')
-rw-r--r--src/modules/m_timedbans.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index 44c6c4c4f..9890800e4 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -118,8 +118,8 @@ class CommandTban : public Command
TimedBanList.push_back(T);
// If halfop is loaded, send notice to halfops and above, otherwise send to ops and above
- ModeHandler* mh = ServerInstance->Modes->FindMode('h', MODETYPE_CHANNEL);
- char pfxchar = (mh && mh->name == "halfop") ? '%' : '@';
+ PrefixMode* mh = ServerInstance->Modes->FindPrefixMode('h');
+ char pfxchar = (mh && mh->name == "halfop") ? mh->GetPrefix() : '@';
channel->WriteAllExcept(ServerInstance->FakeClient, true, pfxchar, tmp, "NOTICE %s :%s added a timed ban on %s lasting for %ld seconds.", channel->name.c_str(), user->nick.c_str(), mask.c_str(), duration);
return CMD_SUCCESS;