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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user