sanitize() refactor: fourth pass

This commit is contained in:
volas
2015-03-29 13:47:57 +03:00
parent 96dd9df079
commit 2622d2dbfc
25 changed files with 36 additions and 33 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
/mob/dead/observer/emote(var/act, var/type, var/message)
message = sanitize(message)
//message = sanitize(message) - already sanitized in verb/me_verb()
if(!message)
return
@@ -3,6 +3,8 @@
if (silent)
return
message = sanitize(message)
if(!(container && istype(container, /obj/item/device/mmi)))
return //No MMI, can't speak, bucko./N
else
@@ -863,11 +863,11 @@
var/list/creatures = list()
for(var/mob/living/carbon/h in world)
creatures += h
var/mob/target = input ("Who do you want to project your mind to ?") as null|anything in creatures
var/mob/target = input("Who do you want to project your mind to ?") as null|anything in creatures
if (isnull(target))
return
var/say = input ("What do you wish to say")
var/say = sanitize(input("What do you wish to say"))
if(mRemotetalk in target.mutations)
target.show_message("\blue You hear [src.real_name]'s voice: [say]")
else
@@ -1368,4 +1368,4 @@
/mob/living/carbon/human/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
if(W in organs)
return
..()
..()
@@ -1,4 +1,7 @@
/mob/living/carbon/slime/say(var/message)
message = sanitize(message)
var/verb = say_quote(message)
if(copytext(message,1,2) == "*")
@@ -55,9 +55,9 @@ var/datum/paiController/paiController // Global handler for pAI candidates
switch(option)
if("name")
t = input("Enter a name for your pAI", "pAI Name", candidate.name) as text
t = sanitizeSafe(input("Enter a name for your pAI", "pAI Name", candidate.name) as text, MAX_NAME_LEN)
if(t)
candidate.name = sanitizeSafe(t, MAX_NAME_LEN)
candidate.name = t
if("desc")
t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
if(t)
@@ -714,7 +714,7 @@
if(message_mode)
if(message_mode in radiochannels)
if(ears && istype(ears,/obj/item/device/radio))
ears.talk_into(src,message, message_mode, verb, null)
ears.talk_into(src,sanitize(message), message_mode, verb, null)
..(message)
-1
View File
@@ -263,7 +263,6 @@
set name = "Add Note"
set category = "IC"
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
msg = sanitize(msg)
if(mind)