]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_timedbans.cpp
Merge the latest changes from insp20 into master.
[user/henk/code/inspircd.git] / src / modules / m_timedbans.cpp
index 874e6440f81495986d66d433dc02cbdcc32fb984..9890800e4c524f4222080cedc30474e85c0455af 100644 (file)
@@ -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;
@@ -218,7 +218,7 @@ class ModuleTimedBans : public Module
                }
        }
 
-       void OnChannelDelete(Channel* chan)
+       void OnChannelDelete(Channel* chan) CXX11_OVERRIDE
        {
                // Remove all timed bans affecting the channel from internal bookkeeping
                TimedBanList.erase(std::remove_if(TimedBanList.begin(), TimedBanList.end(), ChannelMatcher(chan)), TimedBanList.end());