]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/command_parse.cpp
Rename User::nping to nextping for consistency with lastping.
[user/henk/code/inspircd.git] / src / command_parse.cpp
index d4dd7da214c20e894d12f159b989cb52907bd0a6..533c7e28150c942321e45676366cbdd95f208126 100644 (file)
@@ -246,7 +246,7 @@ void CommandParser::ProcessCommand(LocalUser* user, std::string& command, Comman
                return;
 
        /* activity resets the ping pending timer */
-       user->nping = ServerInstance->Time() + user->MyClass->GetPingTime();
+       user->nextping = ServerInstance->Time() + user->MyClass->GetPingTime();
 
        if (handler->flags_needed)
        {
@@ -266,24 +266,6 @@ void CommandParser::ProcessCommand(LocalUser* user, std::string& command, Comman
                }
        }
 
-       if ((user->registered == REG_ALL) && (!user->IsOper()) && (handler->IsDisabled()))
-       {
-               /* command is disabled! */
-               user->CommandFloodPenalty += failpenalty;
-               if (ServerInstance->Config->DisabledDontExist)
-               {
-                       user->WriteNumeric(ERR_UNKNOWNCOMMAND, command, "Unknown command");
-               }
-               else
-               {
-                       user->WriteNumeric(ERR_UNKNOWNCOMMAND, command, "This command has been disabled.");
-               }
-
-               ServerInstance->SNO->WriteToSnoMask('a', "%s denied for %s (%s@%s)",
-                               command.c_str(), user->nick.c_str(), user->ident.c_str(), user->GetRealHost().c_str());
-               return;
-       }
-
        if ((!command_p.empty()) && (command_p.back().empty()) && (!handler->allow_empty_last_param))
                command_p.pop_back();
 
@@ -333,7 +315,6 @@ CommandBase::CommandBase(Module* mod, const std::string& cmd, unsigned int minpa
        , min_params(minpara)
        , max_params(maxpara)
        , use_count(0)
-       , disabled(false)
        , works_before_reg(false)
        , allow_empty_last_param(true)
        , Penalty(1)
@@ -452,7 +433,7 @@ void CommandParser::TranslateSingleParam(TranslateType to, const std::string& it
                        }
                        // If no custom translator was given, fall through
                }
-               case TR_TEXT:
+               /*@fallthrough@*/
                default:
                        /* Do nothing */
                        dest.append(item);