Skip to content

feat(lite): add configurable disconnect messages#677

Open
NixNux123 wants to merge 1 commit intominekube:masterfrom
NixNux123:lite-disconnect-msg
Open

feat(lite): add configurable disconnect messages#677
NixNux123 wants to merge 1 commit intominekube:masterfrom
NixNux123:lite-disconnect-msg

Conversation

@NixNux123
Copy link
Copy Markdown
Collaborator

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.

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.
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.

1 participant