Skip to content

Large refactor of how message matching is done in GameChatHandler#135

Merged
omrih4 merged 1 commit intoLegitiDevs:masterfrom
ThisIsMyName314:branch1
Apr 11, 2026
Merged

Large refactor of how message matching is done in GameChatHandler#135
omrih4 merged 1 commit intoLegitiDevs:masterfrom
ThisIsMyName314:branch1

Conversation

@ThisIsMyName314
Copy link
Copy Markdown
Contributor

When a message is received, a series of MessageMatchers (there is one for each type of message that should be tracked) is iterated through, and the first one that matches is visited, calling the relevant method inside GameChatHandler to handle it.

When a MessageMatcher's matches(message) is called, if it does match it takes the parts from the message that it wants which makes getting the wanted parts later much easier.

There is barely any change to the actual body of code that is executed for each type

Now, when a message is received, a series of MessageMatchers (there is one for each type of message that should be tracked) is iterated through, and the first one that matches is visited, calling the relevant method inside GameChatHandler to handle it.

When a MessageMatcher's matches(message) is called, if it does match it takes the parts from the message that it wants which makes getting the wanted parts later much easier.

There is barely any change to the actual body of code that is executed for each type.
@omrih4 omrih4 merged commit c41a273 into LegitiDevs:master Apr 11, 2026
1 check passed
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