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

Alts enhancements #2 #668

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Alts enhancements #2 #668

wants to merge 4 commits into from

Conversation

Atdit
Copy link
Contributor

@Atdit Atdit commented Jul 4, 2020

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.

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.
@Atdit
Copy link
Contributor Author

Atdit commented Jul 4, 2020

image
image
image

Tested.

@jorgeberrex
Copy link
Contributor

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.

@jellz
Copy link
Collaborator

jellz commented Jul 13, 2020

1 to reducing backend load

Atdit added a commit to Atdit/TGM that referenced this pull request Jan 28, 2021
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.
@Atdit Atdit mentioned this pull request Jan 28, 2021
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.

5 participants