Merge remote-tracking branch 'upstream/dev' into NarsiePort

Conflicts:
	code/modules/mob/living/carbon/human/say.dm
This commit is contained in:
PsiOmega
2015-03-29 12:55:23 +02:00
160 changed files with 1568 additions and 1558 deletions

View File

@@ -52,7 +52,7 @@
// Choose a name, if any.
if(flags & ANTAG_CHOOSE_NAME)
spawn(5)
var/newname = sanitize(copytext(input(player.current, "You are a [role_text]. Would you like to change your name to something else?", "Name change") as null|text,1,MAX_NAME_LEN))
var/newname = sanitize(input(player.current, "You are a [role_text]. Would you like to change your name to something else?", "Name change") as null|text, MAX_NAME_LEN)
if (newname)
player.current.real_name = newname
player.current.name = player.current.real_name

View File

@@ -737,7 +737,7 @@
if (bufferOption == "changeLabel")
var/datum/dna2/record/buf = src.buffers[bufferId]
var/text = sanitize(copytext(input(usr, "New Label:", "Edit Label", buf.name) as text|null, 1, MAX_NAME_LEN))
var/text = sanitize(input(usr, "New Label:", "Edit Label", buf.name) as text|null, MAX_NAME_LEN)
buf.name = text
src.buffers[bufferId] = buf
return 1

View File

@@ -657,7 +657,7 @@ var/list/datum/dna/hivemind_bank = list()
src << "<span class='notice'>We return our vocal glands to their original location.</span>"
return
var/mimic_voice = stripped_input(usr, "Enter a name to mimic.", "Mimic Voice", null, MAX_NAME_LEN)
var/mimic_voice = sanitize(input(usr, "Enter a name to mimic.", "Mimic Voice", null), MAX_NAME_LEN)
if(!mimic_voice)
return

View File

@@ -564,7 +564,7 @@ var/list/sacrificed = list()
// returns 0 if the rune is not used. returns 1 if the rune is used.
communicate()
. = 1 // Default output is 1. If the rune is deleted it will return 1
var/input = stripped_input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "")
var/input = sanitize(input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", ""))
if(!input)
if (istype(src))
fizzle()

View File

@@ -69,7 +69,7 @@ var/global/list/additional_antag_types = list()
new/datum/uplink_item(/obj/item/ammo_magazine/a357, 2, ".357", "RA"),
new/datum/uplink_item(/obj/item/ammo_magazine/mc9mm, 2, "9mm", "R9"),
new/datum/uplink_item(/obj/item/ammo_magazine/chemdart, 2, "Darts", "AD"),
new/datum/uplink_item(/obj/item/weapon/storage/box/sniperammo, 4, "14.5mm", "SA")
new/datum/uplink_item(/obj/item/weapon/storage/box/sniperammo, 2, "14.5mm", "SA")
),
"Highly Visible and Dangerous Weapons" = list(
new/datum/uplink_item(/obj/item/weapon/storage/box/emps, 3, "5 EMP Grenades", "EM"),
@@ -80,7 +80,7 @@ var/global/list/additional_antag_types = list()
new/datum/uplink_item(/obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, 6, "Exosuit Rigged Laser", "RL"),
new/datum/uplink_item(/obj/item/weapon/gun/projectile/revolver, 6, "Revolver", "RE"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndicate, 10, "Mercenary Bundle", "BU"),
new/datum/uplink_item(/obj/item/weapon/gun/projectile/heavysniper, 12, "PTRS Rifle", "BU")
new/datum/uplink_item(/obj/item/weapon/gun/projectile/heavysniper, 12, "Anti-materiel Rifle", "AMR")
),
"Stealthy and Inconspicuous Weapons" = list(
new/datum/uplink_item(/obj/item/weapon/soap/syndie, 1, "Subversive Soap", "SP"),

View File

@@ -536,7 +536,7 @@ datum/objective/steal
var/tmp_obj = new custom_target
var/custom_name = tmp_obj:name
del(tmp_obj)
custom_name = sanitize(copytext(input("Enter target name:", "Objective target", custom_name) as text|null,1,MAX_MESSAGE_LEN))
custom_name = sanitize(input("Enter target name:", "Objective target", custom_name) as text|null)
if (!custom_name) return
target_name = custom_name
steal_target = custom_target

View File

@@ -28,7 +28,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 = 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))
var/new_religion = 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), MAX_NAME_LEN)
if (!new_religion)
new_religion = religion_name
@@ -63,7 +63,7 @@
spawn(1)
var/deity_name = "Space Jesus"
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))
var/new_deity = sanitize(input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name), MAX_NAME_LEN)
if ((length(new_deity) == 0) || (new_deity == "Space Jesus") )
new_deity = deity_name

View File

@@ -332,6 +332,12 @@
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_arifle
name = "ammunition (7.62mm)"
path = /obj/item/ammo_magazine/c762
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_smg
name = "ammunition (9mm top mounted)"
path = /obj/item/ammo_magazine/mc9mmt
@@ -339,7 +345,7 @@
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_carbine
name = "ammunition (5.56)"
name = "ammunition (5.56mm)"
path = /obj/item/ammo_magazine/a556
hidden = 1
category = "Arms and Ammunition"

View File

@@ -355,7 +355,7 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
del(src)
else if (istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)

View File

@@ -58,7 +58,7 @@
..()
if(istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if(!t) return
if(!in_range(src, usr) && src.loc != usr) return
created_name = t

View File

@@ -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 = sanitize(copytext(t, 1, MAX_NAME_LEN))
t = sanitize(t, MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)

View File

@@ -420,7 +420,7 @@
del(src)
else if (istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)
@@ -439,7 +439,7 @@
user.drop_from_inventory(src)
del(src)
else if (istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name)
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if (!t)
return

View File

@@ -564,7 +564,7 @@
/obj/item/weapon/firstaid_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)

View File

@@ -307,7 +307,7 @@
if("setid")
refresh=0
var/new_id = sanitize(copytext(input("Enter new bot ID", "Mulebot [suffix ? "([suffix])" : ""]", suffix) as text|null,1,MAX_NAME_LEN))
var/new_id = sanitize(input("Enter new bot ID", "Mulebot [suffix ? "([suffix])" : ""]", suffix) as text|null, MAX_NAME_LEN)
refresh=1
if(new_id)
suffix = new_id

View File

@@ -838,7 +838,7 @@ Auto Patrol: []"},
del(src)
else if(istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if(!t)
return
if(!in_range(src, usr) && src.loc != usr)

View File

@@ -78,7 +78,7 @@
if(isscrewdriver(W))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
var/input = strip_html(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13"))
var/input = sanitize(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13"))
if(!input)
usr << "No input found please hang up and try your call again."
return
@@ -90,7 +90,7 @@
var/area/camera_area = get_area(src)
var/temptag = "[sanitize(camera_area.name)] ([rand(1, 999)])"
input = strip_html(input(usr, "How would you like to name the camera?", "Set Camera Name", temptag))
input = sanitizeSafe(input(usr, "How would you like to name the camera?", "Set Camera Name", temptag))
state = 4
var/obj/machinery/camera/C = new(src.loc)

View File

@@ -47,7 +47,7 @@
set name = "Store Camera Location"
set desc = "Stores your current camera location by the given name"
loc = sanitize(copytext(loc, 1, MAX_MESSAGE_LEN))
loc = sanitize(loc)
if(!loc)
src << "\red Must supply a location name"
return
@@ -213,7 +213,7 @@
mob/living/proc/near_camera()
if (!isturf(loc))
return 0
else if(!cameranet.checkCameraVis(src))
else if(!cameranet.checkVis(src))
return 0
return 1

View File

@@ -191,7 +191,7 @@
if (is_authenticated() && modify)
var/t1 = href_list["assign_target"]
if(t1 == "Custom")
var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,45))
var/temp_t = sanitize(input("Enter a custom job assignment.","Assignment"), 45)
//let custom jobs function as an impromptu alt title, mainly for sechuds
if(temp_t && modify)
modify.assignment = temp_t
@@ -222,7 +222,7 @@
if (is_authenticated())
var/t2 = modify
if ((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
var/temp_name = reject_bad_name(href_list["reg"])
var/temp_name = sanitizeName(href_list["reg"])
if(temp_name)
modify.registered_name = temp_name
else

View File

@@ -175,10 +175,10 @@
post_status(href_list["statdisp"])
if("setmsg1")
stat_msg1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 1, 40))), 40)
stat_msg1 = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 40), 40)
src.updateDialog()
if("setmsg2")
stat_msg2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 1, 40))), 40)
stat_msg2 = reject_bad_text(sanitize(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 40), 40)
src.updateDialog()
// OMG CENTCOMM LETTERHEAD
@@ -187,7 +187,7 @@
if(centcomm_message_cooldown)
usr << "\red Arrays recycling. Please stand by."
return
var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")
var/input = sanitize(input("Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", ""))
if(!input || !(usr in view(1,src)))
return
Centcomm_announce(input, usr)
@@ -204,7 +204,7 @@
if(centcomm_message_cooldown)
usr << "\red Arrays recycling. Please stand by."
return
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")
var/input = sanitize(input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", ""))
if(!input || !(usr in view(1,src)))
return
Syndicate_announce(input, usr)

View File

@@ -114,11 +114,11 @@
if (href_list["choice"])
switch(href_list["choice"])
if ("giv_name")
var/nam = strip_html_simple(input("Person pass is issued to", "Name", giv_name) as text|null)
var/nam = sanitize(input("Person pass is issued to", "Name", giv_name) as text|null)
if (nam)
giv_name = nam
if ("reason")
var/reas = strip_html_simple(input("Reason why pass is issued", "Reason", reason) as text|null)
var/reas = sanitize(input("Reason why pass is issued", "Reason", reason) as text|null)
if(reas)
reason = reas
if ("duration")

View File

@@ -250,7 +250,7 @@
switch(href_list["field"])
if("fingerprint")
if (istype(src.active1, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
src.active1.fields["fingerprint"] = t1
@@ -268,55 +268,55 @@
src.active1.fields["age"] = t1
if("mi_dis")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis"] = t1
if("mi_dis_d")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis_d"] = t1
if("ma_dis")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis"] = t1
if("ma_dis_d")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis_d"] = t1
if("alg")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg"] = t1
if("alg_d")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg_d"] = t1
if("cdi")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi"] = t1
if("cdi_d")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi_d"] = t1
if("notes")
if (istype(src.active2, /datum/data/record))
var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message, extra = 0)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["notes"] = t1
@@ -331,21 +331,21 @@
src.temp = text("<B>Blood Type:</B><BR>\n\t<A href='?src=\ref[];temp=1;b_type=an'>A-</A> <A href='?src=\ref[];temp=1;b_type=ap'>A+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=bn'>B-</A> <A href='?src=\ref[];temp=1;b_type=bp'>B+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=abn'>AB-</A> <A href='?src=\ref[];temp=1;b_type=abp'>AB+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=on'>O-</A> <A href='?src=\ref[];temp=1;b_type=op'>O+</A><BR>", src, src, src, src, src, src, src, src)
if("b_dna")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["b_dna"] = t1
if("vir_name")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
var/t1 = trim(sanitize(copytext(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["name"] = t1
if("vir_desc")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
var/t1 = trim(sanitize(copytext(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["description"] = t1
@@ -450,7 +450,7 @@
if (!( istype(src.active2, /datum/data/record) ))
return
var/a2 = src.active2
var/t1 = trim(sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Add Comment:", "Med. records", null, null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
var/counter = 1

View File

@@ -409,7 +409,7 @@
//Select Your Name
if("Sender")
customsender = input(usr, "Please enter the sender's name.") as text|null
customsender = sanitize(input(usr, "Please enter the sender's name.") as text|null)
//Select Receiver
if("Recepient")
@@ -425,12 +425,12 @@
//Enter custom job
if("RecJob")
customjob = input(usr, "Please enter the sender's job.") as text|null
customjob = sanitize(input(usr, "Please enter the sender's job.") as text|null)
//Enter message
if("Message")
custommessage = input(usr, "Please enter your message.") as text|null
custommessage = sanitize(copytext(custommessage, 1, MAX_MESSAGE_LEN))
custommessage = sanitize(custommessage)
//Send message
if("Send")

View File

@@ -90,7 +90,7 @@
usr << "Unauthorized Access."
else if(href_list["warn"])
var/warning = sanitize(copytext(input(usr,"Message:","Enter your message here!",""),1,MAX_MESSAGE_LEN))
var/warning = sanitize(input(usr,"Message:","Enter your message here!",""))
if(!warning) return
var/obj/item/weapon/implant/I = locate(href_list["warn"])
if((I)&&(I.imp_in))

View File

@@ -384,7 +384,7 @@ What a mess.*/
if (!( istype(active2, /datum/data/record) ))
return
var/a2 = active2
var/t1 = trim(sanitize(copytext(input("Add Comment:", "Secure. records", null, null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Add Comment:", "Secure. records", null, null) as message)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
var/counter = 1
@@ -426,19 +426,19 @@ What a mess.*/
switch(href_list["field"])
if("name")
if (istype(active1, /datum/data/record))
var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
var/t1 = sanitizeName(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
if (!t1 || active1 != a1)
return
active1.fields["name"] = t1
if("id")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input id:", "Secure. records", active1.fields["id"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)
if (!t1 || active1 != a1)
return
active1.fields["id"] = t1
if("fingerprint")
if (istype(active1, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)
if (!t1 || active1 != a1)
return
active1.fields["fingerprint"] = t1
@@ -456,31 +456,31 @@ What a mess.*/
active1.fields["age"] = t1
if("mi_crim")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text)
if (!t1 || active2 != a2)
return
active2.fields["mi_crim"] = t1
if("mi_crim_d")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message)
if (!t1 || active2 != a2)
return
active2.fields["mi_crim_d"] = t1
if("ma_crim")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text)
if (!t1 || active2 != a2)
return
active2.fields["ma_crim"] = t1
if("ma_crim_d")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message)
if (!t1 || active2 != a2)
return
active2.fields["ma_crim_d"] = t1
if("notes")
if (istype(active2, /datum/data/record))
var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message, extra = 0)
if (!t1 || active2 != a2)
return
active2.fields["notes"] = t1
@@ -507,7 +507,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 = trim(sanitize(copytext(input("Please enter race:", "General records", active1.fields["species"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)
if (!t1 || active1 != a1)
return
active1.fields["species"] = t1

View File

@@ -309,19 +309,19 @@ What a mess.*/
switch(href_list["field"])
if("name")
if (istype(active1, /datum/data/record))
var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
var/t1 = sanitizeName(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon)))) || active1 != a1)
return
active1.fields["name"] = t1
if("id")
if (istype(active1, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input id:", "Secure. records", active1.fields["id"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["id"] = t1
if("fingerprint")
if (istype(active1, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["fingerprint"] = t1
@@ -350,7 +350,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 = trim(sanitize(copytext(input("Please enter race:", "General records", active1.fields["species"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["species"] = t1

View File

@@ -85,7 +85,7 @@
if(!istype(P)) return
var/timeout = world.time + 600
var/reason = sanitize(copytext(input(usr,"Reason:","Why do you require this item?","") as null|text,1,MAX_MESSAGE_LEN))
var/reason = sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text)
if(world.time > timeout) return
if(!reason) return
@@ -289,7 +289,7 @@
if(!istype(P)) return
var/timeout = world.time + 600
var/reason = sanitize(copytext(input(usr,"Reason:","Why do you require this item?","") as null|text,1,MAX_MESSAGE_LEN))
var/reason = sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text)
if(world.time > timeout) return
if(!reason) return

View File

@@ -304,7 +304,7 @@
if(auth)
var/t1 = href_list["assign"]
if(t1 == "Custom")
var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,MAX_MESSAGE_LEN))
var/temp_t = sanitize(input("Enter a custom job assignment.","Assignment"))
if(temp_t)
t1 = temp_t
set_default_access(t1)

View File

@@ -178,10 +178,10 @@
post_status(href_list["statdisp"])
if("setmsg1" in href_list)
stat_msg1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 1, 40)), 40))
stat_msg1 = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 40), 40)
computer.updateDialog()
if("setmsg2" in href_list)
stat_msg2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 1, 40)), 40))
stat_msg2 = reject_bad_text(sanitize(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 40), 40)
computer.updateDialog()
// OMG CENTCOMM LETTERHEAD
@@ -192,7 +192,7 @@
if(centcomm_message_cooldown)
usr << "Arrays recycling. Please stand by."
return
var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
var/input = sanitize(input("Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", ""))
if(!input || !interactable())
return
Centcomm_announce(input, usr)
@@ -209,7 +209,7 @@
if(centcomm_message_cooldown)
usr << "Arrays recycling. Please stand by."
return
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
var/input = sanitize(input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", ""))
if(!input || !interactable())
return
Syndicate_announce(input, usr)

View File

@@ -92,7 +92,7 @@
var/icon/side = active1.fields["photo_side"]
usr << browse_rsc(front, "front.png")
usr << browse_rsc(side, "side.png")
dat += "<table><tr><td>Name: [active1.fields["name"]] \
ID: [active1.fields["id"]]<BR>\n \
Sex: <A href='?src=\ref[src];field=sex'>[active1.fields["sex"]]</A><BR>\n \
@@ -264,7 +264,7 @@
switch(href_list["field"])
if("fingerprint")
if (istype(src.active1, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
src.active1.fields["fingerprint"] = t1
@@ -282,55 +282,55 @@
src.active1.fields["age"] = t1
if("mi_dis")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis"] = t1
if("mi_dis_d")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis_d"] = t1
if("ma_dis")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis"] = t1
if("ma_dis_d")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis_d"] = t1
if("alg")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg"] = t1
if("alg_d")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg_d"] = t1
if("cdi")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi"] = t1
if("cdi_d")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi_d"] = t1
if("notes")
if (istype(src.active2, /datum/data/record))
var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message, extra = 0)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["notes"] = t1
@@ -345,21 +345,21 @@
src.temp = text("<B>Blood Type:</B><BR>\n\t<A href='?src=\ref[];temp=1;b_type=an'>A-</A> <A href='?src=\ref[];temp=1;b_type=ap'>A+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=bn'>B-</A> <A href='?src=\ref[];temp=1;b_type=bp'>B+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=abn'>AB-</A> <A href='?src=\ref[];temp=1;b_type=abp'>AB+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=on'>O-</A> <A href='?src=\ref[];temp=1;b_type=op'>O+</A><BR>", src, src, src, src, src, src, src, src)
if("b_dna")
if (istype(src.active2, /datum/data/record))
var/t1 = sanitize(copytext(trim(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text),1,MAX_MESSAGE_LEN))
var/t1 = sanitize(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["b_dna"] = t1
if("vir_name")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
var/t1 = trim(sanitize(copytext(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["name"] = t1
if("vir_desc")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
var/t1 = trim(sanitize(copytext(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["description"] = t1
@@ -464,7 +464,7 @@
if (!( istype(src.active2, /datum/data/record) ))
return
var/a2 = src.active2
var/t1 = sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN))
var/t1 = sanitize(input("Add Comment:", "Med. records", null, null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
var/counter = 1

View File

@@ -90,7 +90,7 @@
screen = !screen
else if(href_list["warn"])
var/warning = trim(sanitize(copytext(input(usr,"Message:","Enter your message here!",""),1,MAX_MESSAGE_LEN)))
var/warning = sanitize(input(usr,"Message:","Enter your message here!",""))
if(!warning) return
var/obj/item/weapon/implant/I = locate(href_list["warn"])
if( istype(I) && I.imp_in)

View File

@@ -404,7 +404,7 @@ What a mess.*/
if (!( istype(active2, /datum/data/record) ))
return
var/a2 = active2
var/t1 = sanitize(copytext(input("Add Comment:", "Secure. records", null, null) as message,1,MAX_MESSAGE_LEN))
var/t1 = sanitize(input("Add Comment:", "Secure. records", null, null) as message)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
var/counter = 1
@@ -444,19 +444,19 @@ What a mess.*/
switch(href_list["field"])
if("name")
if (istype(active1, /datum/data/record))
var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
var/t1 = sanitizeName(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon)))) || active1 != a1)
return
active1.fields["name"] = t1
if("id")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input id:", "Secure. records", active1.fields["id"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["id"] = t1
if("fingerprint")
if (istype(active1, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["fingerprint"] = t1
@@ -474,31 +474,31 @@ What a mess.*/
active1.fields["age"] = t1
if("mi_crim")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["mi_crim"] = t1
if("mi_crim_d")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["mi_crim_d"] = t1
if("ma_crim")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["ma_crim"] = t1
if("ma_crim_d")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["ma_crim_d"] = t1
if("notes")
if (istype(active2, /datum/data/record))
var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message, extra = 0)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["notes"] = t1
@@ -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 = sanitize(copytext(input("Please enter race:", "General records", active1.fields["species"], null) as message,1,MAX_MESSAGE_LEN))
var/t1 = sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["species"] = t1

View File

@@ -196,7 +196,7 @@ Class Procs:
user.set_machine(src)
/obj/machinery/CouldNotUseTopic(var/mob/user)
usr.unset_machine()
user.unset_machine()
////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -323,7 +323,7 @@
if(speed <= 0)
speed = 1
if("setpath")
var/newpath = sanitize(copytext(input(usr, "Please define a new path!",,path) as text|null,1,MAX_MESSAGE_LEN))
var/newpath = sanitize(input(usr, "Please define a new path!",,path) as text|null)
if(newpath && newpath != "")
moving = 0 // stop moving
path = newpath

View File

@@ -194,7 +194,7 @@ Transponder Codes:<UL>"}
updateDialog()
else if(href_list["locedit"])
var/newloc = sanitize(copytext(input("Enter New Location", "Navigation Beacon", location) as text|null,1,MAX_MESSAGE_LEN))
var/newloc = sanitize(input("Enter New Location", "Navigation Beacon", location) as text|null)
if(newloc)
location = newloc
updateDialog()

View File

@@ -496,9 +496,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
if(href_list["set_channel_name"])
src.channel_name = strip_html(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
while (findtext(src.channel_name," ") == 1)
src.channel_name = copytext(src.channel_name,2,lentext(src.channel_name)+1)
src.channel_name = sanitizeSafe(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
src.updateUsrDialog()
//src.update_icon()
@@ -541,9 +539,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
src.updateUsrDialog()
else if(href_list["set_new_message"])
src.msg = strip_html(input(usr, "Write your Feed story", "Network Channel Handler", ""))
while (findtext(src.msg," ") == 1)
src.msg = copytext(src.msg,2,lentext(src.msg)+1)
src.msg = sanitize(input(usr, "Write your Feed story", "Network Channel Handler", ""))
src.updateUsrDialog()
else if(href_list["set_attachment"])
@@ -600,15 +596,11 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
src.updateUsrDialog()
else if(href_list["set_wanted_name"])
src.channel_name = strip_html(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
while (findtext(src.channel_name," ") == 1)
src.channel_name = copytext(src.channel_name,2,lentext(src.channel_name)+1)
src.channel_name = sanitizeSafe(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
src.updateUsrDialog()
else if(href_list["set_wanted_desc"])
src.msg = strip_html(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
while (findtext(src.msg," ") == 1)
src.msg = copytext(src.msg,2,lentext(src.msg)+1)
src.msg = sanitize(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
src.updateUsrDialog()
else if(href_list["submit_wanted"])
@@ -944,8 +936,8 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.scribble_page == src.curr_page)
user << "<FONT COLOR='blue'>There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?</FONT>"
else
var/s = strip_html( input(user, "Write something", "Newspaper", "") )
s = sanitize(copytext(s, 1, MAX_MESSAGE_LEN))
var/s = sanitize(input(user, "Write something", "Newspaper", ""))
s = sanitize(s)
if (!s)
return
if (!in_range(src, usr) && src.loc != usr)

View File

@@ -78,8 +78,10 @@ Buildable meters
is_bent = 1
if (istype(make_from, /obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction))
src.pipe_type = PIPE_JUNCTION
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_HE
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/heat_exchanging))
src.pipe_type = PIPE_HE_STRAIGHT + is_bent
connect_types = CONNECT_TYPE_HE
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/insulated))
src.pipe_type = PIPE_INSULATED_STRAIGHT + is_bent
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/visible/supply) || istype(make_from, /obj/machinery/atmospherics/pipe/simple/hidden/supply))
@@ -190,6 +192,10 @@ Buildable meters
else if (pipe_type == 31 || pipe_type == 32 || pipe_type == 34 || pipe_type == 36 || pipe_type == 38 || pipe_type == 40 || pipe_type == 42)
connect_types = CONNECT_TYPE_SCRUBBER
src.color = PIPE_COLOR_RED
else if (pipe_type == 2 || pipe_type == 3)
connect_types = CONNECT_TYPE_HE
else if (pipe_type == 6)
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_HE
else if (pipe_type == 28)
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY|CONNECT_TYPE_SCRUBBER
//src.pipe_dir = get_pipe_dir()

View File

@@ -818,7 +818,7 @@
if(istype(I, /obj/item/weapon/pen)) //you can rename turrets like bots!
var/t = input(user, "Enter new turret name", name, finish_name) as text
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
t = sanitize(t)
if(!t)
return
if(!in_range(src, usr) && loc != usr)

View File

@@ -223,7 +223,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(reject_bad_text(href_list["write"]))
dpt = ckey(href_list["write"]) //write contains the string of the receiving department's name
var/new_message = copytext(reject_bad_text(input(usr, "Write your message:", "Awaiting Input", "")),1,MAX_MESSAGE_LEN)
var/new_message = sanitize(input("Write your message:", "Awaiting Input", ""))
if(new_message)
message = new_message
screen = 9
@@ -238,7 +238,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
priority = -1
if(href_list["writeAnnouncement"])
var/new_message = copytext(reject_bad_text(input(usr, "Write your message:", "Awaiting Input", "")),1,MAX_MESSAGE_LEN)
var/new_message = sanitize(input("Write your message:", "Awaiting Input", ""))
if(new_message)
message = new_message
switch(href_list["priority"])

View File

@@ -284,7 +284,7 @@
src.log_message("Interfaced with [src_object].")
return STATUS_INTERACTIVE
if(src_object in view(2, src))
return STATUS_UPDATE //if they're close enough, allow the occupant to see the screen through the viewport or whatever.
return STATUS_UPDATE //if they're close enough, allow the occupant to see the screen through the viewport or whatever.
/obj/mecha/proc/melee_action(atom/target)
return
@@ -1569,8 +1569,8 @@
return
if (href_list["change_name"])
if(usr != src.occupant) return
var/newname = strip_html_simple(input(occupant,"Choose new exosuit name","Rename exosuit",initial(name)) as text, MAX_NAME_LEN)
if(newname && trim(newname))
var/newname = sanitizeSafe(input(occupant,"Choose new exosuit name","Rename exosuit",initial(name)) as text, MAX_NAME_LEN)
if(newname)
name = newname
else
alert(occupant, "nope.avi")

View File

@@ -43,9 +43,9 @@
var/datum/topic_input/filter = new /datum/topic_input(href,href_list)
if(href_list["send_message"])
var/obj/item/mecha_parts/mecha_tracking/MT = filter.getObj("send_message")
var/message = strip_html_simple(input(usr,"Input message","Transmit message") as text)
var/message = sanitize(input(usr,"Input message","Transmit message") as text)
var/obj/mecha/M = MT.in_mecha()
if(trim(message) && M)
if(message && M)
M.occupant_message(message)
return
if(href_list["shock"])

View File

@@ -114,7 +114,7 @@ move an amendment</a> to the drawing.</p>
usr << "\red Error! Please notify administration!"
return
var/list/turf/turfs = res
var/str = trim(stripped_input(usr,"New area name:","Blueprint Editing", "", MAX_NAME_LEN))
var/str = sanitizeSafe(input("New area name:","Blueprint Editing", ""), MAX_NAME_LEN)
if(!str || !length(str)) //cancel
return
if(length(str) > 50)
@@ -154,7 +154,7 @@ move an amendment</a> to the drawing.</p>
var/area/A = get_area()
//world << "DEBUG: edit_area"
var/prevname = "[A.name]"
var/str = trim(stripped_input(usr,"New area name:","Blueprint Editing", prevname, MAX_NAME_LEN))
var/str = sanitizeSafe(input("New area name:","Blueprint Editing", prevname), MAX_NAME_LEN)
if(!str || !length(str) || str==prevname) //cancel
return
if(length(str) > 50)

View File

@@ -49,7 +49,7 @@
return
if (!in_range(src, user) && src.loc != user)
return
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
t = sanitize(t)
if (t)
src.name = "body bag - "
src.name += t

View File

@@ -689,7 +689,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if ("Edit")
var/n = input(U, "Please enter message", name, notehtml) as message
if (in_range(src, U) && loc == U)
n = copytext(adminscrub(n), 1, MAX_MESSAGE_LEN)
n = sanitizeSafe(n, extra = 0)
if (mode == 1)
note = html_decode(n)
notehtml = note
@@ -726,7 +726,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
U << "The PDA softly beeps."
ui.close()
else
t = sanitize(copytext(t, 1, 20))
t = sanitize(t, 20)
ttone = t
else
ui.close()
@@ -735,7 +735,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/t = input(U, "Please enter new news tone", name, newstone) as text
if (in_range(src, U) && loc == U)
if (t)
t = sanitize(copytext(t, 1, 20))
t = sanitize(t, 20)
newstone = t
else
ui.close()
@@ -971,8 +971,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
U.visible_message("<span class='notice'>[U] taps on \his PDA's screen.</span>")
U.last_target_click = world.time
var/t = input(U, "Please enter message", P.name, null) as text
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
t = readd_quotes(t)
t = sanitize(t)
//t = readd_quotes(t)
t = replace_characters(t, list("&#34;" = "\""))
if (!t || !istype(P))
return
if (!in_range(src, U) && loc != U)

View File

@@ -562,10 +562,10 @@
if("alert")
post_status("alert", href_list["alert"])
if("setmsg1")
message1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", message1) as text|null, 1, 40))), 40)
message1 = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", message1) as text|null, 40), 40)
updateSelfDialog()
if("setmsg2")
message2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", message2) as text|null, 1, 40))), 40)
message2 = reject_bad_text(sanitize(input("Line 2", "Enter Message Text", message2) as text|null, 40), 40)
updateSelfDialog()
else
post_status(href_list["statdisp"])

View File

@@ -25,7 +25,7 @@
user << "\red \The [src] needs to recharge!"
return
var/message = sanitize(copytext(input(user, "Shout a message?", "Megaphone", null) as text,1,MAX_MESSAGE_LEN))
var/message = sanitize(input(user, "Shout a message?", "Megaphone", null) as text)
if(!message)
return
message = capitalize(message)

View File

@@ -260,7 +260,7 @@
if(2)
radio.ToggleReception()
if(href_list["setlaws"])
var/newlaws = sanitize(copytext(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message,1,MAX_MESSAGE_LEN))
var/newlaws = sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message)
if(newlaws)
pai.pai_laws = newlaws
pai << "Your supplemental directives have been updated. Your new directives are:"

View File

@@ -233,7 +233,7 @@
user << "\blue The MMI must go in after everything else!"
if (istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name, MAX_NAME_LEN)
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)

View File

@@ -53,7 +53,7 @@
var/heldname = "default name"
/obj/item/borg/upgrade/rename/attack_self(mob/user as mob)
heldname = stripped_input(user, "Enter new robot name", "Robot Reclassification", heldname, MAX_NAME_LEN)
heldname = sanitizeSafe(input(user, "Enter new robot name", "Robot Reclassification", heldname), MAX_NAME_LEN)
/obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R)
if(..()) return 0

View File

@@ -68,5 +68,9 @@
name = "\improper \"LiquidFood\" ration"
icon_state = "liquidfood"
/obj/item/trash/tastybread
name = "bread tube"
icon_state = "tastybread"
/obj/item/trash/attack(mob/M as mob, mob/living/user as mob)
return

View File

@@ -98,7 +98,7 @@ AI MODULES
/obj/item/weapon/aiModule/safeguard/attack_self(var/mob/user as mob)
..()
var/targName = stripped_input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name)
var/targName = sanitize(input("Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
targetName = targName
desc = text("A 'safeguard' AI module: 'Safeguard []. Individuals that threaten [] are not human and are a threat to humans.'", targetName, targetName)
@@ -127,7 +127,7 @@ AI MODULES
/obj/item/weapon/aiModule/oneHuman/attack_self(var/mob/user as mob)
..()
var/targName = stripped_input(usr, "Please enter the name of the person who is the only human.", "Who?", user.real_name)
var/targName = sanitize(input("Please enter the name of the person who is the only human.", "Who?", user.real_name))
targetName = targName
desc = text("A 'one human' AI module: 'Only [] is human.'", targetName)
@@ -265,7 +265,7 @@ AI MODULES
if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return
lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER)
var/newlaw = ""
var/targName = sanitize(copytext(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw),1,MAX_MESSAGE_LEN))
var/targName = sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
@@ -378,7 +378,7 @@ AI MODULES
/obj/item/weapon/aiModule/freeformcore/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = stripped_input(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw)
var/targName = sanitize(input("Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'"
@@ -403,7 +403,7 @@ AI MODULES
/obj/item/weapon/aiModule/syndicate/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = stripped_input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw,MAX_MESSAGE_LEN)
var/targName = sanitize(input("Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A hacked AI law module: '[newFreeFormLaw]'"

View File

@@ -224,13 +224,13 @@
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
if(!src.registered_name)
//Stop giving the players unsanitized unputs! You are giving ways for players to intentionally crash clients! -Nodrak
var t = reject_bad_name(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name))
var t = sanitizeName(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name))
if(!t) //Same as mob/new_player/prefrences.dm
alert("Invalid name.")
return
src.registered_name = t
var u = sanitize(copytext(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Agent"),1,MAX_MESSAGE_LEN))
var u = sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Agent"))
if(!u)
alert("Invalid assignment.")
src.registered_name = ""
@@ -245,13 +245,13 @@
switch(alert("Would you like to display the ID, or retitle it?","Choose.","Rename","Show"))
if("Rename")
var t = sanitize(copytext(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name),1,26))
var t = sanitize(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name), 26)
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/new_player/prefrences.dm
alert("Invalid name.")
return
src.registered_name = t
var u = sanitize(copytext(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant"),1,MAX_MESSAGE_LEN))
var u = sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant"))
if(!u)
alert("Invalid assignment.")
return

View File

@@ -52,7 +52,7 @@
user << "\red Circuit controls are locked."
return
var/existing_networks = list2text(network,",")
var/input = strip_html(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
var/input = sanitize(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
if(!input)
usr << "No input found please hang up and try your call again."
return

View File

@@ -152,7 +152,7 @@ Implant Specifics:<BR>"}
hear(var/msg)
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
msg = sanitize_simple(msg, replacechars)
msg = replace_characters(msg, replacechars)
if(findtext(msg,phrase))
activate()
del(src)
@@ -206,7 +206,7 @@ Implant Specifics:<BR>"}
elevel = alert("What sort of explosion would you prefer?", "Implant Intent", "Localized Limb", "Destroy Body", "Full Explosion")
phrase = input("Choose activation phrase:") as text
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
phrase = sanitize_simple(phrase, replacechars)
phrase = replace_characters(phrase, replacechars)
usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate.", 0, 0)
usr << "The implanted explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate."
return 1

View File

@@ -26,7 +26,7 @@
return
if((!in_range(src, usr) && src.loc != user))
return
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
t = sanitize(t)
if(t)
src.name = text("Glass Case - '[]'", t)
else

View File

@@ -135,7 +135,7 @@
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter the name for the door.", src.name, src.created_name),1,MAX_NAME_LEN)
var/t = sanitizeSafe(input(user, "Enter the name for the door.", src.name, src.created_name), MAX_NAME_LEN)
if(!t) return
if(!in_range(src, usr) && src.loc != usr) return
created_name = t

View File

@@ -92,7 +92,7 @@
return
if ((!in_range(src, usr) && src.loc != user))
return
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
t = sanitize(t)
if (t)
src.name = text("Morgue- '[]'", t)
else
@@ -258,7 +258,7 @@
return
if ((!in_range(src, usr) > 1 && src.loc != user))
return
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
t = sanitize(t)
if (t)
src.name = text("Crematorium- '[]'", t)
else

View File

@@ -53,7 +53,7 @@ client/verb/JoinResponseTeam()
for (var/obj/effect/landmark/L in landmarks_list) if (L.name == "Commando")
L.name = null//Reserving the place.
var/new_name = input(usr, "Pick a name","Name") as null|text
var/new_name = sanitizeSafe(input(usr, "Pick a name","Name") as null|text, MAX_NAME_LEN)
if(!new_name)//Somebody changed his mind, place is available again.
L.name = "Commando"
return

View File

@@ -12,7 +12,7 @@
src << "Guests may not use OOC."
return
msg = trim(sanitize(copytext(msg, 1, MAX_MESSAGE_LEN)))
msg = sanitize(msg)
if(!msg) return
if(!(prefs.toggles & CHAT_OOC))
@@ -77,7 +77,7 @@
src << "Guests may not use OOC."
return
msg = trim(sanitize(copytext(msg, 1, MAX_MESSAGE_LEN)))
msg = sanitize(msg)
if(!msg) return
if(!(prefs.toggles & CHAT_LOOC))