Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: properly extract kick messages from downstream services #1399

Open
wants to merge 3 commits into
base: nightly
Choose a base branch
from

Conversation

0utplay
Copy link
Member

@0utplay 0utplay commented May 16, 2024

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.

@0utplay 0utplay added v: 4.X This pull should be included in the 4.0 release t: fix A pull request introducing a fix for a bug. in: module An issue/pull request releated to one of the internal modules labels May 16, 2024
@0utplay 0utplay added this to the 4.0.0-RC11 milestone May 16, 2024
Copy link

Test Results

 47 files  ±0   47 suites  ±0   1m 33s ⏱️ +5s
395 tests ±0  395 ✅ ±0  0 💤 ±0  0 ❌ ±0 
726 runs  ±0  726 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 4603add. ± Comparison against base commit 3e59415.

This pull request removes 23 and adds 23 tests. Note that renamed tests count towards both.
eu.cloudnetservice.driver.document.DocumentSerialisationTest ‑ [4] {"b":1,"s":2,"i":3,"l":4,"f":5.0,"d":6.0,"c":"/","string":"Hello, World!","bol":true,"cloud":["Ben?","Yes","No","HoHoHoHo"],"world":{"this":"is","hello":"world","insane":"!"}}, PRETTY
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [10] 23967, null
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [23] 2024-04-30T16:32:20.774212185Z
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [24] 2024-04-30T16:24:00.774216353Z
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [2] XR0PG9HU2WB39113D5YO5WZSG, null
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [38] 2024-04-30
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [3] -2075990072, null
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [3] Lobbyhello156:39e282e6-7c59-4201-b6ae-2b004b744d3d
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [47] 16:32:20.774405716
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [4] -5370570321487156996, null
…
eu.cloudnetservice.driver.document.DocumentSerialisationTest ‑ [4] {"b":1,"s":2,"i":3,"l":4,"f":5.0,"d":6.0,"c":"/","string":"Hello, World!","bol":true,"cloud":["Ben?","Yes","No","HoHoHoHo"],"world":{"insane":"!","hello":"world","this":"is"}}, PRETTY
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [10] 26992, null
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [23] 2024-05-16T14:19:40.186573265Z
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [24] 2024-05-16T14:11:20.186577744Z
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [2] T06WBEXOIOW1VD0P1MGTVB5L1, null
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [38] 2024-05-16
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [3] 1999253207, null
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [3] Lobbyhello156:8ebe5e09-7cf7-4812-af87-dfa58dafe2e3
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [47] 14:19:40.186847875
eu.cloudnetservice.driver.network.rpc.object.DefaultObjectMapperTest ‑ [4] -7637708601134030526, null
…

@derklaro derklaro modified the milestones: 4.0.0-RC11, 4.0.0-RC12 Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: module An issue/pull request releated to one of the internal modules t: fix A pull request introducing a fix for a bug. v: 4.X This pull should be included in the 4.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants