vasyyshakov / zombiereloaded

Automatically exported from code.google.com/p/zombiereloaded
0 stars 0 forks source link

Make support for admin flags in class permissions #237

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Rename "group" attribute to "access_groups" and make new "access_flags" 
attributes. Both should support multiple values. Groups and flags will be 
separated by ";".

Flag values are named. Valid values:
reservation
generic
kick
ban
unban
slay
changemap
cvars
config
chat
vote
password
rcon
cheats
custom[1-6]
root

Both attributes specify a minimum requirement to use the class.

If a player match either a flag or a group the player is granted access.
If no values are specified, everyone is granted access.

Original issue reported on code.google.com by richard.helgeby@gmail.com on 1 Oct 2010 at 8:49

GoogleCodeExporter commented 8 years ago
Implementation tasks:
- Make wrapper function ClassHasAccess for parsing both attributes and check if 
a client has access to a class. To be used in class menus and when assigning 
classes.
- Add validation function for the new attribute. Check for blank, or predefined 
attributes.

Original comment by richard.helgeby@gmail.com on 1 Oct 2010 at 8:59

GoogleCodeExporter commented 8 years ago
Add access_mode with options "group", "flag", "either" and "both".

With "group" and "flag" it will only check either groups or flags.
With "either" the player must be in either one of the groups or have one of the 
flags.
With "both" the player must both be in one of the groups and have one of the 
flags.

Original comment by richard.helgeby@gmail.com on 20 Dec 2010 at 8:27