rcon: address review

This commit is contained in:
Edo 2023-04-26 10:47:40 +01:00 committed by GitHub
parent 3a8e096657
commit 1a34eb44c0

View File

@ -57,11 +57,6 @@ namespace rcon
bool rate_limit_check(const game::netadr_t& address, const int time) bool rate_limit_check(const game::netadr_t& address, const int time)
{ {
if (!rate_limit_map.contains(address))
{
rate_limit_map[address] = 0;
}
const auto last_time = rate_limit_map[address]; const auto last_time = rate_limit_map[address];
if (last_time && (time - last_time) < rcon_timeout->current.value.integer) if (last_time && (time - last_time) < rcon_timeout->current.value.integer)