diff --git a/code/WorkInProgress/computer3/computers/card.dm b/code/WorkInProgress/computer3/computers/card.dm index 5acb7c9de2..963b1f4de7 100644 --- a/code/WorkInProgress/computer3/computers/card.dm +++ b/code/WorkInProgress/computer3/computers/card.dm @@ -304,7 +304,7 @@ if(auth) var/t1 = href_list["assign"] if(t1 == "Custom") - var/temp_t = copytext(sanitize(input("Enter a custom job assignment.","Assignment")),1,MAX_MESSAGE_LEN) + var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,MAX_MESSAGE_LEN)) if(temp_t) t1 = temp_t set_default_access(t1) diff --git a/code/WorkInProgress/computer3/computers/communications.dm b/code/WorkInProgress/computer3/computers/communications.dm index f39c4c17fd..bb268ba0c0 100644 --- a/code/WorkInProgress/computer3/computers/communications.dm +++ b/code/WorkInProgress/computer3/computers/communications.dm @@ -178,10 +178,10 @@ post_status(href_list["statdisp"]) if("setmsg1" in href_list) - stat_msg1 = reject_bad_text(trim(copytext(sanitize(input("Line 1", "Enter Message Text", stat_msg1) as text|null), 1, 40)), 40) + stat_msg1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 1, 40)), 40)) computer.updateDialog() if("setmsg2" in href_list) - stat_msg2 = reject_bad_text(trim(copytext(sanitize(input("Line 2", "Enter Message Text", stat_msg2) as text|null), 1, 40)), 40) + stat_msg2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 1, 40)), 40)) computer.updateDialog() // OMG CENTCOMM LETTERHEAD diff --git a/code/WorkInProgress/computer3/computers/medical.dm b/code/WorkInProgress/computer3/computers/medical.dm index f7e6167e1d..0269eb7867 100644 --- a/code/WorkInProgress/computer3/computers/medical.dm +++ b/code/WorkInProgress/computer3/computers/medical.dm @@ -344,7 +344,7 @@ src.temp = text("Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
", src, src, src, src, src, src, src, src) if("b_dna") if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(sanitize(trim(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text)),1,MAX_MESSAGE_LEN) + var/t1 = sanitize(copytext(trim(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text),1,MAX_MESSAGE_LEN)) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["b_dna"] = t1 @@ -463,7 +463,7 @@ if (!( istype(src.active2, /datum/data/record) )) return var/a2 = src.active2 - var/t1 = copytext(sanitize(input("Add Comment:", "Med. records", null, null) as message),1,MAX_MESSAGE_LEN) + var/t1 = sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN)) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return var/counter = 1 diff --git a/code/WorkInProgress/computer3/computers/message.dm b/code/WorkInProgress/computer3/computers/message.dm index 3bbb580f5e..01be511bbf 100644 --- a/code/WorkInProgress/computer3/computers/message.dm +++ b/code/WorkInProgress/computer3/computers/message.dm @@ -383,7 +383,7 @@ //Enter message if("Message") custommessage = input(usr, "Please enter your message.") as text|null - custommessage = copytext(sanitize(custommessage), 1, MAX_MESSAGE_LEN) + custommessage = sanitize(copytext(custommessage, 1, MAX_MESSAGE_LEN)) //Send message if("Send") diff --git a/code/WorkInProgress/computer3/computers/prisoner.dm b/code/WorkInProgress/computer3/computers/prisoner.dm index f1df9b2a59..7b0c97d4ae 100644 --- a/code/WorkInProgress/computer3/computers/prisoner.dm +++ b/code/WorkInProgress/computer3/computers/prisoner.dm @@ -90,7 +90,7 @@ screen = !screen else if(href_list["warn"]) - var/warning = trim(copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN)) + var/warning = trim(sanitize(copytext(input(usr,"Message:","Enter your message here!",""),1,MAX_MESSAGE_LEN))) if(!warning) return var/obj/item/weapon/implant/I = locate(href_list["warn"]) if( istype(I) && I.imp_in) diff --git a/code/WorkInProgress/computer3/computers/security.dm b/code/WorkInProgress/computer3/computers/security.dm index 1c409da853..1894469a8b 100644 --- a/code/WorkInProgress/computer3/computers/security.dm +++ b/code/WorkInProgress/computer3/computers/security.dm @@ -404,7 +404,7 @@ What a mess.*/ if (!( istype(active2, /datum/data/record) )) return var/a2 = active2 - var/t1 = copytext(sanitize(input("Add Comment:", "Secure. records", null, null) as message),1,MAX_MESSAGE_LEN) + var/t1 = sanitize(copytext(input("Add Comment:", "Secure. records", null, null) as message,1,MAX_MESSAGE_LEN)) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return var/counter = 1 @@ -525,7 +525,7 @@ What a mess.*/ alert(usr, "You do not have the required rank to do this!") if("species") if (istype(active1, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message),1,MAX_MESSAGE_LEN) + var/t1 = sanitize(copytext(input("Please enter race:", "General records", active1.fields["species"], null) as message,1,MAX_MESSAGE_LEN)) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1)) return active1.fields["species"] = t1 diff --git a/code/WorkInProgress/kilakk/responseteam.dm b/code/WorkInProgress/kilakk/responseteam.dm index 8e0cdbc638..165e2db150 100644 --- a/code/WorkInProgress/kilakk/responseteam.dm +++ b/code/WorkInProgress/kilakk/responseteam.dm @@ -32,7 +32,7 @@ var/global/admin_emergency_team = 0 // Used for admin-spawned response teams var/situation = null while(!situation) - situation = copytext(sanitize(input(src, "Please specify the mission the emergency response team will undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN) + situation = sanitize(copytext(input(src, "Please specify the mission the emergency response team will undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN)) if(!situation) if(alert("You haven't specified a mission. Exit the setup process?",,"No","Yes")=="Yes") return diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index e3c9ff8c86..49863e8c4b 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -427,7 +427,7 @@ client usr << "This can only be used on instances of type /mob" return - var/new_name = copytext(sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null),1,MAX_NAME_LEN) + var/new_name = sanitize(copytext(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null,1,MAX_NAME_LEN)) if( !new_name || !M ) return message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].") diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 5ac4ca53dd..bd401c2417 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -362,7 +362,7 @@ datum/mind assigned_role = new_role else if (href_list["memory_edit"]) - var/new_memo = copytext(sanitize(input("Write new memory", "Memory", memory) as null|message),1,MAX_MESSAGE_LEN) + var/new_memo = sanitize(copytext(input("Write new memory", "Memory", memory) as null|message,1,MAX_MESSAGE_LEN)) if (isnull(new_memo)) return memory = new_memo @@ -473,7 +473,7 @@ datum/mind new_objective.target_amount = target_number if ("custom") - var/expl = copytext(sanitize(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null),1,MAX_MESSAGE_LEN) + var/expl = sanitize(copytext(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null,1,MAX_MESSAGE_LEN)) if (!expl) return new_objective = new /datum/objective new_objective.owner = src diff --git a/code/game/gamemodes/events/space_ninja.dm b/code/game/gamemodes/events/space_ninja.dm index 195b9ff5b9..6136197a66 100644 --- a/code/game/gamemodes/events/space_ninja.dm +++ b/code/game/gamemodes/events/space_ninja.dm @@ -472,7 +472,7 @@ As such, it's hard-coded for now. No reason for it not to be, really. var/mission while(!mission) - mission = copytext(sanitize(input(src, "Please specify which mission the space ninja shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN) + mission = sanitize(copytext(input(src, "Please specify which mission the space ninja shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN)) if(!mission) if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes") return diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 452fd347d8..534383867e 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -537,7 +537,7 @@ datum/objective/steal var/tmp_obj = new custom_target var/custom_name = tmp_obj:name del(tmp_obj) - custom_name = copytext(sanitize(input("Enter target name:", "Objective target", custom_name) as text|null),1,MAX_MESSAGE_LEN) + custom_name = sanitize(copytext(input("Enter target name:", "Objective target", custom_name) as text|null,1,MAX_MESSAGE_LEN)) if (!custom_name) return target_name = custom_name steal_target = custom_target diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index b79fe4ba30..ab3806a97c 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -120,7 +120,7 @@ var/wizard_name_second = pick(wizard_second) var/randomname = "[wizard_name_first] [wizard_name_second]" spawn(0) - var/newname = copytext(sanitize(input(wizard_mob, "You are the Space Wizard. Would you like to change your name to something else?", "Name change", randomname) as null|text),1,MAX_NAME_LEN) + var/newname = sanitize(copytext(input(wizard_mob, "You are the Space Wizard. Would you like to change your name to something else?", "Name change", randomname) as null|text,1,MAX_NAME_LEN)) if (!newname) newname = randomname diff --git a/code/game/jobs/job/civilian_chaplain.dm b/code/game/jobs/job/civilian_chaplain.dm index 34fe340a12..e7ce82b595 100644 --- a/code/game/jobs/job/civilian_chaplain.dm +++ b/code/game/jobs/job/civilian_chaplain.dm @@ -27,7 +27,7 @@ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) spawn(0) var/religion_name = "Christianity" - var/new_religion = copytext(sanitize(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name)),1,MAX_NAME_LEN) + var/new_religion = sanitize(copytext(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name),1,MAX_NAME_LEN)) if (!new_religion) new_religion = religion_name @@ -62,7 +62,7 @@ spawn(1) var/deity_name = "Space Jesus" - var/new_deity = copytext(sanitize(input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name)),1,MAX_NAME_LEN) + var/new_deity = sanitize(copytext(input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name),1,MAX_NAME_LEN)) if ((length(new_deity) == 0) || (new_deity == "Space Jesus") ) new_deity = deity_name diff --git a/code/game/machinery/bots/farmbot.dm b/code/game/machinery/bots/farmbot.dm index 1c0bd0875f..4db416e7a6 100644 --- a/code/game/machinery/bots/farmbot.dm +++ b/code/game/machinery/bots/farmbot.dm @@ -583,7 +583,7 @@ else if(istype(W, /obj/item/weapon/pen)) var/t = input(user, "Enter new robot name", src.name, src.created_name) as text - t = copytext(sanitize(t), 1, MAX_NAME_LEN) + t = sanitize(copytext(t, 1, MAX_NAME_LEN)) if (!t) return if (!in_range(src, usr) && src.loc != usr) diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index e7f766a5b4..d130f9e2e4 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -309,7 +309,7 @@ if("setid") refresh=0 - var/new_id = copytext(sanitize(input("Enter new bot ID", "Mulebot [suffix ? "([suffix])" : ""]", suffix) as text|null),1,MAX_NAME_LEN) + var/new_id = sanitize(copytext(input("Enter new bot ID", "Mulebot [suffix ? "([suffix])" : ""]", suffix) as text|null,1,MAX_NAME_LEN)) refresh=1 if(new_id) suffix = new_id diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index 0cad72b934..52d74a23b9 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -50,7 +50,7 @@ set name = "Store Camera Location" set desc = "Stores your current camera location by the given name" - loc = copytext(sanitize(loc), 1, MAX_MESSAGE_LEN) + loc = sanitize(copytext(loc, 1, MAX_MESSAGE_LEN)) if(!loc) src << "\red Must supply a location name" return diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index fddc863575..be5a73d90f 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -191,7 +191,7 @@ if (is_authenticated() && modify) var/t1 = href_list["assign_target"] if(t1 == "Custom") - var/temp_t = copytext(sanitize(input("Enter a custom job assignment.","Assignment")),1,45) + var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,45)) //let custom jobs function as an impromptu alt title, mainly for sechuds if(temp_t && modify) modify.assignment = temp_t diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 5285235fbf..f18d906383 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -175,10 +175,10 @@ post_status(href_list["statdisp"]) if("setmsg1") - stat_msg1 = reject_bad_text(trim(copytext(sanitize(input("Line 1", "Enter Message Text", stat_msg1) as text|null), 1, 40)), 40) + stat_msg1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 1, 40))), 40) src.updateDialog() if("setmsg2") - stat_msg2 = reject_bad_text(trim(copytext(sanitize(input("Line 2", "Enter Message Text", stat_msg2) as text|null), 1, 40)), 40) + stat_msg2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 1, 40))), 40) src.updateDialog() // OMG CENTCOMM LETTERHEAD @@ -496,12 +496,12 @@ return emergency_shuttle.call_transfer() - + //delay events in case of an autotransfer if (isnull(user)) event_manager.delay_events(EVENT_LEVEL_MODERATE, 9000) //15 minutes - event_manager.delay_events(EVENT_LEVEL_MAJOR, 9000) - + event_manager.delay_events(EVENT_LEVEL_MAJOR, 9000) + log_game("[user? key_name(user) : "Autotransfer"] has called the shuttle.") message_admins("[user? key_name_admin(user) : "Autotransfer"] has called the shuttle.", 1) diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index 8cdd7f10fe..a30f355d2a 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -430,7 +430,7 @@ //Enter message if("Message") custommessage = input(usr, "Please enter your message.") as text|null - custommessage = copytext(sanitize(custommessage), 1, MAX_MESSAGE_LEN) + custommessage = sanitize(copytext(custommessage, 1, MAX_MESSAGE_LEN)) //Send message if("Send") diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index cdbdfe048f..00e7554727 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -90,7 +90,7 @@ usr << "Unauthorized Access." else if(href_list["warn"]) - var/warning = copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN) + var/warning = sanitize(copytext(input(usr,"Message:","Enter your message here!",""),1,MAX_MESSAGE_LEN)) if(!warning) return var/obj/item/weapon/implant/I = locate(href_list["warn"]) if((I)&&(I.imp_in)) diff --git a/code/game/machinery/computer/supply.dm b/code/game/machinery/computer/supply.dm index fe109c4771..9f69c7bc1c 100644 --- a/code/game/machinery/computer/supply.dm +++ b/code/game/machinery/computer/supply.dm @@ -85,7 +85,7 @@ if(!istype(P)) return var/timeout = world.time + 600 - var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text),1,MAX_MESSAGE_LEN) + var/reason = sanitize(copytext(input(usr,"Reason:","Why do you require this item?","") as null|text,1,MAX_MESSAGE_LEN)) if(world.time > timeout) return if(!reason) return @@ -289,7 +289,7 @@ if(!istype(P)) return var/timeout = world.time + 600 - var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text),1,MAX_MESSAGE_LEN) + var/reason = sanitize(copytext(input(usr,"Reason:","Why do you require this item?","") as null|text,1,MAX_MESSAGE_LEN)) if(world.time > timeout) return if(!reason) return diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index a2dd432d99..8569ede3fd 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -323,7 +323,7 @@ if(speed <= 0) speed = 1 if("setpath") - var/newpath = copytext(sanitize(input(usr, "Please define a new path!",,path) as text|null),1,MAX_MESSAGE_LEN) + var/newpath = sanitize(copytext(input(usr, "Please define a new path!",,path) as text|null,1,MAX_MESSAGE_LEN)) if(newpath && newpath != "") moving = 0 // stop moving path = newpath diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 16e1cc032d..56fcd1298e 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -194,7 +194,7 @@ Transponder Codes: