[RCon]: Improve (#974)

This commit is contained in:
Edo 2023-04-26 10:58:53 +01:00 committed by GitHub
parent 4dd88de3a0
commit 82662a2088
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,12 +110,6 @@ namespace Components
bool RCon::RateLimitCheck(const Network::Address& address, const int time)
{
const auto ip = address.getIP();
if (!RateLimit.contains(ip.full))
{
RateLimit[ip.full] = 0;
}
const auto lastTime = RateLimit[ip.full];
if (lastTime && (time - lastTime) < RconTimeout.get<int>())