feat(lite): add configurable disconnect messages#677
Open
NixNux123 wants to merge 1 commit intominekube:masterfrom
Open
feat(lite): add configurable disconnect messages#677NixNux123 wants to merge 1 commit intominekube:masterfrom
NixNux123 wants to merge 1 commit intominekube:masterfrom
Conversation
This commit introduces configurable disconnect messages for lite mode. Previously, when a route or backend server could not be found, the player's connection was simply closed without any explanation. This change adds the ability to define custom messages for these scenarios. New configuration options: • lite.noRouteMessage: A global message sent when no route matches the player's virtual host. • lite.noBackendMessage: A global default message sent when all backends for a matched route are offline. • lite.routes[].noBackendMessage: A route-specific message that overrides the global noBackendMessage. These messages support both legacy color codes and modern JSON text components. The default configuration files have been updated with examples.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces configurable disconnect messages for lite mode, significantly improving the user experience when a connection cannot be established.
Currently, when a player attempts to connect in lite mode and either no matching route is found or all backend servers for a route are offline, the connection is simply closed. The player receives no feedback as to why their connection failed, which can be confusing.
This PR adds the ability to configure custom disconnect messages for these scenarios. This provides server administrators with the flexibility to display user-friendly and informative messages.
The following options have been added to the lite section of config.yml:
• noRouteMessage: A global message to be sent when no route matches the player's connection address.
• noBackendMessage: A global default message for when all backends for a matched route are offline.
• routes[].noBackendMessage: A route-specific message that overrides the global noBackendMessage, allowing for customized messages per route (e.g., "The lobby is down for maintenance.").
All message fields support both legacy § color codes and modern JSON text component format.