From 5264e2e5e043ed5c5d101940be5642fae58e069c Mon Sep 17 00:00:00 2001 From: "Hercules.ws" Date: Sun, 16 Nov 2014 07:18:25 +0100 Subject: HPM Hooks Update Signed-off-by: HerculesWSAPI --- .../HPMHooking/HPMHooking_char.HPMHooksCore.inc | 8 ++++ .../HPMHooking/HPMHooking_char.HookingPoints.inc | 2 + src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | 52 ++++++++++++++++++++++ 3 files changed, 62 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc index 46a225568..e2838b610 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc @@ -519,6 +519,10 @@ struct { struct HPMHookPoint *HP_inter_storage_guild_storage_delete_post; struct HPMHookPoint *HP_inter_storage_parse_frommap_pre; struct HPMHookPoint *HP_inter_storage_parse_frommap_post; + struct HPMHookPoint *HP_loginif_init_pre; + struct HPMHookPoint *HP_loginif_init_post; + struct HPMHookPoint *HP_loginif_final_pre; + struct HPMHookPoint *HP_loginif_final_post; struct HPMHookPoint *HP_loginif_reset_pre; struct HPMHookPoint *HP_loginif_reset_post; struct HPMHookPoint *HP_loginif_check_shutdown_pre; @@ -1410,6 +1414,10 @@ struct { int HP_inter_storage_guild_storage_delete_post; int HP_inter_storage_parse_frommap_pre; int HP_inter_storage_parse_frommap_post; + int HP_loginif_init_pre; + int HP_loginif_init_post; + int HP_loginif_final_pre; + int HP_loginif_final_post; int HP_loginif_reset_pre; int HP_loginif_reset_post; int HP_loginif_check_shutdown_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc index b1b64af18..aa279dbb4 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc @@ -276,6 +276,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_storage->guild_storage_delete, HP_inter_storage_guild_storage_delete) }, { HP_POP(inter_storage->parse_frommap, HP_inter_storage_parse_frommap) }, /* loginif */ + { HP_POP(loginif->init, HP_loginif_init) }, + { HP_POP(loginif->final, HP_loginif_final) }, { HP_POP(loginif->reset, HP_loginif_reset) }, { HP_POP(loginif->check_shutdown, HP_loginif_check_shutdown) }, { HP_POP(loginif->on_disconnect, HP_loginif_on_disconnect) }, diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index 8a602686f..ffa2cd7e2 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -6884,6 +6884,58 @@ int HP_inter_storage_parse_frommap(int fd) { return retVal___; } /* loginif */ +void HP_loginif_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_loginif_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_loginif_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.loginif.init(); + } + if( HPMHooks.count.HP_loginif_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_loginif_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_loginif_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_loginif_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_loginif_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.loginif.final(); + } + if( HPMHooks.count.HP_loginif_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_loginif_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} void HP_loginif_reset(void) { int hIndex = 0; if( HPMHooks.count.HP_loginif_reset_pre ) { -- cgit v1.2.3-60-g2f50