-
Notifications
You must be signed in to change notification settings - Fork 37
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
Alts enhancements #2 #668
base: master
Are you sure you want to change the base?
Alts enhancements #2 #668
Conversation
Checks alts whenever a player joins and sends a staff message when at least one muted or banned alt is found. A list of muted/banned alts can be seen when hovering over the message. Muted alts are marked yellow, banned ones are marked red. Bans color-override mutes just like in #651 This also marks online players green (overridden by active mutes and bans) in /alts and solves #589 completely except for showing the active punishment by hovering over a name in /alts.
While this PR works in essence, I'm afraid of the amount of stress this will put onto the backend. Players often join the server using different accounts which would result in many HTTP requests being sent on each player join. It's also not rare to find players with over 10 alts under the same IP. An alternative solution to this could be implementing an endpoint on the backend that returns all the necessary data in a single request, which wouldn't render this PR useless, just needing a few changes. |
+1 to reducing backend load |
Since recently, /punishments shows us a list of a user's punishments as well as all the punishments on his IP. This change made /alts mark alt account's names as yellow and red as well, while they might not be currently muted or banned, but have an alt which is. This pulll request changes the following: - Checks while iterating through the punishments of every alt, whether the punishment.getPunished() equals the alt name which is currently checked. If it does not, it continues with the next punishment. - Checks the same while iterating through the punishments in the /punishments command, and doesn't list those punishments if the view is restricted (user does not have "tgm.punish.list") - Checks for every alt in /alts if the player is online, and if so, marks the name green, just like in WarzoneMC#668. It is overwritten by active mutes and bans. Tested.
Checks alts whenever a player joins and sends a staff message when at least one muted or banned alt is found. A list of muted/banned alts can be seen when hovering over the message. Muted alts are marked yellow, banned ones are marked red.
Bans color-override mutes just like in #651
This also marks online players green (overridden by active mutes and bans) in /alts and solves #589 completely except for showing the active punishment by hovering over a name in /alts.