diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index c70cb76216..c829026ee0 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -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. /client/AllowUpload(filename, filelength) if(holder) - if(filelength > UPLOAD_LIMIT_ADMIN) - to_chat(src, "Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT_ADMIN/1024]KiB.") + if(filelength > CONFIG_GET(number/upload_limit_admin)) + to_chat(src, "Error: AllowUpload(): File Upload too large. Upload Limit: [CONFIG_GET(number/upload_limit_admin)/1024]KiB.") return FALSE - else if(filelength > UPLOAD_LIMIT) - to_chat(src, "Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT/1024]KiB.") + else if(filelength > CONFIG_GET(number/upload_limit)) + to_chat(src, "Error: AllowUpload(): File Upload too large. Upload Limit: [CONFIG_GET(number/upload_limit)/1024]KiB.") return FALSE return TRUE @@ -933,7 +933,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( add_verb(src, /client/proc/self_playtime) -#undef UPLOAD_LIMIT +//#undef UPLOAD_LIMIT //SPLURT EDIT //checks if a client is afk //3000 frames = 5 minutes diff --git a/config/splurt/server.txt b/config/splurt/server.txt index fad33e24c9..f6af4a7217 100644 --- a/config/splurt/server.txt +++ b/config/splurt/server.txt @@ -2,3 +2,11 @@ ## Minimum amount of votes the Continue option needs over Transfer in order for it to win ## ## Defaults to 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 diff --git a/modular_splurt/code/controllers/configuration/entries/splurt_server.dm b/modular_splurt/code/controllers/configuration/entries/splurt_server.dm index 64c1dcc915..810881a93e 100644 --- a/modular_splurt/code/controllers/configuration/entries/splurt_server.dm +++ b/modular_splurt/code/controllers/configuration/entries/splurt_server.dm @@ -1,3 +1,13 @@ /datum/config_entry/number/min_continue_votes config_entry_value = 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