From 1f2a8e4db6a4c722de4e090fcd7f710d874de1ed Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 25 Aug 2017 13:12:44 +0100 Subject: Fix mistakenly hardcoding the halfop prefix char in timedbans. This will almost always be % but if the server admin is using the customprefix module and remaps it to something else messages will not be sent out correctly. --- src/modules/m_timedbans.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp index b47327704..61095d6eb 100644 --- a/src/modules/m_timedbans.cpp +++ b/src/modules/m_timedbans.cpp @@ -119,7 +119,7 @@ class CommandTban : public Command // 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") ? '%' : '@'; + 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; -- cgit v1.2.3