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

Only use fullReason for the disconnect packet #776

Merged
merged 1 commit into from
Dec 5, 2020
Merged

Only use fullReason for the disconnect packet #776

merged 1 commit into from
Dec 5, 2020

Conversation

DeltaEvo
Copy link
Contributor

@DeltaEvo DeltaEvo commented Nov 5, 2020

No description provided.

Copy link
Member

@wvffle wvffle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM though I don't quite understand why the tests changed now.

@DeltaEvo
Copy link
Contributor Author

DeltaEvo commented Nov 6, 2020

I wasn't expecting the tests to change when I implemented this, but the tests check the end reason to check the kick reason
Before my change the endReason was transformed into Chat and then used as client end reason and as disconnect packet reason
Now the endReason is only transformed for the disconnect packet so the client end reason is not a JSON string anymore

@rom1504
Copy link
Member

rom1504 commented Nov 6, 2020

What is this pr supposed to fix/improve ?

@DeltaEvo
Copy link
Contributor Author

DeltaEvo commented Nov 6, 2020

What is this pr supposed to fix/improve ?

Oh yeah forgot the most important part, explaining what I want to improve x)

Since the merge of #711 there is now a fullReason that can be used to use minecraft formated chat as the disconnection reason, the json object to format chat can become quickly big with formatting, so this make the Client end reason very difficult to read

fullReason also discard the first reason argument of the end function, so instead of using a minecraft formated chat json as client end reason I thought using the first string reason parameter permit us to have a more readable reason since the end reason is mostly used for debugging

PS: I will edit my commit later to specify what this change improve

And keep endReason for the client end reason, to avoid having
big JSON string that are more difficult to read
@rom1504 rom1504 merged commit 5873c1a into PrismarineJS:master Dec 5, 2020
matthi4s pushed a commit to aternosorg/node-minecraft-protocol that referenced this pull request Jun 9, 2021
And keep endReason for the client end reason, to avoid having
big JSON string that are more difficult to read
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.

3 participants