X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommand_parse.cpp;h=57db5d496c3dc99f3852e7a00be08e622e753fc9;hb=638e4bb417ebcd4f0a384ac19585620b0fde1569;hp=c2ae39d494e3a75579d4635f36f62394d5c95671;hpb=2d50984185c7902d37783a98f19637c86694a452;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/command_parse.cpp b/src/command_parse.cpp index c2ae39d49..57db5d496 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -139,7 +139,7 @@ CmdResult CommandParser::CallHandler(const std::string& commandname, const Comma if (user->IsModeSet(n->second->flags_needed)) { /* if user has the flags, and now has the permissions, go ahead */ - if (user->HasPermission(commandname)) + if (user->HasCommandPermission(commandname)) bOkay = true; } } @@ -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) { @@ -257,7 +257,7 @@ void CommandParser::ProcessCommand(LocalUser* user, std::string& command, Comman return; } - if (!user->HasPermission(command)) + if (!user->HasCommandPermission(command)) { user->CommandFloodPenalty += failpenalty; user->WriteNumeric(ERR_NOPRIVILEGES, InspIRCd::Format("Permission Denied - Oper type %s does not have access to command %s", @@ -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)