Open oscar-broman opened 12 years ago
I suggest you, if you have time to implement it, to rename this to Acess Control List, it does exactly what you said but covers whole class of problems.
What do you mean? Create some generic permission system? I'm up for ideas!
Something like that, yes. Have a look at Multi Theft Auto's Access Control List. In my opinion it's exactly what you are looking, with some modifications, of course, for example, renaming their concept of 'resource' to yours 'module' will fit perfectly. All in all, i see Access Control List as the best and most flexible solution to this problem.
y_groups...
Yeah, kinda leaning towards just going with y_groups. Though the one thing missing is inheritance.
Easy enough to add really, and would address an issue several people have had.
I just remembered something. The way y_groups is designed is such that it can be used to set group permissions on any library with "Library_SetPlayer" and "Library_GetPlayer" functions - so if you have your own and have those two functions you can define "Library" and the max number of items in your library, include "y_groups", and now have group permissions.
I mention this for one reason, something I realised was technically possible a while ago but never tried it. One library with this "Get"/"Set" interface is "y_groups" itself! Meaning you can have groups of groups so that when a player gets added to a group, they will get added to all the groups under that group. So really, y_groups DOES have inheritance if you do this (or something like this):
#include <YSI\y_groups>
#define GROUP_LIBRARY_NAME<%0...%1> %0Group%1
#define GROUP_LIBRARY_SIZE MAX_GROUPS
#include <YSI\y_groups>
#undef GROUP_LIBRARY_NAME
#undef GROUP_LIBRARY_SIZE
#undef _GROUP_MAKE_NAME
#undef _GROUP_MAKE_LIMIT
Then you will have such lovely functions as "Group_SetGroup" and "Group_SetGlobalGroupDefault", the former making a given group a member of another group, the latter making every group a member of every other group (or no groups members of any groups - I suggest you do the latter as a default, also for "Group_SetGroupDefault").
This has been added, surely?
Only per-player, not for groups.
I.e. only GROUP_ADMIN can spawn with the chicken skin.