summaryrefslogtreecommitdiff
path: root/src/commands/cmd_stats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/cmd_stats.cpp')
-rw-r--r--src/commands/cmd_stats.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/commands/cmd_stats.cpp b/src/commands/cmd_stats.cpp
index 60bb5b30e..d547635ed 100644
--- a/src/commands/cmd_stats.cpp
+++ b/src/commands/cmd_stats.cpp
@@ -420,7 +420,13 @@ void CommandStats::DoStats(char statschar, User* user, string_list &results)
CmdResult CommandStats::Handle (const std::vector<std::string>& parameters, User *user)
{
if (parameters.size() > 1 && parameters[1] != ServerInstance->Config->ServerName)
+ {
+ // Give extra penalty if a non-oper does /STATS <remoteserver>
+ LocalUser* localuser = IS_LOCAL(user);
+ if ((localuser) && (!IS_OPER(user)))
+ localuser->CommandFloodPenalty += 2000;
return CMD_SUCCESS;
+ }
string_list values;
char search = parameters[0][0];
DoStats(search, user, values);