fix: properly extract kick messages from downstream services#1399
fix: properly extract kick messages from downstream services#1399
Conversation
Test Results 48 files ±0 48 suites ±0 1m 40s ⏱️ +6s Results for commit 4ea6bfe. ± Comparison against base commit 1c96cfb. This pull request removes 34 and adds 34 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
|
I ask the developers to fix this problem as soon as possible and add this Pull because plugins on punishment, like LibertyBans and LiteBans outside the proxy system, don't work because of it. LibertyBans 100% does not work. Other plugins on my servers that kick players with a reason don't work either, there are conflicts with messages from CloudNet, for example “proxy-join-disconnect-because-no-hub” in Bridge. If some plugin outside the proxy tries to ban/kick or send a message to the client, the message “proxy-join-disconnect-because-no-hub” will appear or in some cases account lockout may not happen. I don't understand how to make my server support bans/kicks without spending money on my Cloudnet plugin to fix such a serious incompatibility issue with other plugins. That said, I don't want to give up Cloudnet for this. Hopefully the problem will be resolved. |
### Motivation Currently, when a server unexpectedly closes the connection to the proxy, the player gets disconnected as CloudNet does not provide a fallback server. This is due to the fact that the ServerKickEvent is only called when the server sends a kick packet. In case the server goes down, BungeeCord tries to connect the player to the first priority (in our case a dummy `lobby` server as BungeeCord won't start without a priority) with the connection reason `SERVER_DOWN_REDIRECT`. We can catch this reason and provide a proper fallback in `ServerConnectEvent`. ### Modification Catch the `SERVER_DOWN_REDIRECT` reason in `ServerConnectEvent` and provide a proper fallback. If no fallback is available, disconnect the player with the new disconnection reason introduced in #1399. ### Result Players will be provided with a proper fallback in case of an unexpected connection close by the downstream service instead of being disconnected.
…Service#1399) ### Motivation When players are kicked from e.g. a Lobby service, the message the Lobby kicked them with is lost. This is a problem when having issues with version mismatches or plugins kicking someone from a fallback as the kick message is lost there too. ### Modification When getting kicked from a service and no other fallback is available the player will be kicked with the kick message of the downstream service. If there is no kick message, the newly introduced "server-kick-no-other-hub" message will be used. ### Result Kick reasons are properly usable in disconnect messages. --------- Co-authored-by: Pasqual Koschmieder <git@derklaro.dev>
…#1602) ### Motivation Currently, when a server unexpectedly closes the connection to the proxy, the player gets disconnected as CloudNet does not provide a fallback server. This is due to the fact that the ServerKickEvent is only called when the server sends a kick packet. In case the server goes down, BungeeCord tries to connect the player to the first priority (in our case a dummy `lobby` server as BungeeCord won't start without a priority) with the connection reason `SERVER_DOWN_REDIRECT`. We can catch this reason and provide a proper fallback in `ServerConnectEvent`. ### Modification Catch the `SERVER_DOWN_REDIRECT` reason in `ServerConnectEvent` and provide a proper fallback. If no fallback is available, disconnect the player with the new disconnection reason introduced in CloudNetService#1399. ### Result Players will be provided with a proper fallback in case of an unexpected connection close by the downstream service instead of being disconnected.
Motivation
When players are kicked from e.g. a Lobby service, the message the Lobby kicked them with is lost. This is a problem when having issues with version mismatches or plugins kicking someone from a fallback as the kick message is lost there too.
Modification
When getting kicked from a service and no other fallback is available the player will be kicked with the kick message of the downstream service. If there is no kick message, the newly introduced "server-kick-no-other-hub" message will be used.
Also if a player joins and there is no fallback and the "proxy-join-disconnect-because-no-hub" is not set to
null, the player will be disconnected with the set message. If the message is not set, cloudnet won't do anything. This ensures that other plugins can overwrite the decision.Result
Kick reasons are properly displayed.