summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-04-27 11:39:16 -0300
committerJesusaves <cpntb1@ymail.com>2022-04-27 11:39:16 -0300
commit41078f975c105cff3247653bcc59be7705a620c9 (patch)
tree17ab2b98fb2565433d5434550a7eba27c9f4ba27
parent2f1b1a5b4890fcaf611170237cff3d3eceefe0b3 (diff)
downloadserverdata-41078f975c105cff3247653bcc59be7705a620c9.tar.gz
serverdata-41078f975c105cff3247653bcc59be7705a620c9.tar.bz2
serverdata-41078f975c105cff3247653bcc59be7705a620c9.tar.xz
serverdata-41078f975c105cff3247653bcc59be7705a620c9.zip
Move chat sanitization to Malindou instead of blackbox
-rw-r--r--npc/001-14/ctrl.txt2
-rw-r--r--npc/003-3/malindou.txt16
2 files changed, 17 insertions, 1 deletions
diff --git a/npc/001-14/ctrl.txt b/npc/001-14/ctrl.txt
index c64d20dc6..715cf8cc8 100644
--- a/npc/001-14/ctrl.txt
+++ b/npc/001-14/ctrl.txt
@@ -17,6 +17,7 @@ OnInit:
// FIXME
001-14,88,27,0 script Hocus#MOLY1200 NPC_BLACKWIZARD,{
npctalk l("Icicle Challenge");
+ npctalk l("Not Yet Implemented - Sorry.");
end;
OnInit:
@@ -152,6 +153,7 @@ OnInit:
// FIXME
001-14,139,85,0 script Hocus#MOLY0300 NPC_BLACKWIZARD,{
npctalk l("Fluffy Hunter Challenge");
+ npctalk l("Not Yet Implemented - Sorry.");
end;
OnInit:
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