diff options
author | Haru <haru@dotalux.com> | 2016-02-16 17:12:36 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-02-17 10:40:41 +0100 |
commit | 0b491e07714f7c9d81a5618756c7b663c8cfcf5d (patch) | |
tree | 15232b0c981928c7d971ce0708613419f1fad3b8 /src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | |
parent | d38019541508d0efb3477ef4938ea8e939444333 (diff) | |
download | hercules-0b491e07714f7c9d81a5618756c7b663c8cfcf5d.tar.gz hercules-0b491e07714f7c9d81a5618756c7b663c8cfcf5d.tar.bz2 hercules-0b491e07714f7c9d81a5618756c7b663c8cfcf5d.tar.xz hercules-0b491e07714f7c9d81a5618756c7b663c8cfcf5d.zip |
HPM Hooks Update
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_login.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc index bf0610688..ced7b4cc9 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc @@ -971,14 +971,14 @@ void HP_libconfig_write(const config_t *config, FILE *stream) { } return; } -void HP_libconfig_set_auto_convert(config_t *config, int flag) { +void HP_libconfig_set_options(config_t *config, int options) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_auto_convert_pre ) { - void (*preHookFunc) (config_t *config, int *flag); + if( HPMHooks.count.HP_libconfig_set_options_pre ) { + void (*preHookFunc) (config_t *config, int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_auto_convert_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_libconfig_set_auto_convert_pre[hIndex].func; - preHookFunc(config, &flag); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_set_options_pre[hIndex].func; + preHookFunc(config, &options); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -986,25 +986,25 @@ void HP_libconfig_set_auto_convert(config_t *config, int flag) { } } { - HPMHooks.source.libconfig.set_auto_convert(config, flag); + HPMHooks.source.libconfig.set_options(config, options); } - if( HPMHooks.count.HP_libconfig_set_auto_convert_post ) { - void (*postHookFunc) (config_t *config, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_auto_convert_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_libconfig_set_auto_convert_post[hIndex].func; - postHookFunc(config, &flag); + if( HPMHooks.count.HP_libconfig_set_options_post ) { + void (*postHookFunc) (config_t *config, int *options); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_set_options_post[hIndex].func; + postHookFunc(config, &options); } } return; } -int HP_libconfig_get_auto_convert(const config_t *config) { +int HP_libconfig_get_options(const config_t *config) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_get_auto_convert_pre ) { + if( HPMHooks.count.HP_libconfig_get_options_pre ) { int (*preHookFunc) (const config_t *config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_auto_convert_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_libconfig_get_auto_convert_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_get_options_pre[hIndex].func; retVal___ = preHookFunc(config); } if( *HPMforce_return ) { @@ -1013,12 +1013,12 @@ int HP_libconfig_get_auto_convert(const config_t *config) { } } { - retVal___ = HPMHooks.source.libconfig.get_auto_convert(config); + retVal___ = HPMHooks.source.libconfig.get_options(config); } - if( HPMHooks.count.HP_libconfig_get_auto_convert_post ) { + if( HPMHooks.count.HP_libconfig_get_options_post ) { int (*postHookFunc) (int retVal___, const config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_auto_convert_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_libconfig_get_auto_convert_post[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_get_options_post[hIndex].func; retVal___ = postHookFunc(retVal___, config); } } @@ -1344,6 +1344,33 @@ const char* HP_libconfig_setting_get_string(const config_setting_t *setting) { } return retVal___; } +config_setting_t* HP_libconfig_setting_lookup(config_setting_t *setting, const char *name) { + int hIndex = 0; + config_setting_t* retVal___ = NULL; + if( HPMHooks.count.HP_libconfig_setting_lookup_pre ) { + config_setting_t* (*preHookFunc) (config_setting_t *setting, const char *name); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_pre[hIndex].func; + retVal___ = preHookFunc(setting, name); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.libconfig.setting_lookup(setting, name); + } + if( HPMHooks.count.HP_libconfig_setting_lookup_post ) { + config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, const char *name); + for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, setting, name); + } + } + return retVal___; +} int HP_libconfig_setting_lookup_int(const config_setting_t *setting, const char *name, int *value) { int hIndex = 0; int retVal___ = 0; @@ -2180,33 +2207,6 @@ config_setting_t* HP_libconfig_lookup(const config_t *config, const char *filepa } return retVal___; } -config_setting_t* HP_libconfig_lookup_from(config_setting_t *setting, const char *filepath) { - int hIndex = 0; - config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_lookup_from_pre ) { - config_setting_t* (*preHookFunc) (config_setting_t *setting, const char *filepath); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_from_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_libconfig_lookup_from_pre[hIndex].func; - retVal___ = preHookFunc(setting, filepath); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.libconfig.lookup_from(setting, filepath); - } - if( HPMHooks.count.HP_libconfig_lookup_from_post ) { - config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_from_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_libconfig_lookup_from_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, filepath); - } - } - return retVal___; -} int HP_libconfig_lookup_int(const config_t *config, const char *filepath, int *value) { int hIndex = 0; int retVal___ = 0; |