summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHercules.ws <dev@herc.ws>2017-10-30 02:24:58 +0100
committerHerculesWSAPI <dev@herc.ws>2017-10-30 02:24:58 +0100
commit9519c40b00802dfb22070884820ab4a26d7c5ba5 (patch)
tree26577cf5fac7ff1f2c3f81e0cbd50eed37b1736c /src
parent703a57698fc04d4cba818041b67ffbb028f56e2b (diff)
downloadhercules-9519c40b00802dfb22070884820ab4a26d7c5ba5.tar.gz
hercules-9519c40b00802dfb22070884820ab4a26d7c5ba5.tar.bz2
hercules-9519c40b00802dfb22070884820ab4a26d7c5ba5.tar.xz
hercules-9519c40b00802dfb22070884820ab4a26d7c5ba5.zip
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc26
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc52
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc13
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc347
4 files changed, 438 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index d6ce83912..fed5810f4 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -3848,6 +3848,32 @@ typedef void (*HPMHOOK_pre_login_config_set_defaults) (void);
typedef void (*HPMHOOK_post_login_config_set_defaults) (void);
typedef bool (*HPMHOOK_pre_login_config_read) (const char **filename, bool *included);
typedef bool (*HPMHOOK_post_login_config_read) (bool retVal___, const char *filename, bool included);
+typedef bool (*HPMHOOK_pre_login_config_read_inter) (const char **filename, struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_login_config_read_inter) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_login_config_read_console) (const char **filename, struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_login_config_read_console) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_login_config_read_log) (const char **filename, struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_login_config_read_log) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_login_config_read_account) (const char **filename, struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_login_config_read_account) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_login_config_read_permission) (const char **filename, struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_login_config_read_permission) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_login_config_read_permission_hash) (const char **filename, struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_login_config_read_permission_hash) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_login_config_read_permission_blacklist) (const char **filename, struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_login_config_read_permission_blacklist) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_login_config_read_users) (const char **filename, struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_login_config_read_users) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+typedef void (*HPMHOOK_pre_login_clear_dnsbl_servers) (void);
+typedef void (*HPMHOOK_post_login_clear_dnsbl_servers) (void);
+typedef void (*HPMHOOK_pre_login_config_set_dnsbl_servers) (struct config_setting_t **setting);
+typedef void (*HPMHOOK_post_login_config_set_dnsbl_servers) (struct config_setting_t *setting);
+typedef void (*HPMHOOK_pre_login_clear_client_hash_nodes) (void);
+typedef void (*HPMHOOK_post_login_clear_client_hash_nodes) (void);
+typedef void (*HPMHOOK_pre_login_config_set_md5hash) (struct config_setting_t **setting);
+typedef void (*HPMHOOK_post_login_config_set_md5hash) (struct config_setting_t *setting);
+typedef uint16 (*HPMHOOK_pre_login_convert_users_to_colors) (uint16 *users);
+typedef uint16 (*HPMHOOK_post_login_convert_users_to_colors) (uint16 retVal___, uint16 users);
#endif // LOGIN_LOGIN_H
#ifdef CHAR_LOGINIF_H /* loginif */
typedef void (*HPMHOOK_pre_loginif_init) (void);
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
index 57c1e0233..9c38c0c4c 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
@@ -376,6 +376,32 @@ struct {
struct HPMHookPoint *HP_login_config_set_defaults_post;
struct HPMHookPoint *HP_login_config_read_pre;
struct HPMHookPoint *HP_login_config_read_post;
+ struct HPMHookPoint *HP_login_config_read_inter_pre;
+ struct HPMHookPoint *HP_login_config_read_inter_post;
+ struct HPMHookPoint *HP_login_config_read_console_pre;
+ struct HPMHookPoint *HP_login_config_read_console_post;
+ struct HPMHookPoint *HP_login_config_read_log_pre;
+ struct HPMHookPoint *HP_login_config_read_log_post;
+ struct HPMHookPoint *HP_login_config_read_account_pre;
+ struct HPMHookPoint *HP_login_config_read_account_post;
+ struct HPMHookPoint *HP_login_config_read_permission_pre;
+ struct HPMHookPoint *HP_login_config_read_permission_post;
+ struct HPMHookPoint *HP_login_config_read_permission_hash_pre;
+ struct HPMHookPoint *HP_login_config_read_permission_hash_post;
+ struct HPMHookPoint *HP_login_config_read_permission_blacklist_pre;
+ struct HPMHookPoint *HP_login_config_read_permission_blacklist_post;
+ struct HPMHookPoint *HP_login_config_read_users_pre;
+ struct HPMHookPoint *HP_login_config_read_users_post;
+ struct HPMHookPoint *HP_login_clear_dnsbl_servers_pre;
+ struct HPMHookPoint *HP_login_clear_dnsbl_servers_post;
+ struct HPMHookPoint *HP_login_config_set_dnsbl_servers_pre;
+ struct HPMHookPoint *HP_login_config_set_dnsbl_servers_post;
+ struct HPMHookPoint *HP_login_clear_client_hash_nodes_pre;
+ struct HPMHookPoint *HP_login_clear_client_hash_nodes_post;
+ struct HPMHookPoint *HP_login_config_set_md5hash_pre;
+ struct HPMHookPoint *HP_login_config_set_md5hash_post;
+ struct HPMHookPoint *HP_login_convert_users_to_colors_pre;
+ struct HPMHookPoint *HP_login_convert_users_to_colors_post;
struct HPMHookPoint *HP_md5_string_pre;
struct HPMHookPoint *HP_md5_string_post;
struct HPMHookPoint *HP_md5_binary_pre;
@@ -1049,6 +1075,32 @@ struct {
int HP_login_config_set_defaults_post;
int HP_login_config_read_pre;
int HP_login_config_read_post;
+ int HP_login_config_read_inter_pre;
+ int HP_login_config_read_inter_post;
+ int HP_login_config_read_console_pre;
+ int HP_login_config_read_console_post;
+ int HP_login_config_read_log_pre;
+ int HP_login_config_read_log_post;
+ int HP_login_config_read_account_pre;
+ int HP_login_config_read_account_post;
+ int HP_login_config_read_permission_pre;
+ int HP_login_config_read_permission_post;
+ int HP_login_config_read_permission_hash_pre;
+ int HP_login_config_read_permission_hash_post;
+ int HP_login_config_read_permission_blacklist_pre;
+ int HP_login_config_read_permission_blacklist_post;
+ int HP_login_config_read_users_pre;
+ int HP_login_config_read_users_post;
+ int HP_login_clear_dnsbl_servers_pre;
+ int HP_login_clear_dnsbl_servers_post;
+ int HP_login_config_set_dnsbl_servers_pre;
+ int HP_login_config_set_dnsbl_servers_post;
+ int HP_login_clear_client_hash_nodes_pre;
+ int HP_login_clear_client_hash_nodes_post;
+ int HP_login_config_set_md5hash_pre;
+ int HP_login_config_set_md5hash_post;
+ int HP_login_convert_users_to_colors_pre;
+ int HP_login_convert_users_to_colors_post;
int HP_md5_string_pre;
int HP_md5_string_post;
int HP_md5_binary_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
index 125c54a12..ba4b941a9 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
@@ -211,6 +211,19 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(login->parse_request_connection, HP_login_parse_request_connection) },
{ HP_POP(login->config_set_defaults, HP_login_config_set_defaults) },
{ HP_POP(login->config_read, HP_login_config_read) },
+ { HP_POP(login->config_read_inter, HP_login_config_read_inter) },
+ { HP_POP(login->config_read_console, HP_login_config_read_console) },
+ { HP_POP(login->config_read_log, HP_login_config_read_log) },
+ { HP_POP(login->config_read_account, HP_login_config_read_account) },
+ { HP_POP(login->config_read_permission, HP_login_config_read_permission) },
+ { HP_POP(login->config_read_permission_hash, HP_login_config_read_permission_hash) },
+ { HP_POP(login->config_read_permission_blacklist, HP_login_config_read_permission_blacklist) },
+ { HP_POP(login->config_read_users, HP_login_config_read_users) },
+ { HP_POP(login->clear_dnsbl_servers, HP_login_clear_dnsbl_servers) },
+ { HP_POP(login->config_set_dnsbl_servers, HP_login_config_set_dnsbl_servers) },
+ { HP_POP(login->clear_client_hash_nodes, HP_login_clear_client_hash_nodes) },
+ { HP_POP(login->config_set_md5hash, HP_login_config_set_md5hash) },
+ { HP_POP(login->convert_users_to_colors, HP_login_convert_users_to_colors) },
/* md5_interface */
{ HP_POP(md5->string, HP_md5_string) },
{ HP_POP(md5->binary, HP_md5_binary) },
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index 964d46b0a..0dbf2e5ae 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -4716,6 +4716,353 @@ bool HP_login_config_read(const char *filename, bool included) {
}
return retVal___;
}
+bool HP_login_config_read_inter(const char *filename, struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_login_config_read_inter_pre > 0) {
+ bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_inter_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_login_config_read_inter_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.login.config_read_inter(filename, config, imported);
+ }
+ if (HPMHooks.count.HP_login_config_read_inter_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_inter_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_login_config_read_inter_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_login_config_read_console(const char *filename, struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_login_config_read_console_pre > 0) {
+ bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_console_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_login_config_read_console_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.login.config_read_console(filename, config, imported);
+ }
+ if (HPMHooks.count.HP_login_config_read_console_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_console_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_login_config_read_console_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_login_config_read_log(const char *filename, struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_login_config_read_log_pre > 0) {
+ bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_log_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_login_config_read_log_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.login.config_read_log(filename, config, imported);
+ }
+ if (HPMHooks.count.HP_login_config_read_log_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_log_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_login_config_read_log_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_login_config_read_account(const char *filename, struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_login_config_read_account_pre > 0) {
+ bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_account_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_login_config_read_account_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.login.config_read_account(filename, config, imported);
+ }
+ if (HPMHooks.count.HP_login_config_read_account_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_account_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_login_config_read_account_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_login_config_read_permission(const char *filename, struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_login_config_read_permission_pre > 0) {
+ bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_login_config_read_permission_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.login.config_read_permission(filename, config, imported);
+ }
+ if (HPMHooks.count.HP_login_config_read_permission_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_login_config_read_permission_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_login_config_read_permission_hash(const char *filename, struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_login_config_read_permission_hash_pre > 0) {
+ bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_hash_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_login_config_read_permission_hash_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.login.config_read_permission_hash(filename, config, imported);
+ }
+ if (HPMHooks.count.HP_login_config_read_permission_hash_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_hash_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_login_config_read_permission_hash_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_login_config_read_permission_blacklist(const char *filename, struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_login_config_read_permission_blacklist_pre > 0) {
+ bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_blacklist_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_login_config_read_permission_blacklist_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.login.config_read_permission_blacklist(filename, config, imported);
+ }
+ if (HPMHooks.count.HP_login_config_read_permission_blacklist_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_blacklist_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_login_config_read_permission_blacklist_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_login_config_read_users(const char *filename, struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_login_config_read_users_pre > 0) {
+ bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_users_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_login_config_read_users_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.login.config_read_users(filename, config, imported);
+ }
+ if (HPMHooks.count.HP_login_config_read_users_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_users_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_login_config_read_users_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+void HP_login_clear_dnsbl_servers(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_login_clear_dnsbl_servers_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_dnsbl_servers_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_login_clear_dnsbl_servers_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.login.clear_dnsbl_servers();
+ }
+ if (HPMHooks.count.HP_login_clear_dnsbl_servers_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_dnsbl_servers_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_login_clear_dnsbl_servers_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_login_config_set_dnsbl_servers(struct config_setting_t *setting) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_login_config_set_dnsbl_servers_pre > 0) {
+ void (*preHookFunc) (struct config_setting_t **setting);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_dnsbl_servers_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_login_config_set_dnsbl_servers_pre[hIndex].func;
+ preHookFunc(&setting);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.login.config_set_dnsbl_servers(setting);
+ }
+ if (HPMHooks.count.HP_login_config_set_dnsbl_servers_post > 0) {
+ void (*postHookFunc) (struct config_setting_t *setting);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_dnsbl_servers_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_login_config_set_dnsbl_servers_post[hIndex].func;
+ postHookFunc(setting);
+ }
+ }
+ return;
+}
+void HP_login_clear_client_hash_nodes(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_login_clear_client_hash_nodes_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_client_hash_nodes_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_login_clear_client_hash_nodes_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.login.clear_client_hash_nodes();
+ }
+ if (HPMHooks.count.HP_login_clear_client_hash_nodes_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_client_hash_nodes_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_login_clear_client_hash_nodes_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_login_config_set_md5hash(struct config_setting_t *setting) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_login_config_set_md5hash_pre > 0) {
+ void (*preHookFunc) (struct config_setting_t **setting);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_md5hash_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_login_config_set_md5hash_pre[hIndex].func;
+ preHookFunc(&setting);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.login.config_set_md5hash(setting);
+ }
+ if (HPMHooks.count.HP_login_config_set_md5hash_post > 0) {
+ void (*postHookFunc) (struct config_setting_t *setting);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_md5hash_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_login_config_set_md5hash_post[hIndex].func;
+ postHookFunc(setting);
+ }
+ }
+ return;
+}
+uint16 HP_login_convert_users_to_colors(uint16 users) {
+ int hIndex = 0;
+ uint16 retVal___ = 0;
+ if (HPMHooks.count.HP_login_convert_users_to_colors_pre > 0) {
+ uint16 (*preHookFunc) (uint16 *users);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_convert_users_to_colors_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_login_convert_users_to_colors_pre[hIndex].func;
+ retVal___ = preHookFunc(&users);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.login.convert_users_to_colors(users);
+ }
+ if (HPMHooks.count.HP_login_convert_users_to_colors_post > 0) {
+ uint16 (*postHookFunc) (uint16 retVal___, uint16 users);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_convert_users_to_colors_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_login_convert_users_to_colors_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, users);
+ }
+ }
+ return retVal___;
+}
/* md5_interface */
void HP_md5_string(const char *string, char *output) {
int hIndex = 0;