[RCon]: Improve (#974)
This commit is contained in:
parent
4dd88de3a0
commit
82662a2088
@ -110,12 +110,6 @@ namespace Components
|
|||||||
bool RCon::RateLimitCheck(const Network::Address& address, const int time)
|
bool RCon::RateLimitCheck(const Network::Address& address, const int time)
|
||||||
{
|
{
|
||||||
const auto ip = address.getIP();
|
const auto ip = address.getIP();
|
||||||
|
|
||||||
if (!RateLimit.contains(ip.full))
|
|
||||||
{
|
|
||||||
RateLimit[ip.full] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto lastTime = RateLimit[ip.full];
|
const auto lastTime = RateLimit[ip.full];
|
||||||
|
|
||||||
if (lastTime && (time - lastTime) < RconTimeout.get<int>())
|
if (lastTime && (time - lastTime) < RconTimeout.get<int>())
|
||||||
|
Loading…
Reference in New Issue
Block a user