]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_timedbans.cpp
Use an oper priv instead of a config flag for overriding nonicks.
[user/henk/code/inspircd.git] / src / modules / m_timedbans.cpp
index 1898ea88a6ce0e3debe392dcde8cef118b877888..2decc2d3a584e282e8101e814646fe63e9ab7ef2 100644 (file)
@@ -45,6 +45,8 @@ class CommandTban : public Command
        bool IsBanSet(Channel* chan, const std::string& mask)
        {
                ListModeBase* banlm = static_cast<ListModeBase*>(*banmode);
+               if (!banlm)
+                       return false;
                const ListModeBase::ModeList* bans = banlm->GetList(chan);
                if (bans)
                {
@@ -66,12 +68,12 @@ class CommandTban : public Command
                syntax = "<channel> <duration> <banmask>";
        }
 
-       CmdResult Handle (const std::vector<std::string> &parameters, User *user)
+       CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE
        {
                Channel* channel = ServerInstance->FindChan(parameters[0]);
                if (!channel)
                {
-                       user->WriteNumeric(Numerics::NoSuchNick(parameters[0]));
+                       user->WriteNumeric(Numerics::NoSuchChannel(parameters[0]));
                        return CMD_FAILURE;
                }
                unsigned int cm = channel->GetPrefixValue(user);
@@ -127,7 +129,7 @@ class CommandTban : public Command
                return CMD_SUCCESS;
        }
 
-       RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters)
+       RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) CXX11_OVERRIDE
        {
                return ROUTE_BROADCAST;
        }
@@ -141,7 +143,7 @@ class BanWatcher : public ModeWatcher
        {
        }
 
-       void AfterMode(User* source, User* dest, Channel* chan, const std::string& banmask, bool adding)
+       void AfterMode(User* source, User* dest, Channel* chan, const std::string& banmask, bool adding) CXX11_OVERRIDE
        {
                if (adding)
                        return;