From 1a4d8b94a1342126e807c894839c8e2da43b40a8 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Mon, 5 Mar 2018 12:29:50 -0600 Subject: [PATCH] [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 --- code/__HELPERS/files.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/__HELPERS/files.dm b/code/__HELPERS/files.dm index f515668dfb..7f0b5a3c07 100644 --- a/code/__HELPERS/files.dm +++ b/code/__HELPERS/files.dm @@ -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, "Error: file_spam_check(): Spam. Please wait [DisplayTimeText(time_to_wait)].") 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)