diff options
| author | 2010-08-13 16:56:24 -0400 | |
|---|---|---|
| committer | 2010-08-13 16:56:24 -0400 | |
| commit | 7cfd4039ca3a835abfa88dfd595187fb11aa6901 (patch) | |
| tree | 360b659045ea6a9b5b6d5227a7ff4da0e5ab4c44 /src/command_parse.cpp | |
| parent | Remove Limits.Finalise(), doing this is completely incorrect (diff) | |
Remove duplicated settings now solely defined by the <connect> class
Diffstat (limited to 'src/command_parse.cpp')
| -rw-r--r-- | src/command_parse.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 729fd3089..c6afe8f86 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -191,14 +191,7 @@ bool CommandParser::ProcessCommand(LocalUser *user, std::string &cmd) /* find the command, check it exists */ Commandtable::iterator cm = cmdlist.find(command); - /* Modify the user's penalty regardless of whether or not the command exists */ bool do_more = true; - if (!user->HasPrivPermission("users/flood/no-throttle")) - { - // If it *doesn't* exist, give it a slightly heftier penalty than normal to deter flooding us crap - user->CommandFloodPenalty += cm != cmdlist.end() ? cm->second->Penalty * 1000 : 2000; - } - if (cm == cmdlist.end()) { @@ -219,11 +212,16 @@ bool CommandParser::ProcessCommand(LocalUser *user, std::string &cmd) { if (user->registered == REG_ALL) user->WriteNumeric(ERR_UNKNOWNCOMMAND, "%s %s :Unknown command",user->nick.c_str(),command.c_str()); + // don't flood crap, please + user->CommandFloodPenalty += 2000; ServerInstance->stats->statsUnknown++; return true; } } + // account for the penalty of the command + user->CommandFloodPenalty += cm->second->Penalty * 1000; + if (cm->second->max_params && command_p.size() > cm->second->max_params) { /* |
