kangarko / ChatControl-Red

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

[10.26.3] [1.20.4] Cancelling chat messages does not prevent them from being sent to Discord via DiscordSRV #2692

Closed Teslicek closed 4 weeks ago

Teslicek commented 1 month ago

"/version ChatControlRed" - plugin version

10.26.3

Are you using MySQL?

Yes

Are you using BungeeCord?

No

Error log (if applicable)

No response

"/chc debug" output (strongly recommended)

No response

Information about the issue/bug

Self-explanatory.

I upgraded from a pretty old version, so no clue what the reason behind this is. Maybe the new paper async chat event.

kangarko commented 4 weeks ago

Try Modern_Chat_Listener on true or false and experiment with Chat_Listener_Priority.

There are 12 combinations now, 6 (lowest, low, normal, high, highest, monitor) priorities * 2 event modes (legacy, modern), so you need to spend some time and figure out the right one.

Teslicek commented 2 weeks ago

I have tried everything, when Modern_Chat_Listener is true, everything breaks. When it is false, everything is back to normal. Is there anything better about that option when its true? Is it faster?

kangarko commented 2 weeks ago

Just to clarify I understand correctly > you cancel the message (i.e. it is an advertisement) > "you cannot write ads!" alert is sent and message is canceled > but it is still sent to discordsrv?

Teslicek commented 2 weeks ago

Yes, however, based on my understanding of how this thing works, I managed to go to DiscordSRV and there was an option called UseModernPaperChatEvent and i set it from false to true.

Now everything works correctly again. I just assumed that CHC was cancelling Paper chat event, while DiscordSRV was using Spigot chat event, therefore it was not cancelled properly.

It was just an incompatibility with other plugins due to them using different chat events, everything works now.

kangarko commented 2 weeks ago

I will get worse in the future due to this extra complexity. Sorry for the trouble. Happy you found everything works now!