Add chat filter plugin

Add a plugin that censors user defined words/sentences, changes the message, or removes the entire message containing them.

Co-authored-by: Adam <Adam@sigterm.info>
This commit is contained in:
Magic fTail
2019-03-18 18:00:35 +01:00
committed by Adam
parent ee98065735
commit b7944bcee4
7 changed files with 499 additions and 2 deletions

View File

@@ -183,7 +183,18 @@ LABEL157:
iload 12
invoke 193
iconst 1
if_icmpeq LABEL172
if_icmpeq CHAT_FILTER ; Jump to our new label instead
jump LABEL641
CHAT_FILTER:
sload 11 ; Load the message
iconst 1 ; Gets changed to 0 if message is blocked
iload 10 ; Load the messageType
sconst "chatFilterCheck"
runelite_callback
pop_int ; Pop the messageType
iconst 1 ; 2nd half of conditional
sstore 11 ; Override the message with our filtered message
if_icmpeq LABEL172 ; Check if we are building this message
jump LABEL641
LABEL172:
iload 10

View File

@@ -353,7 +353,18 @@ LABEL311:
iload 14
invoke 91
iconst 1
if_icmpeq LABEL327
if_icmpeq CHAT_FILTER ; Jump to our new label instead
jump LABEL475
CHAT_FILTER:
sload 0 ; Load the message
iconst 1 ; Gets changed to 0 if message is blocked
iload 15 ; Load the messageType
sconst "chatFilterCheck"
runelite_callback
pop_int ; Pop the messageType
iconst 1 ; 2nd half of conditional
sstore 0 ; Override the message with our filtered message
if_icmpeq LABEL327 ; Check if we are building this message
jump LABEL475
LABEL327:
iload 15