Skip to content

Conversation

@ShayBox
Copy link
Contributor

@ShayBox ShayBox commented Aug 7, 2025

This separates the system chat sender/content splitting regex and adds a system chat whisper regex which can both be overridden to add custom server chat format parsing, the built-in ones support Vanilla and Essentials Chat, and now use capture group names so that really weird formats with out of order groups can still be parsed (such as content, then sender)

Copy link
Collaborator

@mat-1 mat-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Shay :)

Tbh, I'm not really convinced that these global variables are a good idea. They make certain things more annoying (like unit testing), and I don't think there's much benefit to having them in this case (since the user can just write their own functions to parse messages if they really need to anyways).

Anyways, I do welcome the improvements to the regexes, since I'd like them to be reasonable defaults that users usually don't have to think about, so I would appreciate it if you could update it to just keep those improvements without the global variables.

(also, sorry that clippy is failing, that was my bad lol. merging main should fix it)

@ShayBox ShayBox changed the title Customizable System Chat Regexes Improve System Chat Regex & Add System Whisper Regex Aug 11, 2025
@ShayBox ShayBox force-pushed the Custom-Chat-Regex branch from 039d9b0 to 02e2961 Compare August 11, 2025 01:17
@ShayBox
Copy link
Contributor Author

ShayBox commented Aug 11, 2025

This should probably be squash merged into one commit instead of merging a force push.

@ShayBox ShayBox force-pushed the Custom-Chat-Regex branch from 02e2961 to 545b0e5 Compare August 11, 2025 02:02
@mat-1 mat-1 merged commit 7d9dee7 into azalea-rs:main Aug 11, 2025
1 check passed
@ShayBox ShayBox deleted the Custom-Chat-Regex branch August 12, 2025 00:56
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

Successfully merging this pull request may close these issues.

2 participants