X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_rules.cpp;h=7aacf8c31262be7cf17f1e204a6e7ceda6e2ea99;hb=ad8625919378ffbdbf0993d56e16a75a47c4715e;hp=5d41aa4b8db8e335cc97675d07e41dd59277dba7;hpb=553a8da754c8cd308bad2008018849714e70f9b7;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_rules.cpp b/src/commands/cmd_rules.cpp index 5d41aa4b8..7aacf8c31 100644 --- a/src/commands/cmd_rules.cpp +++ b/src/commands/cmd_rules.cpp @@ -49,9 +49,15 @@ class CommandRules : public Command CmdResult CommandRules::Handle (const std::vector& parameters, User *user) { if (parameters.size() > 0 && parameters[0] != ServerInstance->Config->ServerName) + { + // Give extra penalty if a non-oper queries the /RULES of a remote server + LocalUser* localuser = IS_LOCAL(user); + if ((localuser) && (!IS_OPER(user))) + localuser->CommandFloodPenalty += 2000; return CMD_SUCCESS; + } - ConfigTag* tag = NULL; + ConfigTag* tag = ServerInstance->Config->EmptyTag; if (IS_LOCAL(user)) tag = user->GetClass()->config; std::string rules_name = tag->getString("rules", "rules");