mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Introduces max record length for record, converts uses of max book length to max paper length barring books
This commit is contained in:
@@ -91,8 +91,9 @@
|
|||||||
|
|
||||||
// Setting this much higher than 1024 could allow spammers to DOS the server easily.
|
// Setting this much higher than 1024 could allow spammers to DOS the server easily.
|
||||||
#define MAX_MESSAGE_LEN 1024
|
#define MAX_MESSAGE_LEN 1024
|
||||||
#define MAX_PAPER_MESSAGE_LEN 24576
|
#define MAX_PAPER_MESSAGE_LEN 6144
|
||||||
#define MAX_BOOK_MESSAGE_LEN 24576
|
#define MAX_BOOK_MESSAGE_LEN 24576
|
||||||
|
#define MAX_RECORD_LENGTH 24576
|
||||||
#define MAX_LNAME_LEN 64
|
#define MAX_LNAME_LEN 64
|
||||||
#define MAX_NAME_LEN 52
|
#define MAX_NAME_LEN 52
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
src << "Only administrators may use this command."
|
src << "Only administrators may use this command."
|
||||||
return
|
return
|
||||||
|
|
||||||
var/input = sanitize(input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg) as message|null, MAX_BOOK_MESSAGE_LEN, extra = 0)
|
var/input = sanitize(input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg) as message|null, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
||||||
if(!input || input == "")
|
if(!input || input == "")
|
||||||
custom_event_msg = null
|
custom_event_msg = null
|
||||||
log_admin("[usr.key] has cleared the custom event text.")
|
log_admin("[usr.key] has cleared the custom event text.")
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ var/global/list/uplink_locations = list("PDA", "Headset", "None")
|
|||||||
return TOPIC_REFRESH
|
return TOPIC_REFRESH
|
||||||
|
|
||||||
if(href_list["exploitable_record"])
|
if(href_list["exploitable_record"])
|
||||||
var/exploitmsg = sanitize(input(user,"Set exploitable information about you here.","Exploitable Information", html_decode(pref.exploit_record)) as message|null, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
var/exploitmsg = sanitize(input(user,"Set exploitable information about you here.","Exploitable Information", html_decode(pref.exploit_record)) as message|null, MAX_RECORD_LENGTH, extra = 0)
|
||||||
if(!isnull(exploitmsg) && !jobban_isbanned(user, "Records") && CanUseTopic(user))
|
if(!isnull(exploitmsg) && !jobban_isbanned(user, "Records") && CanUseTopic(user))
|
||||||
pref.exploit_record = exploitmsg
|
pref.exploit_record = exploitmsg
|
||||||
return TOPIC_REFRESH
|
return TOPIC_REFRESH
|
||||||
|
|||||||
@@ -115,19 +115,19 @@
|
|||||||
return TOPIC_REFRESH
|
return TOPIC_REFRESH
|
||||||
|
|
||||||
else if(href_list["set_medical_records"])
|
else if(href_list["set_medical_records"])
|
||||||
var/new_medical = sanitize(input(user,"Enter medical information here.","Character Preference", html_decode(pref.med_record)) as message|null, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
var/new_medical = sanitize(input(user,"Enter medical information here.","Character Preference", html_decode(pref.med_record)) as message|null, MAX_RECORD_LENGTH, extra = 0)
|
||||||
if(!isnull(new_medical) && !jobban_isbanned(user, "Records") && CanUseTopic(user))
|
if(!isnull(new_medical) && !jobban_isbanned(user, "Records") && CanUseTopic(user))
|
||||||
pref.med_record = new_medical
|
pref.med_record = new_medical
|
||||||
return TOPIC_REFRESH
|
return TOPIC_REFRESH
|
||||||
|
|
||||||
else if(href_list["set_general_records"])
|
else if(href_list["set_general_records"])
|
||||||
var/new_general = sanitize(input(user,"Enter employment information here.","Character Preference", html_decode(pref.gen_record)) as message|null, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
var/new_general = sanitize(input(user,"Enter employment information here.","Character Preference", html_decode(pref.gen_record)) as message|null, MAX_RECORD_LENGTH, extra = 0)
|
||||||
if(!isnull(new_general) && !jobban_isbanned(user, "Records") && CanUseTopic(user))
|
if(!isnull(new_general) && !jobban_isbanned(user, "Records") && CanUseTopic(user))
|
||||||
pref.gen_record = new_general
|
pref.gen_record = new_general
|
||||||
return TOPIC_REFRESH
|
return TOPIC_REFRESH
|
||||||
|
|
||||||
else if(href_list["set_security_records"])
|
else if(href_list["set_security_records"])
|
||||||
var/sec_medical = sanitize(input(user,"Enter security information here.","Character Preference", html_decode(pref.sec_record)) as message|null, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
var/sec_medical = sanitize(input(user,"Enter security information here.","Character Preference", html_decode(pref.sec_record)) as message|null, MAX_RECORD_LENGTH, extra = 0)
|
||||||
if(!isnull(sec_medical) && !jobban_isbanned(user, "Records") && CanUseTopic(user))
|
if(!isnull(sec_medical) && !jobban_isbanned(user, "Records") && CanUseTopic(user))
|
||||||
pref.sec_record = sec_medical
|
pref.sec_record = sec_medical
|
||||||
return TOPIC_REFRESH
|
return TOPIC_REFRESH
|
||||||
|
|||||||
@@ -134,7 +134,7 @@
|
|||||||
if(P.name != "Blank Card")
|
if(P.name != "Blank Card")
|
||||||
user << "You cannot write on that card."
|
user << "You cannot write on that card."
|
||||||
return
|
return
|
||||||
var/cardtext = sanitize(input(user, "What do you wish to write on the card?", "Card Editing") as text|null, MAX_BOOK_MESSAGE_LEN)
|
var/cardtext = sanitize(input(user, "What do you wish to write on the card?", "Card Editing") as text|null, MAX_PAPER_MESSAGE_LEN)
|
||||||
if(!cardtext)
|
if(!cardtext)
|
||||||
return
|
return
|
||||||
P.name = cardtext
|
P.name = cardtext
|
||||||
|
|||||||
Reference in New Issue
Block a user