]> 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 9b74b6f23f7e9c6d9618954d17ce0280199daed3..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)
                {
@@ -71,7 +73,7 @@ class CommandTban : public Command
                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);