Fixes world/Topic spam limiting (#16494)

This commit is contained in:
AffectedArc07
2021-08-11 15:37:37 -04:00
committed by GitHub
parent c91c6af382
commit ead4ca1324
4 changed files with 19 additions and 8 deletions
@@ -2,6 +2,8 @@
#define WORLD_TOPIC_LOCKOUT_TIME 1 MINUTES
/datum/world_topic_spam_prevention_handler
/// IP. Used purely for select purposes.
var/ip = null
/// Amount of strikes. [WORLD_TOPIC_STRIKES_THRESHOLD] strikes is a lockout of [WORLD_TOPIC_LOCKOUT_TIME]
var/strikes = 0
/// Time of last request
@@ -11,6 +13,9 @@
/// Unlock time
var/unlock_time = 0
/datum/world_topic_spam_prevention_handler/New(_ip)
ip = _ip
/**
* Lockout handler
*