mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
file limits
because we don't need even more lag
This commit is contained in:
@@ -225,11 +225,11 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
|||||||
//This stops files larger than UPLOAD_LIMIT being sent from client to server via input(), client.Import() etc.
|
//This stops files larger than UPLOAD_LIMIT being sent from client to server via input(), client.Import() etc.
|
||||||
/client/AllowUpload(filename, filelength)
|
/client/AllowUpload(filename, filelength)
|
||||||
if(holder)
|
if(holder)
|
||||||
if(filelength > UPLOAD_LIMIT_ADMIN)
|
if(filelength > CONFIG_GET(number/upload_limit_admin))
|
||||||
to_chat(src, "<font color='red'>Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT_ADMIN/1024]KiB.</font>")
|
to_chat(src, "<font color='red'>Error: AllowUpload(): File Upload too large. Upload Limit: [CONFIG_GET(number/upload_limit_admin)/1024]KiB.</font>")
|
||||||
return FALSE
|
return FALSE
|
||||||
else if(filelength > UPLOAD_LIMIT)
|
else if(filelength > CONFIG_GET(number/upload_limit))
|
||||||
to_chat(src, "<font color='red'>Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT/1024]KiB.</font>")
|
to_chat(src, "<font color='red'>Error: AllowUpload(): File Upload too large. Upload Limit: [CONFIG_GET(number/upload_limit)/1024]KiB.</font>")
|
||||||
return FALSE
|
return FALSE
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
@@ -933,7 +933,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
|||||||
add_verb(src, /client/proc/self_playtime)
|
add_verb(src, /client/proc/self_playtime)
|
||||||
|
|
||||||
|
|
||||||
#undef UPLOAD_LIMIT
|
//#undef UPLOAD_LIMIT //SPLURT EDIT
|
||||||
|
|
||||||
//checks if a client is afk
|
//checks if a client is afk
|
||||||
//3000 frames = 5 minutes
|
//3000 frames = 5 minutes
|
||||||
|
|||||||
@@ -2,3 +2,11 @@
|
|||||||
## Minimum amount of votes the Continue option needs over Transfer in order for it to win ##
|
## Minimum amount of votes the Continue option needs over Transfer in order for it to win ##
|
||||||
## Defaults to 1 ##
|
## Defaults to 1 ##
|
||||||
#MIN_CONTINUE_VOTES 1
|
#MIN_CONTINUE_VOTES 1
|
||||||
|
|
||||||
|
# User upload limit #
|
||||||
|
## Max size player uploads can have. Default is 0.5 MB
|
||||||
|
#@UPLOAD_LIMIT 524288
|
||||||
|
|
||||||
|
# Admin upload limit #
|
||||||
|
## Max size admin uploads can have. Default is 5.0 MB
|
||||||
|
#@UPLOAD_LIMIT_ADMIN 5242880
|
||||||
|
|||||||
@@ -1,3 +1,13 @@
|
|||||||
/datum/config_entry/number/min_continue_votes
|
/datum/config_entry/number/min_continue_votes
|
||||||
config_entry_value = 1
|
config_entry_value = 1
|
||||||
min_val = 1
|
min_val = 1
|
||||||
|
|
||||||
|
/datum/config_entry/number/upload_limit
|
||||||
|
protection = CONFIG_ENTRY_LOCKED
|
||||||
|
integer = FALSE
|
||||||
|
config_entry_value = UPLOAD_LIMIT
|
||||||
|
|
||||||
|
/datum/config_entry/number/upload_limit_admin
|
||||||
|
protection = CONFIG_ENTRY_LOCKED
|
||||||
|
integer = FALSE
|
||||||
|
config_entry_value = UPLOAD_LIMIT_ADMIN
|
||||||
|
|||||||
Reference in New Issue
Block a user