Corrections dual sanitizing

This commit is contained in:
volas
2015-04-18 14:36:49 +03:00
parent fdd041830a
commit dbd239f4ec
4 changed files with 9 additions and 11 deletions

View File

@@ -574,22 +574,22 @@ var/list/sacrificed = list()
// returns 0 if the rune is not used. returns 1 if the rune is used. // returns 0 if the rune is not used. returns 1 if the rune is used.
communicate() communicate()
. = 1 // Default output is 1. If the rune is deleted it will return 1 . = 1 // Default output is 1. If the rune is deleted it will return 1
var/input = sanitize(input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "")) var/input = input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "")//sanitize() below, say() and whisper() have their own
if(!input) if(!input)
if (istype(src)) if (istype(src))
fizzle() fizzle()
return 0 return 0
else else
return 0 return 0
if(istype(src,/obj/effect/rune))
usr.say("O bidai nabora se[pick("'","`")]sma!")
else
usr.whisper("O bidai nabora se[pick("'","`")]sma!")
if(istype(src,/obj/effect/rune)) if(istype(src,/obj/effect/rune))
usr.say("O bidai nabora se[pick("'","`")]sma!")
usr.say("[input]") usr.say("[input]")
else else
usr.whisper("O bidai nabora se[pick("'","`")]sma!")
usr.whisper("[input]") usr.whisper("[input]")
input = sanitize(input)
for(var/datum/mind/H in cult.current_antagonists) for(var/datum/mind/H in cult.current_antagonists)
if (H.current) if (H.current)
H.current << "\red \b [input]" H.current << "\red \b [input]"

View File

@@ -1323,7 +1323,7 @@
return return
if(L.can_centcom_reply()) if(L.can_centcom_reply())
var/input = input(src.owner, "Please enter a message to reply to [key_name(L)] via their headset.","Outgoing message from Centcomm", "") var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(L)] via their headset.","Outgoing message from Centcomm", ""))
if(!input) return if(!input) return
src.owner << "You sent [input] to [L] via a secure channel." src.owner << "You sent [input] to [L] via a secure channel."

View File

@@ -28,15 +28,13 @@
feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//log_admin("HELP: [key_name(src)]: [msg]") //log_admin("HELP: [key_name(src)]: [msg]")
/proc/Centcomm_announce(var/text , var/mob/Sender , var/iamessage) /proc/Centcomm_announce(var/msg, var/mob/Sender, var/iamessage)
var/msg = sanitize(text)
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]" 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) for(var/client/C in admins)
if(R_ADMIN & C.holder.rights) if(R_ADMIN & C.holder.rights)
C << msg C << msg
/proc/Syndicate_announce(var/text , var/mob/Sender) /proc/Syndicate_announce(var/msg, var/mob/Sender)
var/msg = sanitize(text)
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]" 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) for(var/client/C in admins)
if(R_ADMIN & C.holder.rights) if(R_ADMIN & C.holder.rights)

View File

@@ -527,7 +527,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
switch(alert("Should this be announced to the general population?",,"Yes","No")) switch(alert("Should this be announced to the general population?",,"Yes","No"))
if("Yes") if("Yes")
command_announcement.Announce(input, customname, new_sound = 'sound/AI/commandreport.ogg'); command_announcement.Announce(input, customname, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1);
if("No") if("No")
world << "\red New NanoTrasen Update available at all communication consoles." world << "\red New NanoTrasen Update available at all communication consoles."
world << sound('sound/AI/commandreport.ogg') world << sound('sound/AI/commandreport.ogg')