mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
/tg/ input stripping.
Borrows /tg/ html stripping code. Ghosts are the first to be given this boon, they now have to deliberately emote things like "Spooky man and it#36&;s friends type crap".
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/mob/dead/observer/say(var/message)
|
||||
message = sanitize(copytext(message, 1, MAX_MESSAGE_LEN))
|
||||
message = strip_html_properly(message)
|
||||
|
||||
if (!message)
|
||||
return
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
/mob/dead/observer/emote(var/act, var/type, var/message)
|
||||
message = sanitize(copytext(message, 1, MAX_MESSAGE_LEN))
|
||||
message = trim_strip_html_properly(message)
|
||||
|
||||
if(!message)
|
||||
return
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
src << "\red You cannot speak in IC (Muted)."
|
||||
return
|
||||
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
message = trim_strip_html_properly(message)
|
||||
|
||||
if(stat == 2)
|
||||
return say_dead(message)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
src << "\red You cannot speak in IC (Muted)."
|
||||
return
|
||||
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
message = trim_strip_html_properly(message)
|
||||
|
||||
if(stat == 2)
|
||||
return say_dead(message)
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
return
|
||||
|
||||
|
||||
message = trim_strip_html_properly(message)
|
||||
log_whisper("[src.name]/[src.key] : [message]")
|
||||
|
||||
if (src.client)
|
||||
@@ -21,8 +22,6 @@
|
||||
|
||||
if (src.stat)
|
||||
return
|
||||
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //made consistent with say
|
||||
|
||||
if(name != GetVoice())
|
||||
alt_name = "(as [get_id_name("Unknown")])"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
return 0
|
||||
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
message = trim_strip_html_properly(message)
|
||||
|
||||
if (stat == 2)
|
||||
return say_dead(message)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
if(istype(src.loc,/mob/living/simple_animal/borer))
|
||||
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
message = trim_strip_html_properly(message)
|
||||
if (!message)
|
||||
return
|
||||
log_say("[key_name(src)] : [message]")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/mob/living/simple_animal/borer/say(var/message)
|
||||
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
message = trim_strip_html_properly(message)
|
||||
message = capitalize(message)
|
||||
|
||||
if(!message)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
return
|
||||
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
message = strip_html_properly(message)
|
||||
|
||||
set_typing_indicator(0)
|
||||
if(use_me)
|
||||
|
||||
Reference in New Issue
Block a user