From 41078f975c105cff3247653bcc59be7705a620c9 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 27 Apr 2022 11:39:16 -0300 Subject: Move chat sanitization to Malindou instead of blackbox --- npc/003-3/malindou.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'npc/003-3') diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt index e43edeea1..0c5c7b836 100644 --- a/npc/003-3/malindou.txt +++ b/npc/003-3/malindou.txt @@ -729,7 +729,21 @@ OnPCBonusEvent: end; OnGlobalChat: - SK_Scripture(@chat$); + .@msg$ = @chat$; + + // We don't care with punctuation or capitalization + .@msg$ = strtolower(.@msg$); + .@msg$ = replacestr(.@msg$, ",", ""); + .@msg$ = replacestr(.@msg$, ".", ""); + .@msg$ = replacestr(.@msg$, "!", ""); + .@msg$ = replacestr(.@msg$, ":", ""); + .@msg$ = replacestr(.@msg$, ";", ""); + .@msg$ = replacestr(.@msg$, "(", ""); + .@msg$ = replacestr(.@msg$, ")", ""); + .@msg$ = replacestr(.@msg$, "<", ""); + .@msg$ = replacestr(.@msg$, ">", ""); + + SK_Scripture(.@msg$); end; // Level up events -- cgit v1.2.3-60-g2f50