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 nicked player sorting in player list #1289

Merged
merged 1 commit into from
Jan 24, 2024
Merged

Conversation

zzufx
Copy link
Contributor

@zzufx zzufx commented Jan 3, 2024

Currently, when a player with a rank is disguised, they keep their "real" position on the player list (appearing higher on the list than unranked players), making it extremely easy to differentiate nicked players from regular players as they're not following alphabetical order.

This PR adds some extra checks to the "group permission check" stage and after in PlayerOrder.

I have tested this in a local server with 4 clients.

@zzufx zzufx requested a review from Electroid as a code owner January 3, 2024 18:50
@Pablete1234
Copy link
Member

Be aware, this will put tbem always at the end, since everyone has the default group

Comment on lines 74 to 75
boolean aPerm = a.hasPermission(permission);
boolean bPerm = b.hasPermission(permission);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
boolean aPerm = a.hasPermission(permission);
boolean bPerm = b.hasPermission(permission);
boolean aPerm = a.hasPermission(permission) && aNick == null;
boolean bPerm = b.hasPermission(permission) && bNick == null;

If just included here, makes the follow-up if simpler

@Pablete1234 Pablete1234 added bug Something isn't working ready PR is ready to merge labels Jan 4, 2024
@Electroid Electroid merged commit 436f925 into PGMDev:dev Jan 24, 2024
2 checks passed
@zzufx zzufx deleted the tab-test branch January 24, 2024 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready PR is ready to merge
Development

Successfully merging this pull request may close these issues.

3 participants