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

Admin Actions: Improves Feedback and Authority checks #1081

Merged
merged 4 commits into from Mar 13, 2022

Conversation

Arufonsu
Copy link
Contributor

@Arufonsu Arufonsu commented Feb 18, 2022

  • Applied panda's partial re-implementation (with somes changes).

  • Removed unreachable code from the UserActivityHistory (??' left operand is never null, so we don't need Guid.Empty).

  • From now on, bans are always announced globally.

  • From now on, mutes are always announced globally.

  • Adds ability to Ban/Unban & Mute/Unmute even if the target is Offline.

  • Adds ability to Unban/Unmute in game by using the target's player name.
    (Unban/Unmute doesn't requires you to know the username of the player anymore.)

  • Added feedback messages for whenever we try to Unban/Unmute a player that's not Banned/Muted.

  • Improved feedback messages by adding colours to their font.
    ( Warning/errors > Red | Sucess > Green or Global Msgs )

  • Added UserActivityHistory for ingame BanFail, Kill, KillFail, Mute, MuteFail, Kick and KickFail.

  • Added authority level checks with feedback messages for in game actions: WarpToMeAction, Ban, Kick, Kill and Mute
    (Should resolve Moderators can Ban Administrators #1061)

  • [NOT TESTED] Added authority level checks with feedback messages for the API: Ban, Kick, Kill and Mute.
    (Need help from experienced users/devs with testing this one !)

In game authority level checks for: WarpToMeAction, Ban, Kick, Kill and Mute (Solves #1061)

imagen
(Example: Mods are unable to Ban, Kick, Kill, Mute nor warp Admins to them, due to the lack of authority they have over them.)

Feedback improvements for Ban/Unban.

imagen
This PR also allows us to Un-ban players by using their player's Names instead of their Usernames! this feels more consistent and allows it for an easier management since we won't have to look over the database anymore for the banned player's Username. Uban action will also check up if the target is not banned, sending a proper informative message since we can't "unban" someone that's not banned.

Feedback improvements for Mute/Umute.

imagen
Same as before, unmute will check wether the target is muted or not, if is not muted, we don't need to unmute the target.

Also, with this update, we won't see error logs in the server since we won't hit into this issue anymore:
imagen

In both of the previously mentioned cases ^, we now check up if the player exists

(Ban and Mute can be performed despite the online status of players now. so instead of checking and announcing their online status to whoever is performing the action, we are going to simply check and inform to the action performer if they exist.)
imagen

* Should resolve AscensionGameDev#1061
* Administrators can't be banned without the proper authority level anymore.
* Applied panda's partial re-implementation.
@Arufonsu Arufonsu linked an issue Feb 18, 2022 that may be closed by this pull request
@Arufonsu Arufonsu added the bug Something isn't working label Feb 18, 2022
@blinkuz
Copy link
Contributor

blinkuz commented Feb 19, 2022

I can help you test the api, I'm going to write you on discord.

@Arufonsu Arufonsu marked this pull request as draft February 19, 2022 15:14
@blinkuz is helping to test the API Ban.
- From now on, bans are always announced globally.
- Simplified the failed ban attempt error log.
- Removed unreachable code from the UserActivityHistory Ban Log (??' left operand is never null, so we don't need Guid.Empty).
@Arufonsu Arufonsu changed the title Fix: Moderators shouln't be able to Ban Administrators. Improves Feedback and checks of Authority Actions. Feb 20, 2022
@Arufonsu Arufonsu added the enhancement Minor feature addition or quality of life change label Feb 20, 2022
@Arufonsu Arufonsu linked an issue Feb 21, 2022 that may be closed by this pull request
* Adds ability to Ban/Unban & Mute/Unmute even if the target is Offline.
* Adds ability to Unban/Unmute in game by using the target's player name. (Unban/Unmute doesn't requires you to know the username of the player anymore.)
* Added feedback messages for whenever we try to Unban/Unmute a player that's not Banned/Muted.
* Improved feedback messages by adding colours to their font. ( Warning/errors > Red | Sucess > Green or Global Msgs )
* Added UserActivityHistory for ingame BanFail, Kill, KillFail, Mute, MuteFail, Kick and KickFail.
* Added authority level checks with feedback messages for in game actions: WarpToMeAction, Ban, Kick, Kill and Mute
* Added authority level checks with feedback messages for the API: Ban, Kick, Kill and Mute.
@Arufonsu Arufonsu marked this pull request as ready for review February 21, 2022 05:16
Copy link
Contributor

@AlexVild AlexVild left a comment

Choose a reason for hiding this comment

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

As far as I'm aware, this looks good. But also the permissions/authority area is shockingly complex, so I don't know if anything is being violated here.

@Arufonsu
Copy link
Contributor Author

Arufonsu commented Mar 6, 2022

t also the permissions/authority area is shockingly complex, so I don't know if anything is being violated here.

Still need help by testing the API power restrictions, i probably went a bit farther than what we actually needed, but still, a lot of things were lacking of permission and authority checks.

@Arufonsu Arufonsu changed the title Improves Feedback and checks of Authority Actions. Admin Actions: Improves Feedback and Authority checks Mar 11, 2022
@lodicolo lodicolo merged commit a97338c into AscensionGameDev:development Mar 13, 2022
@Arufonsu Arufonsu deleted the AdminBanFix branch March 13, 2022 04:35
@Arufonsu
Copy link
Contributor Author

Arufonsu commented Mar 13, 2022

Reminder for the Dev branch testers:
The API actions are not fully tested yet.

( will edit / remove this whenever the API actions are fully tested and/or fixed)

AlexVild pushed a commit to AlexVild/Middle-Ages-Online-Source that referenced this pull request Mar 24, 2022
…ev#1081)

* Fix: Moderators shouln't be able to Ban Administrators.

* Should resolve AscensionGameDev#1061
* Administrators can't be banned without the proper authority level anymore.
* Applied panda's partial re-implementation.

* 2nd Authority Comparison Test

@blinkuz is helping to test the API Ban.

* Cleanup and minor improvements.

- From now on, bans are always announced globally.
- Simplified the failed ban attempt error log.
- Removed unreachable code from the UserActivityHistory Ban Log (??' left operand is never null, so we don't need Guid.Empty).

* Actions: Improved Feedback and Authority checks.

* Adds ability to Ban/Unban & Mute/Unmute even if the target is Offline.
* Adds ability to Unban/Unmute in game by using the target's player name. (Unban/Unmute doesn't requires you to know the username of the player anymore.)
* Added feedback messages for whenever we try to Unban/Unmute a player that's not Banned/Muted.
* Improved feedback messages by adding colours to their font. ( Warning/errors > Red | Sucess > Green or Global Msgs )
* Added UserActivityHistory for ingame BanFail, Kill, KillFail, Mute, MuteFail, Kick and KickFail.
* Added authority level checks with feedback messages for in game actions: WarpToMeAction, Ban, Kick, Kill and Mute
* Added authority level checks with feedback messages for the API: Ban, Kick, Kill and Mute.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement Minor feature addition or quality of life change
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Actions need more Support, Feedback and Authority checks. Moderators can Ban Administrators
4 participants