From 0cc109e53efa536a0a1d5a30f798ab575cd134ca Mon Sep 17 00:00:00 2001 From: farie82 Date: Tue, 17 Mar 2020 20:02:40 +0100 Subject: [PATCH] Filters say of illegal characters (#13112) * Filters say of illegal characters * No more ~ --- code/modules/mob/say.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 93eb035b187..53660f5b55d 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -1,4 +1,7 @@ +#define ILLEGAL_CHARACTERS_LIST list("<" = "", ">" = "", "^" = "", \ + "\[" = "", "]" = "", "{" = "", "}" = "") + /mob/proc/say() return @@ -23,7 +26,7 @@ else if(response == "No") return */ - + message = replace_characters(message, ILLEGAL_CHARACTERS_LIST) set_typing_indicator(0) usr.say(message) @@ -205,4 +208,6 @@ . = "" for(var/datum/multilingual_say_piece/S in message_pieces) . += S.message + " " - . = trim_right(.) \ No newline at end of file + . = trim_right(.) + +#undef ILLEGAL_CHARACTERS_LIST