diff options
author | shennetsind <ind@henn.et> | 2014-01-13 23:52:27 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2014-01-13 23:52:27 -0200 |
commit | e1a0059919dbc4f5c7e803a496b8d150c0a070f5 (patch) | |
tree | 1f6b3b05202e9401ca8eadf3777cc8710a8eab05 /src/map/pc_groups.h | |
parent | 8d1b8108fcad1a628531801914950b5f92767b0a (diff) | |
download | hercules-e1a0059919dbc4f5c7e803a496b8d150c0a070f5.tar.gz hercules-e1a0059919dbc4f5c7e803a496b8d150c0a070f5.tar.bz2 hercules-e1a0059919dbc4f5c7e803a496b8d150c0a070f5.tar.xz hercules-e1a0059919dbc4f5c7e803a496b8d150c0a070f5.zip |
Fixed HPM support for group permissions
pcg->add_permission dropped, use 'AddGroupPermission("name",unsigned int var for mask id)'
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/pc_groups.h')
-rw-r--r-- | src/map/pc_groups.h | 13 |
1 files changed, 11 insertions, 2 deletions
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; |