Merge pull request #10951 from Citadel-Station-13/kevinz000-patch-10
fail2topic runtime fix
This commit is contained in:
@@ -31,15 +31,18 @@ SUBSYSTEM_DEF(fail2topic)
|
|||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/datum/controller/subsystem/fail2topic/fire()
|
/datum/controller/subsystem/fail2topic/fire()
|
||||||
for(var/i in 1 to length(rate_limiting))
|
if(length(rate_limiting))
|
||||||
var/ip = rate_limiting[i]
|
var/i = 1
|
||||||
var/last_attempt = rate_limiting[ip]
|
while(i <= length(rate_limiting))
|
||||||
if (world.time - last_attempt > rate_limit)
|
var/ip = rate_limiting[i]
|
||||||
rate_limiting -= ip
|
var/last_attempt = rate_limiting[ip]
|
||||||
fail_counts -= ip
|
if(world.time - last_attempt > rate_limit)
|
||||||
|
rate_limiting -= ip
|
||||||
if (MC_TICK_CHECK)
|
fail_counts -= ip
|
||||||
return
|
else //if we remove that, and the next element is in its place. check that instead of incrementing.
|
||||||
|
++i
|
||||||
|
if(MC_TICK_CHECK)
|
||||||
|
return
|
||||||
|
|
||||||
/datum/controller/subsystem/fail2topic/Shutdown()
|
/datum/controller/subsystem/fail2topic/Shutdown()
|
||||||
DropFirewallRule()
|
DropFirewallRule()
|
||||||
|
|||||||
Reference in New Issue
Block a user