kangarko / ChatControl-Red

Issue tracker and documentation for the next generation ChatControl Red, the most advanced chat management plugin.
49 stars 23 forks source link

1.18.2: Localization bug with variables #1903

Closed TheIntolerant closed 2 years ago

TheIntolerant commented 2 years ago

Note Tested on a fresh install.

It seems some variables aren't parsed correctly depending on what caused part of the local to be displayed. In my case triggering the anti-spam via chatcontrol rule causes this to happen.

The rule used here is /adminchat <message> and part of the local file that was edited was Checker.Similarity to include &8{chat_line_smooth} in the message.

The debug file with these changes has been provided below.


Steps to reproduce using the debug file below.

1) talk in chat normally with the same message 2 times to trigger the anti-spam. You will see the normal output here. image

2) Talk in the admin channel via chatcontrol rules /adminchat <message> with the same message 2 times to trigger the anti-spam. Here you will see the variables used aren't parsed correctly. image


debug.zip

Minecraft Version: 1.18.2 MySQL: false BungeeCord: false

kangarko commented 2 years ago

Thanks, the command was not replacing inbuilt variables so my fix also resolved many other localization keys. Fixed.