summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc28
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc24
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc6
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc179
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc8
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc80
7 files changed, 266 insertions, 61 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 52db3c182..31571f724 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -658,8 +658,14 @@ typedef int (*HPMHOOK_pre_chr_online_data_cleanup_sub) (union DBKey *key, struct
typedef int (*HPMHOOK_post_chr_online_data_cleanup_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap);
typedef int (*HPMHOOK_pre_chr_online_data_cleanup) (int *tid, int64 *tick, int *id, intptr_t *data);
typedef int (*HPMHOOK_post_chr_online_data_cleanup) (int retVal___, int tid, int64 tick, int id, intptr_t data);
-typedef void (*HPMHOOK_pre_chr_sql_config_read) (const char **cfgName);
-typedef void (*HPMHOOK_post_chr_sql_config_read) (const char *cfgName);
+typedef bool (*HPMHOOK_pre_chr_sql_config_read) (const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_chr_sql_config_read) (bool retVal___, const char *filename, bool imported);
+typedef bool (*HPMHOOK_pre_chr_sql_config_read_registry) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_chr_sql_config_read_registry) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_chr_sql_config_read_pc) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_chr_sql_config_read_pc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_chr_sql_config_read_guild) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_chr_sql_config_read_guild) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
typedef bool (*HPMHOOK_pre_chr_config_read) (const char **filename, bool *imported);
typedef bool (*HPMHOOK_post_chr_config_read) (bool retVal___, const char *filename, bool imported);
typedef bool (*HPMHOOK_pre_chr_config_read_database) (const char **filename, const struct config_t **config, bool *imported);
@@ -2850,8 +2856,6 @@ typedef void (*HPMHOOK_pre_inter_savereg) (int *account_id, int *char_id, const
typedef void (*HPMHOOK_post_inter_savereg) (int account_id, int char_id, const char *key, unsigned int index, intptr_t val, bool is_string);
typedef int (*HPMHOOK_pre_inter_accreg_fromsql) (int *account_id, int *char_id, int *fd, int *type);
typedef int (*HPMHOOK_post_inter_accreg_fromsql) (int retVal___, int account_id, int char_id, int fd, int type);
-typedef int (*HPMHOOK_pre_inter_config_read) (const char **cfgName);
-typedef int (*HPMHOOK_post_inter_config_read) (int retVal___, const char *cfgName);
typedef int (*HPMHOOK_pre_inter_vlog) (char **fmt, va_list ap);
typedef int (*HPMHOOK_post_inter_vlog) (int retVal___, char *fmt, va_list ap);
typedef int (*HPMHOOK_pre_inter_init_sql) (const char **file);
@@ -2868,6 +2872,10 @@ typedef int (*HPMHOOK_pre_inter_parse_frommap) (int *fd);
typedef int (*HPMHOOK_post_inter_parse_frommap) (int retVal___, int fd);
typedef void (*HPMHOOK_pre_inter_final) (void);
typedef void (*HPMHOOK_post_inter_final) (void);
+typedef bool (*HPMHOOK_pre_inter_config_read) (const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_inter_config_read) (bool retVal___, const char *filename, bool imported);
+typedef bool (*HPMHOOK_pre_inter_config_read_connection) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_inter_config_read_connection) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
#endif // CHAR_INTER_H
#ifdef CHAR_INT_MAIL_H /* inter_mail */
typedef int (*HPMHOOK_pre_inter_mail_sql_init) (void);
@@ -4034,8 +4042,12 @@ typedef int (*HPMHOOK_pre_map_config_read_sub) (char **cfgName);
typedef int (*HPMHOOK_post_map_config_read_sub) (int retVal___, char *cfgName);
typedef void (*HPMHOOK_pre_map_reloadnpc_sub) (char **cfgName);
typedef void (*HPMHOOK_post_map_reloadnpc_sub) (char *cfgName);
-typedef int (*HPMHOOK_pre_map_inter_config_read) (char **cfgName);
-typedef int (*HPMHOOK_post_map_inter_config_read) (int retVal___, char *cfgName);
+typedef bool (*HPMHOOK_pre_map_inter_config_read) (const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_map_inter_config_read) (bool retVal___, const char *filename, bool imported);
+typedef bool (*HPMHOOK_pre_map_inter_config_read_database_names) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_map_inter_config_read_database_names) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_map_inter_config_read_connection) (const char **filename, const struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_map_inter_config_read_connection) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
typedef int (*HPMHOOK_pre_map_sql_init) (void);
typedef int (*HPMHOOK_post_map_sql_init) (int retVal___);
typedef int (*HPMHOOK_pre_map_sql_close) (void);
@@ -4470,8 +4482,8 @@ typedef int (*HPMHOOK_pre_mapreg_destroyreg) (union DBKey *key, struct DBData **
typedef int (*HPMHOOK_post_mapreg_destroyreg) (int retVal___, union DBKey key, struct DBData *data, va_list ap);
typedef void (*HPMHOOK_pre_mapreg_reload) (void);
typedef void (*HPMHOOK_post_mapreg_reload) (void);
-typedef bool (*HPMHOOK_pre_mapreg_config_read) (const char **w1, const char **w2);
-typedef bool (*HPMHOOK_post_mapreg_config_read) (bool retVal___, const char *w1, const char *w2);
+typedef bool (*HPMHOOK_pre_mapreg_config_read) (const char **filename, const struct config_setting_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_mapreg_config_read) (bool retVal___, const char *filename, const struct config_setting_t *config, bool imported);
#endif // MAP_MAPREG_H
#ifdef COMMON_MD5CALC_H /* md5 */
typedef void (*HPMHOOK_pre_md5_string) (const char **string, char **output);
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index a2a7ce1a7..44b56143f 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -344,6 +344,12 @@ struct {
struct HPMHookPoint *HP_chr_online_data_cleanup_post;
struct HPMHookPoint *HP_chr_sql_config_read_pre;
struct HPMHookPoint *HP_chr_sql_config_read_post;
+ struct HPMHookPoint *HP_chr_sql_config_read_registry_pre;
+ struct HPMHookPoint *HP_chr_sql_config_read_registry_post;
+ struct HPMHookPoint *HP_chr_sql_config_read_pc_pre;
+ struct HPMHookPoint *HP_chr_sql_config_read_pc_post;
+ struct HPMHookPoint *HP_chr_sql_config_read_guild_pre;
+ struct HPMHookPoint *HP_chr_sql_config_read_guild_post;
struct HPMHookPoint *HP_chr_config_read_pre;
struct HPMHookPoint *HP_chr_config_read_post;
struct HPMHookPoint *HP_chr_config_read_database_pre;
@@ -528,8 +534,6 @@ struct {
struct HPMHookPoint *HP_inter_savereg_post;
struct HPMHookPoint *HP_inter_accreg_fromsql_pre;
struct HPMHookPoint *HP_inter_accreg_fromsql_post;
- struct HPMHookPoint *HP_inter_config_read_pre;
- struct HPMHookPoint *HP_inter_config_read_post;
struct HPMHookPoint *HP_inter_vlog_pre;
struct HPMHookPoint *HP_inter_vlog_post;
struct HPMHookPoint *HP_inter_init_sql_pre;
@@ -546,6 +550,10 @@ struct {
struct HPMHookPoint *HP_inter_parse_frommap_post;
struct HPMHookPoint *HP_inter_final_pre;
struct HPMHookPoint *HP_inter_final_post;
+ struct HPMHookPoint *HP_inter_config_read_pre;
+ struct HPMHookPoint *HP_inter_config_read_post;
+ struct HPMHookPoint *HP_inter_config_read_connection_pre;
+ struct HPMHookPoint *HP_inter_config_read_connection_post;
struct HPMHookPoint *HP_inter_mail_sql_init_pre;
struct HPMHookPoint *HP_inter_mail_sql_init_post;
struct HPMHookPoint *HP_inter_mail_sql_final_pre;
@@ -1839,6 +1847,12 @@ struct {
int HP_chr_online_data_cleanup_post;
int HP_chr_sql_config_read_pre;
int HP_chr_sql_config_read_post;
+ int HP_chr_sql_config_read_registry_pre;
+ int HP_chr_sql_config_read_registry_post;
+ int HP_chr_sql_config_read_pc_pre;
+ int HP_chr_sql_config_read_pc_post;
+ int HP_chr_sql_config_read_guild_pre;
+ int HP_chr_sql_config_read_guild_post;
int HP_chr_config_read_pre;
int HP_chr_config_read_post;
int HP_chr_config_read_database_pre;
@@ -2023,8 +2037,6 @@ struct {
int HP_inter_savereg_post;
int HP_inter_accreg_fromsql_pre;
int HP_inter_accreg_fromsql_post;
- int HP_inter_config_read_pre;
- int HP_inter_config_read_post;
int HP_inter_vlog_pre;
int HP_inter_vlog_post;
int HP_inter_init_sql_pre;
@@ -2041,6 +2053,10 @@ struct {
int HP_inter_parse_frommap_post;
int HP_inter_final_pre;
int HP_inter_final_post;
+ int HP_inter_config_read_pre;
+ int HP_inter_config_read_post;
+ int HP_inter_config_read_connection_pre;
+ int HP_inter_config_read_connection_post;
int HP_inter_mail_sql_init_pre;
int HP_inter_mail_sql_init_post;
int HP_inter_mail_sql_final_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index 3c5c4fd66..35f9044d5 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -187,6 +187,9 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(chr->online_data_cleanup_sub, HP_chr_online_data_cleanup_sub) },
{ HP_POP(chr->online_data_cleanup, HP_chr_online_data_cleanup) },
{ HP_POP(chr->sql_config_read, HP_chr_sql_config_read) },
+ { HP_POP(chr->sql_config_read_registry, HP_chr_sql_config_read_registry) },
+ { HP_POP(chr->sql_config_read_pc, HP_chr_sql_config_read_pc) },
+ { HP_POP(chr->sql_config_read_guild, HP_chr_sql_config_read_guild) },
{ HP_POP(chr->config_read, HP_chr_config_read) },
{ HP_POP(chr->config_read_database, HP_chr_config_read_database) },
{ HP_POP(chr->config_read_console, HP_chr_config_read_console) },
@@ -290,7 +293,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(inter->vmsg_to_fd, HP_inter_vmsg_to_fd) },
{ HP_POP(inter->savereg, HP_inter_savereg) },
{ HP_POP(inter->accreg_fromsql, HP_inter_accreg_fromsql) },
- { HP_POP(inter->config_read, HP_inter_config_read) },
{ HP_POP(inter->vlog, HP_inter_vlog) },
{ HP_POP(inter->init_sql, HP_inter_init_sql) },
{ HP_POP(inter->mapif_init, HP_inter_mapif_init) },
@@ -299,6 +301,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(inter->check_length, HP_inter_check_length) },
{ HP_POP(inter->parse_frommap, HP_inter_parse_frommap) },
{ HP_POP(inter->final, HP_inter_final) },
+ { HP_POP(inter->config_read, HP_inter_config_read) },
+ { HP_POP(inter->config_read_connection, HP_inter_config_read_connection) },
/* inter_mail_interface */
{ HP_POP(inter_mail->sql_init, HP_inter_mail_sql_init) },
{ HP_POP(inter_mail->sql_final, HP_inter_mail_sql_final) },
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index 1676f1a2b..3669b2da8 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -4216,31 +4216,113 @@ int HP_chr_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) {
}
return retVal___;
}
-void HP_chr_sql_config_read(const char *cfgName) {
+bool HP_chr_sql_config_read(const char *filename, bool imported) {
int hIndex = 0;
+ bool retVal___ = false;
if( HPMHooks.count.HP_chr_sql_config_read_pre ) {
- void (*preHookFunc) (const char **cfgName);
+ bool (*preHookFunc) (const char **filename, bool *imported);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chr_sql_config_read_pre[hIndex].func;
- preHookFunc(&cfgName);
+ retVal___ = preHookFunc(&filename, &imported);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return;
+ return retVal___;
}
}
{
- HPMHooks.source.chr.sql_config_read(cfgName);
+ retVal___ = HPMHooks.source.chr.sql_config_read(filename, imported);
}
if( HPMHooks.count.HP_chr_sql_config_read_post ) {
- void (*postHookFunc) (const char *cfgName);
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool imported);
for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_chr_sql_config_read_post[hIndex].func;
- postHookFunc(cfgName);
+ retVal___ = postHookFunc(retVal___, filename, imported);
}
}
- return;
+ return retVal___;
+}
+bool HP_chr_sql_config_read_registry(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_sql_config_read_registry_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_registry_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_sql_config_read_registry_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.sql_config_read_registry(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_chr_sql_config_read_registry_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_registry_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_sql_config_read_registry_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_chr_sql_config_read_pc(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_sql_config_read_pc_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_pc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_sql_config_read_pc_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.sql_config_read_pc(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_chr_sql_config_read_pc_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_pc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_sql_config_read_pc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_chr_sql_config_read_guild(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_chr_sql_config_read_guild_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_guild_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_sql_config_read_guild_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.chr.sql_config_read_guild(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_chr_sql_config_read_guild_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_guild_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_sql_config_read_guild_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
}
bool HP_chr_config_read(const char *filename, bool imported) {
int hIndex = 0;
@@ -6724,33 +6806,6 @@ int HP_inter_accreg_fromsql(int account_id, int char_id, int fd, int type) {
}
return retVal___;
}
-int HP_inter_config_read(const char *cfgName) {
- int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_inter_config_read_pre ) {
- int (*preHookFunc) (const char **cfgName);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_inter_config_read_pre[hIndex].func;
- retVal___ = preHookFunc(&cfgName);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.inter.config_read(cfgName);
- }
- if( HPMHooks.count.HP_inter_config_read_post ) {
- int (*postHookFunc) (int retVal___, const char *cfgName);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_inter_config_read_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, cfgName);
- }
- }
- return retVal___;
-}
int HP_inter_vlog(char *fmt, va_list ap) {
int hIndex = 0;
int retVal___ = 0;
@@ -6978,6 +7033,60 @@ void HP_inter_final(void) {
}
return;
}
+bool HP_inter_config_read(const char *filename, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_inter_config_read_pre ) {
+ bool (*preHookFunc) (const char **filename, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_inter_config_read_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.inter.config_read(filename, imported);
+ }
+ if( HPMHooks.count.HP_inter_config_read_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_inter_config_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_inter_config_read_connection(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_inter_config_read_connection_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_connection_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_inter_config_read_connection_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.inter.config_read_connection(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_inter_config_read_connection_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_connection_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_inter_config_read_connection_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
/* inter_mail_interface */
int HP_inter_mail_sql_init(void) {
int hIndex = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 06c4acc50..b4a0087e2 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -3240,6 +3240,10 @@ struct {
struct HPMHookPoint *HP_map_reloadnpc_sub_post;
struct HPMHookPoint *HP_map_inter_config_read_pre;
struct HPMHookPoint *HP_map_inter_config_read_post;
+ struct HPMHookPoint *HP_map_inter_config_read_database_names_pre;
+ struct HPMHookPoint *HP_map_inter_config_read_database_names_post;
+ struct HPMHookPoint *HP_map_inter_config_read_connection_pre;
+ struct HPMHookPoint *HP_map_inter_config_read_connection_post;
struct HPMHookPoint *HP_map_sql_init_pre;
struct HPMHookPoint *HP_map_sql_init_post;
struct HPMHookPoint *HP_map_sql_close_pre;
@@ -9291,6 +9295,10 @@ struct {
int HP_map_reloadnpc_sub_post;
int HP_map_inter_config_read_pre;
int HP_map_inter_config_read_post;
+ int HP_map_inter_config_read_database_names_pre;
+ int HP_map_inter_config_read_database_names_post;
+ int HP_map_inter_config_read_connection_pre;
+ int HP_map_inter_config_read_connection_post;
int HP_map_sql_init_pre;
int HP_map_sql_init_post;
int HP_map_sql_close_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 2cef7f135..1f231b653 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -1662,6 +1662,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(map->config_read_sub, HP_map_config_read_sub) },
{ HP_POP(map->reloadnpc_sub, HP_map_reloadnpc_sub) },
{ HP_POP(map->inter_config_read, HP_map_inter_config_read) },
+ { HP_POP(map->inter_config_read_database_names, HP_map_inter_config_read_database_names) },
+ { HP_POP(map->inter_config_read_connection, HP_map_inter_config_read_connection) },
{ HP_POP(map->sql_init, HP_map_sql_init) },
{ HP_POP(map->sql_close, HP_map_sql_close) },
{ HP_POP(map->zone_mf_cache, HP_map_zone_mf_cache) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 9ef56800f..6889e2658 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -42814,15 +42814,15 @@ void HP_map_reloadnpc_sub(char *cfgName) {
}
return;
}
-int HP_map_inter_config_read(char *cfgName) {
+bool HP_map_inter_config_read(const char *filename, bool imported) {
int hIndex = 0;
- int retVal___ = 0;
+ bool retVal___ = false;
if( HPMHooks.count.HP_map_inter_config_read_pre ) {
- int (*preHookFunc) (char **cfgName);
+ bool (*preHookFunc) (const char **filename, bool *imported);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_map_inter_config_read_pre[hIndex].func;
- retVal___ = preHookFunc(&cfgName);
+ retVal___ = preHookFunc(&filename, &imported);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -42830,13 +42830,67 @@ int HP_map_inter_config_read(char *cfgName) {
}
}
{
- retVal___ = HPMHooks.source.map.inter_config_read(cfgName);
+ retVal___ = HPMHooks.source.map.inter_config_read(filename, imported);
}
if( HPMHooks.count.HP_map_inter_config_read_post ) {
- int (*postHookFunc) (int retVal___, char *cfgName);
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool imported);
for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_map_inter_config_read_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, cfgName);
+ retVal___ = postHookFunc(retVal___, filename, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_map_inter_config_read_database_names(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_map_inter_config_read_database_names_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_database_names_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_inter_config_read_database_names_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.inter_config_read_database_names(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_map_inter_config_read_database_names_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_database_names_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_inter_config_read_database_names_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_map_inter_config_read_connection(const char *filename, const struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_map_inter_config_read_connection_pre ) {
+ bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_connection_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_inter_config_read_connection_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.inter_config_read_connection(filename, config, imported);
+ }
+ if( HPMHooks.count.HP_map_inter_config_read_connection_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_connection_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_inter_config_read_connection_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
}
}
return retVal___;
@@ -44050,15 +44104,15 @@ void HP_mapreg_reload(void) {
}
return;
}
-bool HP_mapreg_config_read(const char *w1, const char *w2) {
+bool HP_mapreg_config_read(const char *filename, const struct config_setting_t *config, bool imported) {
int hIndex = 0;
bool retVal___ = false;
if( HPMHooks.count.HP_mapreg_config_read_pre ) {
- bool (*preHookFunc) (const char **w1, const char **w2);
+ bool (*preHookFunc) (const char **filename, const struct config_setting_t **config, bool *imported);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mapreg_config_read_pre[hIndex].func;
- retVal___ = preHookFunc(&w1, &w2);
+ retVal___ = preHookFunc(&filename, &config, &imported);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -44066,13 +44120,13 @@ bool HP_mapreg_config_read(const char *w1, const char *w2) {
}
}
{
- retVal___ = HPMHooks.source.mapreg.config_read(w1, w2);
+ retVal___ = HPMHooks.source.mapreg.config_read(filename, config, imported);
}
if( HPMHooks.count.HP_mapreg_config_read_post ) {
- bool (*postHookFunc) (bool retVal___, const char *w1, const char *w2);
+ bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_setting_t *config, bool imported);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mapreg_config_read_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, w1, w2);
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
}
}
return retVal___;