correction of all copytext(sanitize(..)) to sanitize(copytext(..))

This commit is contained in:
volas
2015-02-01 22:54:56 +03:00
parent 9c358c0e74
commit 8abd7d0735
59 changed files with 104 additions and 104 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -344,7 +344,7 @@
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 = 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

View File

@@ -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")

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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].")

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

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 = 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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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")

View File

@@ -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))

View File

@@ -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

View File

@@ -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

View File

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

View File

@@ -945,7 +945,7 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
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 = copytext(sanitize(s), 1, MAX_MESSAGE_LEN)
s = sanitize(copytext(s, 1, MAX_MESSAGE_LEN))
if (!s)
return
if (!in_range(src, usr) && src.loc != usr)

View File

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

View File

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

View File

@@ -726,7 +726,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
U << "The PDA softly beeps."
ui.close()
else
t = copytext(sanitize(t), 1, 20)
t = sanitize(copytext(t, 1, 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 = copytext(sanitize(t), 1, 20)
t = sanitize(copytext(t, 1, 20))
newstone = t
else
ui.close()
@@ -971,7 +971,7 @@ 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 = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
t = readd_quotes(t)
if (!t || !istype(P))
return

View File

@@ -562,10 +562,10 @@
if("alert")
post_status("alert", href_list["alert"])
if("setmsg1")
message1 = reject_bad_text(trim(copytext(sanitize(input("Line 1", "Enter Message Text", message1) as text|null), 1, 40)), 40)
message1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", message1) as text|null, 1, 40))), 40)
updateSelfDialog()
if("setmsg2")
message2 = reject_bad_text(trim(copytext(sanitize(input("Line 2", "Enter Message Text", message2) as text|null), 1, 40)), 40)
message2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", message2) as text|null, 1, 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 = copytext(sanitize(input(user, "Shout a message?", "Megaphone", null) as text),1,MAX_MESSAGE_LEN)
var/message = sanitize(copytext(input(user, "Shout a message?", "Megaphone", null) as text,1,MAX_MESSAGE_LEN))
if(!message)
return
message = capitalize(message)

View File

@@ -260,7 +260,7 @@
if(2)
radio.ToggleReception()
if(href_list["setlaws"])
var/newlaws = copytext(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),1,MAX_MESSAGE_LEN)
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))
if(newlaws)
pai.pai_laws = newlaws
pai << "Your supplemental directives have been updated. Your new directives are:"

View File

@@ -261,7 +261,7 @@ AI MODULES
if(new_lawpos < 15) return
lawpos = min(new_lawpos, 50)
var/newlaw = ""
var/targName = copytext(sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw)),1,MAX_MESSAGE_LEN)
var/targName = sanitize(copytext(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw),1,MAX_MESSAGE_LEN))
newFreeFormLaw = targName
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"

View File

@@ -231,7 +231,7 @@
return
src.registered_name = t
var u = copytext(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")),1,MAX_MESSAGE_LEN)
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))
if(!u)
alert("Invalid assignment.")
src.registered_name = ""
@@ -246,13 +246,13 @@
switch(alert("Would you like to display the ID, or retitle it?","Choose.","Rename","Show"))
if("Rename")
var t = copytext(sanitize(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(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))
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 = copytext(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")),1,MAX_MESSAGE_LEN)
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))
if(!u)
alert("Invalid assignment.")
return

View File

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

View File

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

View File

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

View File

@@ -1980,7 +1980,7 @@
if(!ticker)
alert("The game hasn't started yet!")
return
var/objective = copytext(sanitize(input("Enter an objective")),1,MAX_MESSAGE_LEN)
var/objective = sanitize(copytext(input("Enter an objective"),1,MAX_MESSAGE_LEN))
if(!objective)
return
feedback_inc("admin_secrets_fun_used",1)

View File

@@ -4,7 +4,7 @@
set hidden = 1
if(!check_rights(R_ADMIN)) return
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
if(!msg) return
log_admin("[key_name(src)] : [msg]")
@@ -23,7 +23,7 @@
if(!check_rights(R_ADMIN|R_MOD|R_MENTOR)) return
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
log_admin("MOD: [key_name(src)] : [msg]")
if (!msg)

View File

@@ -29,7 +29,7 @@
if (src.holder.rights & R_ADMIN)
stafftype = "ADMIN"
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
log_admin("[key_name(src)] : [msg]")
if (!msg)

View File

@@ -6,7 +6,7 @@
usr << "\red Speech is currently admin-disabled."
return
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
if(!msg) return
if(usr.client)
@@ -29,14 +29,14 @@
//log_admin("HELP: [key_name(src)]: [msg]")
/proc/Centcomm_announce(var/text , var/mob/Sender , var/iamessage)
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
msg = "\blue <b><font color=orange>CENTCOMM[iamessage ? " IA" : ""]:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
C << msg
/proc/Syndicate_announce(var/text , var/mob/Sender)
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
msg = "\blue <b><font color=crimson>ILLEGAL:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)

View File

@@ -19,7 +19,7 @@ var/global/sent_strike_team = 0
var/input = null
while(!input)
input = copytext(sanitize(input(src, "Please specify which mission the death commando squad shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN)
input = sanitize(copytext(input(src, "Please specify which mission the death commando squad shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
if(!input)
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
return

View File

@@ -24,7 +24,7 @@ var/global/sent_syndicate_strike_team = 0
var/input = null
while(!input)
input = copytext(sanitize(input(src, "Please specify which mission the strike team shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN)
input = sanitize(copytext(input(src, "Please specify which mission the strike team shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
if(!input)
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
return

View File

@@ -300,9 +300,9 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
if(checkoutperiod < 1)
checkoutperiod = 1
if(href_list["editbook"])
buffer_book = copytext(sanitize(input("Enter the book's title:") as text|null),1,MAX_MESSAGE_LEN)
buffer_book = sanitize(copytext(input("Enter the book's title:") as text|null,1,MAX_MESSAGE_LEN))
if(href_list["editmob"])
buffer_mob = copytext(sanitize(input("Enter the recipient's name:") as text|null),1,MAX_NAME_LEN)
buffer_mob = sanitize(copytext(input("Enter the recipient's name:") as text|null,1,MAX_NAME_LEN))
if(href_list["checkout"])
var/datum/borrowbook/b = new /datum/borrowbook
b.bookname = sanitize(buffer_book)
@@ -317,7 +317,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
var/obj/item/weapon/book/b = locate(href_list["delbook"])
inventory.Remove(b)
if(href_list["setauthor"])
var/newauthor = copytext(sanitize(input("Enter the author's name: ") as text|null),1,MAX_MESSAGE_LEN)
var/newauthor = sanitize(copytext(input("Enter the author's name: ") as text|null,1,MAX_MESSAGE_LEN))
if(newauthor)
scanner.cache.author = newauthor
if(href_list["setcategory"])

View File

@@ -12,7 +12,7 @@
var/input
if(!message)
input = copytext(sanitize(input(src,"Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
input = sanitize(copytext(input(src,"Choose an emote to display.") as text|null,1,MAX_MESSAGE_LEN))
else
input = message
if(input)
@@ -108,7 +108,7 @@
var/input
if(!message)
input = copytext(sanitize(input(src, "Choose an emote to display.") as text|null), 1, MAX_MESSAGE_LEN)
input = sanitize(copytext(input(src, "Choose an emote to display.") as text|null, 1, MAX_MESSAGE_LEN))
else
input = message

View File

@@ -50,7 +50,7 @@
m_type = 1
if ("custom")
var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
var/input = sanitize(copytext(input("Choose an emote to display.") as text|null,1,MAX_MESSAGE_LEN))
if (!input)
return
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
@@ -577,7 +577,7 @@
set desc = "Sets a description which will be shown when someone examines you."
set category = "IC"
pose = copytext(sanitize(input(usr, "This is [src]. \He is...", "Pose", null) as text), 1, MAX_MESSAGE_LEN)
pose = sanitize(copytext(input(usr, "This is [src]. \He is...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
/mob/living/carbon/human/verb/set_flavor()
set name = "Set Flavour Text"

View File

@@ -499,7 +499,7 @@
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"security"))
var/t1 = copytext(sanitize(input("Add Comment:", "Sec. records", null, null) as message),1,MAX_MESSAGE_LEN)
var/t1 = sanitize(copytext(input("Add Comment:", "Sec. records", null, null) as message,1,MAX_MESSAGE_LEN))
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"security")) )
return
var/counter = 1
@@ -628,7 +628,7 @@
for (var/datum/data/record/R in data_core.medical)
if (R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"medical"))
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) || usr.stat || usr.restrained() || !(hasHUD(usr,"medical")) )
return
var/counter = 1

View File

@@ -175,7 +175,7 @@
text = input("What would you like to say?", "Speak to creature", null, null)
text = trim(copytext(sanitize(text), 1, MAX_MESSAGE_LEN))
text = trim(sanitize(copytext(text, 1, MAX_MESSAGE_LEN)))
if(!text) return

View File

@@ -595,7 +595,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
pet.colour = "[M.colour]"
user <<"You feed the slime the potion, removing it's powers and calming it."
del(M)
var/newname = copytext(sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text),1,MAX_NAME_LEN)
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
if (!newname)
newname = "pet slime"
@@ -626,7 +626,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
pet.colour = "[M.colour]"
user <<"You feed the slime the potion, removing it's powers and calming it."
del(M)
var/newname = copytext(sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text),1,MAX_NAME_LEN)
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
if (!newname)
newname = "pet slime"

View File

@@ -58,32 +58,32 @@ var/datum/paiController/paiController // Global handler for pAI candidates
if("name")
t = input("Enter a name for your pAI", "pAI Name", candidate.name) as text
if(t)
candidate.name = copytext(sanitize(t),1,MAX_NAME_LEN)
candidate.name = sanitize(copytext(t,1,MAX_NAME_LEN))
if("desc")
t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
if(t)
candidate.description = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
candidate.description = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if("role")
t = input("Enter a role for your pAI", "pAI Role", candidate.role) as text
if(t)
candidate.role = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
candidate.role = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if("ooc")
t = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
if(t)
candidate.comments = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
candidate.comments = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if("save")
candidate.savefile_save(usr)
if("load")
candidate.savefile_load(usr)
//In case people have saved unsanitized stuff.
if(candidate.name)
candidate.name = copytext(sanitize(candidate.name),1,MAX_NAME_LEN)
candidate.name = sanitize(copytext(candidate.name,1,MAX_NAME_LEN))
if(candidate.description)
candidate.description = copytext(sanitize(candidate.description),1,MAX_MESSAGE_LEN)
candidate.description = sanitize(copytext(candidate.description,1,MAX_MESSAGE_LEN))
if(candidate.role)
candidate.role = copytext(sanitize(candidate.role),1,MAX_MESSAGE_LEN)
candidate.role = sanitize(copytext(candidate.role,1,MAX_MESSAGE_LEN))
if(candidate.comments)
candidate.comments = copytext(sanitize(candidate.comments),1,MAX_MESSAGE_LEN)
candidate.comments = sanitize(copytext(candidate.comments,1,MAX_MESSAGE_LEN))
if("submit")
if(candidate)

View File

@@ -226,14 +226,14 @@
set desc = "Sets a description which will be shown when someone examines you."
set category = "IC"
pose = copytext(sanitize(input(usr, "This is [src]. It is...", "Pose", null) as text), 1, MAX_MESSAGE_LEN)
pose = sanitize(copytext(input(usr, "This is [src]. It is...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
/mob/living/silicon/verb/set_flavor()
set name = "Set Flavour Text"
set desc = "Sets an extended description of your character's features."
set category = "IC"
flavor_text = copytext(sanitize(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text), 1)
flavor_text = sanitize(copytext(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text, 1))
/mob/living/silicon/binarycheck()
return 1

View File

@@ -305,7 +305,7 @@ proc/slur(phrase)
n_letter = text("[n_letter]-[n_letter]")
t = text("[t][n_letter]")//since the above is ran through for each letter, the text just adds up back to the original word.
p++//for each letter p is increased to find where the next letter will be.
return copytext(sanitize(t),1,MAX_MESSAGE_LEN)
return sanitize(copytext(t,1,MAX_MESSAGE_LEN))
proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 for p will cause letters to be replaced instead of added
@@ -352,7 +352,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
n_letter = text("[n_letter]")
t = text("[t][n_letter]")
p=p+n_mod
return copytext(sanitize(t),1,MAX_MESSAGE_LEN)
return sanitize(copytext(t,1,MAX_MESSAGE_LEN))
/proc/shake_camera(mob/M, duration, strength=1)

View File

@@ -35,7 +35,7 @@
user << "<span class='notice'>You put the [W] into \the [src].</span>"
update_icon()
else if(istype(W, /obj/item/weapon/pen))
var/n_name = copytext(sanitize(input(usr, "What would you like to label the folder?", "Folder Labelling", null) as text), 1, MAX_NAME_LEN)
var/n_name = sanitize(copytext(input(usr, "What would you like to label the folder?", "Folder Labelling", null) as text, 1, MAX_NAME_LEN))
if((loc == usr && usr.stat == 0))
name = "folder[(n_name ? text("- '[n_name]'") : null)]"
return

View File

@@ -86,7 +86,7 @@
if((CLUMSY in usr.mutations) && prob(50))
usr << "<span class='warning'>You cut yourself on the paper.</span>"
return
var/n_name = copytext(sanitize(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text), 1, MAX_NAME_LEN)
var/n_name = sanitize(copytext(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text, 1, MAX_NAME_LEN))
if((loc == usr && usr.stat == 0))
name = "[(n_name ? text("[n_name]") : initial(name))]"
if(name != "paper")

View File

@@ -192,7 +192,7 @@
set category = "Object"
set src in usr
var/n_name = copytext(sanitize(input(usr, "What would you like to label the bundle?", "Bundle Labelling", null) as text), 1, MAX_NAME_LEN)
var/n_name = sanitize(copytext(input(usr, "What would you like to label the bundle?", "Bundle Labelling", null) as text, 1, MAX_NAME_LEN))
if((loc == usr && usr.stat == 0))
name = "[(n_name ? text("[n_name]") : "paper")]"
add_fingerprint(usr)

View File

@@ -71,7 +71,7 @@ var/global/photo_count = 0
set category = "Object"
set src in usr
var/n_name = copytext(sanitize(input(usr, "What would you like to label the photo?", "Photo Labelling", null) as text), 1, MAX_NAME_LEN)
var/n_name = sanitize(copytext(input(usr, "What would you like to label the photo?", "Photo Labelling", null) as text, 1, MAX_NAME_LEN))
//loc.loc check is for making possible renaming photos in clipboards
if(( (loc == usr || (loc.loc && loc.loc == usr)) && usr.stat == 0))
name = "[(n_name ? text("[n_name]") : "photo")]"

View File

@@ -43,7 +43,7 @@
else if(istype(W, /obj/item/weapon/pen))
switch(alert("What would you like to alter?",,"Title","Description", "Cancel"))
if("Title")
var/str = trim(copytext(sanitize(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN))
var/str = trim(sanitize(copytext(input(usr,"Label text?","Set label",""),1,MAX_NAME_LEN)))
if(!str || !length(str))
usr << "<span class='warning'> Invalid text.</span>"
return
@@ -57,7 +57,7 @@
else
nameset = 1
if("Description")
var/str = trim(copytext(sanitize(input(usr,"Label text?","Set label","")),1,MAX_MESSAGE_LEN))
var/str = trim(sanitize(copytext(input(usr,"Label text?","Set label",""),1,MAX_MESSAGE_LEN)))
if(!str || !length(str))
usr << "\red Invalid text."
return
@@ -150,7 +150,7 @@
else if(istype(W, /obj/item/weapon/pen))
switch(alert("What would you like to alter?",,"Title","Description", "Cancel"))
if("Title")
var/str = trim(copytext(sanitize(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN))
var/str = trim(sanitize(copytext(input(usr,"Label text?","Set label",""),1,MAX_NAME_LEN)))
if(!str || !length(str))
usr << "<span class='warning'> Invalid text.</span>"
return
@@ -165,7 +165,7 @@
nameset = 1
if("Description")
var/str = trim(copytext(sanitize(input(usr,"Label text?","Set label","")),1,MAX_MESSAGE_LEN))
var/str = trim(sanitize(copytext(input(usr,"Label text?","Set label",""),1,MAX_MESSAGE_LEN)))
if(!str || !length(str))
usr << "\red Invalid text."
return

View File

@@ -37,7 +37,7 @@
if(href_list["set_tag"])
var/t = input(usr, "Please enter new tag", src.id_tag, null) as text
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
if (!t)
return
if (!in_range(src.master, usr))

View File

@@ -113,7 +113,7 @@
if("rename")
spawn(0)
var/t = input(usr, "Please enter new name", F.name, null) as text
t = copytext(sanitize(t), 1, 16)
t = sanitize(copytext(t, 1, 16))
if (!t)
return
if (!in_range(src.master, usr) || !(F.holder in src.master))

View File

@@ -35,7 +35,7 @@
if(href_list["send_msg"])
var/t = input(usr, "Please enter messenger", src.id_tag, null) as text
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
if (!t)
return
if (!in_range(src.master, usr))
@@ -66,7 +66,7 @@
if(href_list["set_name"])
var/t = input(usr, "Please enter screen name", src.id_tag, null) as text
t = copytext(sanitize(t), 1, 20)
t = sanitize(copytext(t, 1, 20))
if (!t)
return
if (!in_range(src.master, usr))

View File

@@ -240,7 +240,7 @@
if(!(src.holder in src.master))
return
t = copytext(sanitize(t), 1, 20)
t = sanitize(copytext(t, 1, 20))
src.message_tone = t
if("note")
@@ -289,7 +289,7 @@
return
var/t = input(usr, "Please enter new name", src.name, F.name) as text
t = copytext(sanitize(t), 1, 16)
t = sanitize(copytext(t, 1, 16))
if (!t)
return
if (!in_range(src.master, usr) || !(F.holder in src.master))