Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chatmon: does not strip all formatting prior to match #1094

Open
Xabis opened this issue Nov 23, 2022 · 3 comments
Open

Chatmon: does not strip all formatting prior to match #1094

Xabis opened this issue Nov 23, 2022 · 3 comments

Comments

@Xabis
Copy link

Xabis commented Nov 23, 2022

It seems that Chatmon does not strip color codes prior to making a match.

When using Battlemod, it will rewrite chat lines to include a lot of color coding around targets and ability names,

Example:
<trigger match="*Phlegm Expulsion*" sound="..." />

Raw text, after Battlemod (simplified mode, default template):
[��Thillloab��] � Phlegm�� � Expulsion�� �¨ ��Thillloab��

For this example, the trigger will not fire, because it is matching on the raw input which includes the control bytes.

A workaround would be to place wildcards between each word, which is not ideal, and can lead to false positives:
<trigger match="*Phlegm*Expulsion*" sound="..." />

This needs to be resolved by stripping all special codes from the input prior to making a match.

Related: Windower/Lua#2244

@Xabis
Copy link
Author

Xabis commented Dec 9, 2022

I wrote a lua version of chatmon to address this issue. This new version (should be) backwards compatible with the plugin xml configuration for anyone interested. This has been decently tested and works with Battlemod.

Additionally, I have expanded the functionality to include basic spam filtering, and added commands to configure things without needing to change the xml itself.

Repo:
https://github.com/Xabis/Chatmon

@Byrth, pending review of course, this may be something to consider for the official addon collection, at your discretion.

@z16
Copy link
Member

z16 commented Dec 9, 2022

@Xabis This is solely at your discretion, and yours alone :) If you wanna submit the addon to the repo just submit a PR and we will review it. We generally approve of people submitting addons to our repository, so feel free to do it.

@Xabis
Copy link
Author

Xabis commented Dec 9, 2022

@z16, thanks for letting me know.

I have opened a PR here:
Windower/Lua#2254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants