/* 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->IncreasePenalty(cm != cmdlist.end() ? cm->second->Penalty : 2);
+ do_more = (user->Penalty < 10);
+ }
+
+
if (cm == cmdlist.end())
{
int MOD_RESULT = 0;
if (MOD_RESULT == 1)
return true;
- /* Modify the user's penalty */
- bool do_more = true;
- if (!user->HasPrivPermission("users/flood/no-throttle"))
- {
- user->IncreasePenalty(cm->second->Penalty);
- do_more = (user->Penalty < 10);
- }
-
/* activity resets the ping pending timer */
if (user->MyClass)
user->nping = ServerInstance->Time() + user->MyClass->GetPingTime();
if (ServerInstance->Parser->ReloadCommand(parameters[0], user))
{
user->WriteServ("NOTICE %s :*** Successfully reloaded command '%s'", user->nick.c_str(), parameters[0].c_str());
- ServerInstance->SNO->WriteToSnoMask('A', "RELOAD: %s reloaded the '%s' command.", user->nick.c_str(), parameters[0].c_str());
+ ServerInstance->SNO->WriteToSnoMask('a', "RELOAD: %s reloaded the '%s' command.", user->nick.c_str(), parameters[0].c_str());
return CMD_SUCCESS;
}
else