[MIRROR] Halves server file access cooldowns (#5812)
* Halves server file access cooldowns (#36139) * Lets me actually browse logs properly * admins get to spam harder * Halves server file access cooldowns
This commit is contained in:
committed by
Poojawa
parent
4b59a31a58
commit
1a4d8b94a1
@@ -35,6 +35,7 @@
|
||||
return path
|
||||
|
||||
#define FTPDELAY 200 //200 tick delay to discourage spam
|
||||
#define ADMIN_FTPDELAY_MODIFIER 0.5 //Admins get to spam files faster since we ~trust~ them!
|
||||
/* This proc is a failsafe to prevent spamming of file requests.
|
||||
It is just a timer that only permits a download every [FTPDELAY] ticks.
|
||||
This can be changed by modifying FTPDELAY's value above.
|
||||
@@ -45,9 +46,13 @@
|
||||
if(time_to_wait > 0)
|
||||
to_chat(src, "<font color='red'>Error: file_spam_check(): Spam. Please wait [DisplayTimeText(time_to_wait)].</font>")
|
||||
return 1
|
||||
GLOB.fileaccess_timer = world.time + FTPDELAY
|
||||
var/delay = FTPDELAY
|
||||
if(holder)
|
||||
delay *= ADMIN_FTPDELAY_MODIFIER
|
||||
GLOB.fileaccess_timer = world.time + delay
|
||||
return 0
|
||||
#undef FTPDELAY
|
||||
#undef ADMIN_FTPDELAY_MODIFIER
|
||||
|
||||
/proc/pathwalk(path)
|
||||
var/list/jobs = list(path)
|
||||
|
||||
Reference in New Issue
Block a user