From e1a0059919dbc4f5c7e803a496b8d150c0a070f5 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 13 Jan 2014 23:52:27 -0200 Subject: Fixed HPM support for group permissions pcg->add_permission dropped, use 'AddGroupPermission("name",unsigned int var for mask id)' Signed-off-by: shennetsind --- src/map/pc_groups.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/map/pc_groups.h') diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h index 943fb7fa5..3396512ea 100644 --- a/src/map/pc_groups.h +++ b/src/map/pc_groups.h @@ -49,12 +49,19 @@ struct GroupSettings { config_setting_t *root; // groups.[] }; +typedef struct GroupSettings GroupSettings; + struct pc_groups_permission_table { char *name; unsigned int permission; }; -typedef struct GroupSettings GroupSettings; +/* used by plugins to list permissions */ +struct pc_groups_new_permission { + unsigned int pID;/* plugin identity (for the future unload during runtime support) */ + char *name;/* aStrdup' of the permission name */ + unsigned int *mask;/* pointer to the plugin val that will store the value of the mask */ +}; struct pc_groups_interface { /* */ @@ -64,6 +71,9 @@ struct pc_groups_interface { struct pc_groups_permission_table *permissions; unsigned char permission_count; /* */ + struct pc_groups_new_permission *HPMpermissions; + unsigned char HPMpermissions_count; + /* */ void (*init) (void); void (*final) (void); void (*reload) (void); @@ -76,7 +86,6 @@ struct pc_groups_interface { const char* (*get_name) (GroupSettings *group); int (*get_level) (GroupSettings *group); int (*get_idx) (GroupSettings *group); - unsigned int (*add_permission) (const char *name); }; struct pc_groups_interface *pcg; -- cgit v1.2.3-60-g2f50