partiusfabaa / cs2-MiniAdmin

Adds basic administrator functions
44 stars 5 forks source link

[REQ] Improvements to the admin flag system (something similar to CSSharp) #28

Closed crashzk closed 5 months ago

crashzk commented 6 months ago

Currently it would be these flags and the access they allow for administrators: https://github.com/partiusfabaa/cs2-MiniAdmin/blob/daa0d83afecd96ca33787dd05481bd23f38cf05d/MiniAdmin/BaseAdmin.cs#L45-L56

I think something like this would be more interesting:

 public enum AdminFlag 
 { 
     Reservation= '@css/reservation', 
     Generic = '@css/generic', 
     Kick = '@css/kick', 
     Ban = '@css/ban', 
     Unban = '@css/unban', 
     Vip = '@css/vip', 
     Slay = '@css/slay', 
     Changemap = '@css/changemap', 
     Cvar = '@css/cvar', 
     Config = '@css/config', 
     Chat = '@css/chat', 
     Vote = '@css/vote', 
     Password = '@css/password', 
     Rcon = '@css/rcon', 
     Cheats = '@css/cheats', 
     Root = '@css/root' 
 } 

Why this change

Currently I already have some admins registered in the CSSharp admins/groups file. However, new admins/vips would like to use the MiniAdmin plugin and those who already have CSS admins should not remove it, leave it there.

So those who already have an admin through CSS would automatically have access to the MiniAdmin plugin commands and those I add through MiniAdmin already have access to its commands normally in addition to the other flags that already have in the CSS that are not included yet. This way, he has access to other plugins that already use this CSS admin system.

Example, the @css/vip and @css/reservation flags that on my server give access to a reserved slot and other benefits, as in MiniAdmin the player who is added by the plugin would not have them as admin does not have access to these benefits, right?

Anyway, a synchronization between the CSS admin and MiniAdmin flags would be perfect.

crashzk commented 6 months ago

Any news on this? Anything I can help with?