Add interaction rate limits (#32527)

* Move PlayerRateLimitManager to shared

* Add interaction rate limits

* uncap tests
This commit is contained in:
Leon Friedrich
2024-09-30 01:19:00 +13:00
committed by GitHub
parent 6b49a510d1
commit f1f1fc1dc3
18 changed files with 277 additions and 164 deletions

View File

@@ -15,6 +15,7 @@ using Content.Shared.Administration;
using Content.Shared.CCVar;
using Content.Shared.GameTicking;
using Content.Shared.Mind;
using Content.Shared.Players.RateLimiting;
using JetBrains.Annotations;
using Robust.Server.Player;
using Robust.Shared;
@@ -104,12 +105,10 @@ namespace Content.Server.Administration.Systems
_rateLimit.Register(
RateLimitKey,
new RateLimitRegistration
{
CVarLimitPeriodLength = CCVars.AhelpRateLimitPeriod,
CVarLimitCount = CCVars.AhelpRateLimitCount,
PlayerLimitedAction = PlayerRateLimitedAction
});
new RateLimitRegistration(CCVars.AhelpRateLimitPeriod,
CCVars.AhelpRateLimitCount,
PlayerRateLimitedAction)
);
}
private void PlayerRateLimitedAction(ICommonSession obj)