summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-08-11 01:48:47 +0200
committerHaru <haru@dotalux.com>2015-08-15 00:51:44 +0200
commit30987271e6d3c9eb202997494690ed102adeca87 (patch)
treecadf26be9bef264382967f9d9db9197e6fb968cb /src/plugins
parent22bd368e5d4d8d61a7189d03f52c3afd90c0729e (diff)
downloadhercules-30987271e6d3c9eb202997494690ed102adeca87.tar.gz
hercules-30987271e6d3c9eb202997494690ed102adeca87.tar.bz2
hercules-30987271e6d3c9eb202997494690ed102adeca87.tar.xz
hercules-30987271e6d3c9eb202997494690ed102adeca87.zip
HPM Hooks Update
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc5
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc27
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.sources.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc5
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc27
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.sources.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc5
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc27
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.sources.inc1
12 files changed, 105 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index a9c9fbd5f..c5f135937 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -347,6 +347,8 @@ struct {
struct HPMHookPoint *HP_console_final_post;
struct HPMHookPoint *HP_console_display_title_pre;
struct HPMHookPoint *HP_console_display_title_post;
+ struct HPMHookPoint *HP_core_shutdown_callback_pre;
+ struct HPMHookPoint *HP_core_shutdown_callback_post;
struct HPMHookPoint *HP_DB_fix_options_pre;
struct HPMHookPoint *HP_DB_fix_options_post;
struct HPMHookPoint *HP_DB_default_cmp_pre;
@@ -1720,6 +1722,8 @@ struct {
int HP_console_final_post;
int HP_console_display_title_pre;
int HP_console_display_title_post;
+ int HP_core_shutdown_callback_pre;
+ int HP_core_shutdown_callback_post;
int HP_DB_fix_options_pre;
int HP_DB_fix_options_post;
int HP_DB_default_cmp_pre;
@@ -2755,6 +2759,7 @@ struct {
struct char_interface chr;
struct cmdline_interface cmdline;
struct console_interface console;
+ struct core_interface core;
struct db_interface DB;
struct geoip_interface geoip;
struct inter_auction_interface inter_auction;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index 9eb6b0fb2..59c82f0e2 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -180,6 +180,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(console->init, HP_console_init) },
{ HP_POP(console->final, HP_console_final) },
{ HP_POP(console->display_title, HP_console_display_title) },
+/* core */
+ { HP_POP(core->shutdown_callback, HP_core_shutdown_callback) },
/* DB */
{ HP_POP(DB->fix_options, HP_DB_fix_options) },
{ HP_POP(DB->default_cmp, HP_DB_default_cmp) },
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index 89e0661bb..2e35992bc 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -4543,6 +4543,33 @@ void HP_console_display_title(void) {
}
return;
}
+/* core */
+void HP_core_shutdown_callback(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_core_shutdown_callback_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_core_shutdown_callback_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.core.shutdown_callback();
+ }
+ if( HPMHooks.count.HP_core_shutdown_callback_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_core_shutdown_callback_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
/* DB */
DBOptions HP_DB_fix_options(DBType type, DBOptions options) {
int hIndex = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.sources.inc b/src/plugins/HPMHooking/HPMHooking_char.sources.inc
index 17253aa82..489917771 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.sources.inc
@@ -8,6 +8,7 @@ memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface));
memcpy(&HPMHooks.source.chr, chr, sizeof(struct char_interface));
memcpy(&HPMHooks.source.cmdline, cmdline, sizeof(struct cmdline_interface));
memcpy(&HPMHooks.source.console, console, sizeof(struct console_interface));
+memcpy(&HPMHooks.source.core, core, sizeof(struct core_interface));
memcpy(&HPMHooks.source.DB, DB, sizeof(struct db_interface));
memcpy(&HPMHooks.source.geoip, geoip, sizeof(struct geoip_interface));
memcpy(&HPMHooks.source.inter_auction, inter_auction, sizeof(struct inter_auction_interface));
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
index cdc8f6820..4edefd5b7 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
@@ -29,6 +29,8 @@ struct {
struct HPMHookPoint *HP_console_final_post;
struct HPMHookPoint *HP_console_display_title_pre;
struct HPMHookPoint *HP_console_display_title_post;
+ struct HPMHookPoint *HP_core_shutdown_callback_pre;
+ struct HPMHookPoint *HP_core_shutdown_callback_post;
struct HPMHookPoint *HP_DB_fix_options_pre;
struct HPMHookPoint *HP_DB_fix_options_post;
struct HPMHookPoint *HP_DB_default_cmp_pre;
@@ -598,6 +600,8 @@ struct {
int HP_console_final_post;
int HP_console_display_title_pre;
int HP_console_display_title_post;
+ int HP_core_shutdown_callback_pre;
+ int HP_core_shutdown_callback_post;
int HP_DB_fix_options_pre;
int HP_DB_fix_options_post;
int HP_DB_default_cmp_pre;
@@ -1146,6 +1150,7 @@ struct {
struct HCache_interface HCache;
struct cmdline_interface cmdline;
struct console_interface console;
+ struct core_interface core;
struct db_interface DB;
struct libconfig_interface libconfig;
struct login_interface login;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
index 93e063746..cdcdedcb5 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
@@ -20,6 +20,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(console->init, HP_console_init) },
{ HP_POP(console->final, HP_console_final) },
{ HP_POP(console->display_title, HP_console_display_title) },
+/* core */
+ { HP_POP(core->shutdown_callback, HP_core_shutdown_callback) },
/* DB */
{ HP_POP(DB->fix_options, HP_DB_fix_options) },
{ HP_POP(DB->default_cmp, HP_DB_default_cmp) },
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index 588fddcb0..94b298d36 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -325,6 +325,33 @@ void HP_console_display_title(void) {
}
return;
}
+/* core */
+void HP_core_shutdown_callback(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_core_shutdown_callback_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_core_shutdown_callback_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.core.shutdown_callback();
+ }
+ if( HPMHooks.count.HP_core_shutdown_callback_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_core_shutdown_callback_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
/* DB */
DBOptions HP_DB_fix_options(DBType type, DBOptions options) {
int hIndex = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.sources.inc b/src/plugins/HPMHooking/HPMHooking_login.sources.inc
index 8bafb6a68..aed0dc77f 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.sources.inc
@@ -7,6 +7,7 @@
memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface));
memcpy(&HPMHooks.source.cmdline, cmdline, sizeof(struct cmdline_interface));
memcpy(&HPMHooks.source.console, console, sizeof(struct console_interface));
+memcpy(&HPMHooks.source.core, core, sizeof(struct core_interface));
memcpy(&HPMHooks.source.DB, DB, sizeof(struct db_interface));
memcpy(&HPMHooks.source.libconfig, libconfig, sizeof(struct libconfig_interface));
memcpy(&HPMHooks.source.login, login, sizeof(struct login_interface));
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 471853956..28892e84d 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -1831,6 +1831,8 @@ struct {
struct HPMHookPoint *HP_console_final_post;
struct HPMHookPoint *HP_console_display_title_pre;
struct HPMHookPoint *HP_console_display_title_post;
+ struct HPMHookPoint *HP_core_shutdown_callback_pre;
+ struct HPMHookPoint *HP_core_shutdown_callback_post;
struct HPMHookPoint *HP_DB_fix_options_pre;
struct HPMHookPoint *HP_DB_fix_options_post;
struct HPMHookPoint *HP_DB_default_cmp_pre;
@@ -7538,6 +7540,8 @@ struct {
int HP_console_final_post;
int HP_console_display_title_pre;
int HP_console_display_title_post;
+ int HP_core_shutdown_callback_pre;
+ int HP_core_shutdown_callback_post;
int HP_DB_fix_options_pre;
int HP_DB_fix_options_post;
int HP_DB_default_cmp_pre;
@@ -11430,6 +11434,7 @@ struct {
struct clif_interface clif;
struct cmdline_interface cmdline;
struct console_interface console;
+ struct core_interface core;
struct db_interface DB;
struct duel_interface duel;
struct elemental_interface elemental;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 74d073b0d..cc96d3171 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -929,6 +929,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(console->init, HP_console_init) },
{ HP_POP(console->final, HP_console_final) },
{ HP_POP(console->display_title, HP_console_display_title) },
+/* core */
+ { HP_POP(core->shutdown_callback, HP_core_shutdown_callback) },
/* DB */
{ HP_POP(DB->fix_options, HP_DB_fix_options) },
{ HP_POP(DB->default_cmp, HP_DB_default_cmp) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index ef6922678..bc2235b02 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -24079,6 +24079,33 @@ void HP_console_display_title(void) {
}
return;
}
+/* core */
+void HP_core_shutdown_callback(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_core_shutdown_callback_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_core_shutdown_callback_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.core.shutdown_callback();
+ }
+ if( HPMHooks.count.HP_core_shutdown_callback_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_core_shutdown_callback_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
/* DB */
DBOptions HP_DB_fix_options(DBType type, DBOptions options) {
int hIndex = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.sources.inc b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
index 53905a9d9..024febdf8 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
@@ -15,6 +15,7 @@ memcpy(&HPMHooks.source.chrif, chrif, sizeof(struct chrif_interface));
memcpy(&HPMHooks.source.clif, clif, sizeof(struct clif_interface));
memcpy(&HPMHooks.source.cmdline, cmdline, sizeof(struct cmdline_interface));
memcpy(&HPMHooks.source.console, console, sizeof(struct console_interface));
+memcpy(&HPMHooks.source.core, core, sizeof(struct core_interface));
memcpy(&HPMHooks.source.DB, DB, sizeof(struct db_interface));
memcpy(&HPMHooks.source.duel, duel, sizeof(struct duel_interface));
memcpy(&HPMHooks.source.elemental, elemental, sizeof(struct elemental_interface));