From b0210e25675b0b3e950a0ee13ae8652360d84386 Mon Sep 17 00:00:00 2001 From: Haru Date: Fri, 7 Aug 2015 16:21:56 +0200 Subject: HPM Hooks Update Signed-off-by: Haru --- .../HPMHooking/HPMHooking_map.HookingPoints.inc | 254 +++++++++++++++++++++ 1 file changed, 254 insertions(+) (limited to 'src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc') diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 720d76b6c..74d073b0d 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -5,6 +5,10 @@ // as it will get overwritten. struct HookingPointData HookingPoints[] = { +/* HCache */ + { HP_POP(HCache->init, HP_HCache_init) }, + { HP_POP(HCache->check, HP_HCache_check) }, + { HP_POP(HCache->open, HP_HCache_open) }, /* atcommand */ { HP_POP(atcommand->init, HP_atcommand_init) }, { HP_POP(atcommand->final, HP_atcommand_final) }, @@ -914,6 +918,37 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pNPCShopClosed, HP_clif_pNPCShopClosed) }, { HP_POP(clif->pNPCMarketClosed, HP_clif_pNPCMarketClosed) }, { HP_POP(clif->pNPCMarketPurchase, HP_clif_pNPCMarketPurchase) }, +/* cmdline */ + { HP_POP(cmdline->init, HP_cmdline_init) }, + { HP_POP(cmdline->final, HP_cmdline_final) }, + { HP_POP(cmdline->arg_add, HP_cmdline_arg_add) }, + { HP_POP(cmdline->exec, HP_cmdline_exec) }, + { HP_POP(cmdline->arg_next_value, HP_cmdline_arg_next_value) }, + { HP_POP(cmdline->arg_source, HP_cmdline_arg_source) }, +/* console */ + { HP_POP(console->init, HP_console_init) }, + { HP_POP(console->final, HP_console_final) }, + { HP_POP(console->display_title, HP_console_display_title) }, +/* DB */ + { HP_POP(DB->fix_options, HP_DB_fix_options) }, + { HP_POP(DB->default_cmp, HP_DB_default_cmp) }, + { HP_POP(DB->default_hash, HP_DB_default_hash) }, + { HP_POP(DB->default_release, HP_DB_default_release) }, + { HP_POP(DB->custom_release, HP_DB_custom_release) }, + { HP_POP(DB->alloc, HP_DB_alloc) }, + { HP_POP(DB->i2key, HP_DB_i2key) }, + { HP_POP(DB->ui2key, HP_DB_ui2key) }, + { HP_POP(DB->str2key, HP_DB_str2key) }, + { HP_POP(DB->i642key, HP_DB_i642key) }, + { HP_POP(DB->ui642key, HP_DB_ui642key) }, + { HP_POP(DB->i2data, HP_DB_i2data) }, + { HP_POP(DB->ui2data, HP_DB_ui2data) }, + { HP_POP(DB->ptr2data, HP_DB_ptr2data) }, + { HP_POP(DB->data2i, HP_DB_data2i) }, + { HP_POP(DB->data2ui, HP_DB_data2ui) }, + { HP_POP(DB->data2ptr, HP_DB_data2ptr) }, + { HP_POP(DB->init, HP_DB_init) }, + { HP_POP(DB->final, HP_DB_final) }, /* duel */ { HP_POP(duel->create, HP_duel_create) }, { HP_POP(duel->invite, HP_duel_invite) }, @@ -1337,6 +1372,65 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->id2combo, HP_itemdb_id2combo) }, { HP_POP(itemdb->is_item_usable, HP_itemdb_is_item_usable) }, { HP_POP(itemdb->lookup_const, HP_itemdb_lookup_const) }, +/* libconfig */ + { HP_POP(libconfig->read, HP_libconfig_read) }, + { HP_POP(libconfig->write, HP_libconfig_write) }, + { HP_POP(libconfig->set_auto_convert, HP_libconfig_set_auto_convert) }, + { HP_POP(libconfig->get_auto_convert, HP_libconfig_get_auto_convert) }, + { HP_POP(libconfig->read_string, HP_libconfig_read_string) }, + { HP_POP(libconfig->read_file_src, HP_libconfig_read_file_src) }, + { HP_POP(libconfig->write_file, HP_libconfig_write_file) }, + { HP_POP(libconfig->set_destructor, HP_libconfig_set_destructor) }, + { HP_POP(libconfig->set_include_dir, HP_libconfig_set_include_dir) }, + { HP_POP(libconfig->init, HP_libconfig_init) }, + { HP_POP(libconfig->destroy, HP_libconfig_destroy) }, + { HP_POP(libconfig->setting_get_int, HP_libconfig_setting_get_int) }, + { HP_POP(libconfig->setting_get_int64, HP_libconfig_setting_get_int64) }, + { HP_POP(libconfig->setting_get_float, HP_libconfig_setting_get_float) }, + { HP_POP(libconfig->setting_get_bool, HP_libconfig_setting_get_bool) }, + { HP_POP(libconfig->setting_get_string, HP_libconfig_setting_get_string) }, + { HP_POP(libconfig->setting_lookup_int, HP_libconfig_setting_lookup_int) }, + { HP_POP(libconfig->setting_lookup_int64, HP_libconfig_setting_lookup_int64) }, + { HP_POP(libconfig->setting_lookup_float, HP_libconfig_setting_lookup_float) }, + { HP_POP(libconfig->setting_lookup_bool, HP_libconfig_setting_lookup_bool) }, + { HP_POP(libconfig->setting_lookup_string, HP_libconfig_setting_lookup_string) }, + { HP_POP(libconfig->setting_set_int, HP_libconfig_setting_set_int) }, + { HP_POP(libconfig->setting_set_int64, HP_libconfig_setting_set_int64) }, + { HP_POP(libconfig->setting_set_float, HP_libconfig_setting_set_float) }, + { HP_POP(libconfig->setting_set_bool, HP_libconfig_setting_set_bool) }, + { HP_POP(libconfig->setting_set_string, HP_libconfig_setting_set_string) }, + { HP_POP(libconfig->setting_set_format, HP_libconfig_setting_set_format) }, + { HP_POP(libconfig->setting_get_format, HP_libconfig_setting_get_format) }, + { HP_POP(libconfig->setting_get_int_elem, HP_libconfig_setting_get_int_elem) }, + { HP_POP(libconfig->setting_get_int64_elem, HP_libconfig_setting_get_int64_elem) }, + { HP_POP(libconfig->setting_get_float_elem, HP_libconfig_setting_get_float_elem) }, + { HP_POP(libconfig->setting_get_bool_elem, HP_libconfig_setting_get_bool_elem) }, + { HP_POP(libconfig->setting_get_string_elem, HP_libconfig_setting_get_string_elem) }, + { HP_POP(libconfig->setting_set_int_elem, HP_libconfig_setting_set_int_elem) }, + { HP_POP(libconfig->setting_set_int64_elem, HP_libconfig_setting_set_int64_elem) }, + { HP_POP(libconfig->setting_set_float_elem, HP_libconfig_setting_set_float_elem) }, + { HP_POP(libconfig->setting_set_bool_elem, HP_libconfig_setting_set_bool_elem) }, + { HP_POP(libconfig->setting_set_string_elem, HP_libconfig_setting_set_string_elem) }, + { HP_POP(libconfig->setting_index, HP_libconfig_setting_index) }, + { HP_POP(libconfig->setting_length, HP_libconfig_setting_length) }, + { HP_POP(libconfig->setting_get_elem, HP_libconfig_setting_get_elem) }, + { HP_POP(libconfig->setting_get_member, HP_libconfig_setting_get_member) }, + { HP_POP(libconfig->setting_add, HP_libconfig_setting_add) }, + { HP_POP(libconfig->setting_remove, HP_libconfig_setting_remove) }, + { HP_POP(libconfig->setting_remove_elem, HP_libconfig_setting_remove_elem) }, + { HP_POP(libconfig->setting_set_hook, HP_libconfig_setting_set_hook) }, + { HP_POP(libconfig->lookup, HP_libconfig_lookup) }, + { HP_POP(libconfig->lookup_from, HP_libconfig_lookup_from) }, + { HP_POP(libconfig->lookup_int, HP_libconfig_lookup_int) }, + { HP_POP(libconfig->lookup_int64, HP_libconfig_lookup_int64) }, + { HP_POP(libconfig->lookup_float, HP_libconfig_lookup_float) }, + { HP_POP(libconfig->lookup_bool, HP_libconfig_lookup_bool) }, + { HP_POP(libconfig->lookup_string, HP_libconfig_lookup_string) }, + { HP_POP(libconfig->read_file, HP_libconfig_read_file) }, + { HP_POP(libconfig->setting_copy_simple, HP_libconfig_setting_copy_simple) }, + { HP_POP(libconfig->setting_copy_elem, HP_libconfig_setting_copy_elem) }, + { HP_POP(libconfig->setting_copy_aggregate, HP_libconfig_setting_copy_aggregate) }, + { HP_POP(libconfig->setting_copy, HP_libconfig_setting_copy) }, /* logs */ { HP_POP(logs->pick_pc, HP_logs_pick_pc) }, { HP_POP(logs->pick_mob, HP_logs_pick_mob) }, @@ -1370,6 +1464,20 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mail->openmail, HP_mail_openmail) }, { HP_POP(mail->deliveryfail, HP_mail_deliveryfail) }, { HP_POP(mail->invalid_operation, HP_mail_invalid_operation) }, +/* iMalloc */ + { HP_POP(iMalloc->init, HP_iMalloc_init) }, + { HP_POP(iMalloc->final, HP_iMalloc_final) }, + { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) }, + { HP_POP(iMalloc->calloc, HP_iMalloc_calloc) }, + { HP_POP(iMalloc->realloc, HP_iMalloc_realloc) }, + { HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) }, + { HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) }, + { HP_POP(iMalloc->free, HP_iMalloc_free) }, + { HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) }, + { HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) }, + { HP_POP(iMalloc->usage, HP_iMalloc_usage) }, + { HP_POP(iMalloc->post_shutdown, HP_iMalloc_post_shutdown) }, + { HP_POP(iMalloc->init_messages, HP_iMalloc_init_messages) }, /* map */ { HP_POP(map->zone_init, HP_map_zone_init) }, { HP_POP(map->zone_remove, HP_map_zone_remove) }, @@ -1499,6 +1607,16 @@ struct HookingPointData HookingPoints[] = { { HP_POP(map->remove_questinfo, HP_map_remove_questinfo) }, { HP_POP(map->merge_zone, HP_map_merge_zone) }, { HP_POP(map->zone_clear_single, HP_map_zone_clear_single) }, +/* mapindex */ + { HP_POP(mapindex->init, HP_mapindex_init) }, + { HP_POP(mapindex->final, HP_mapindex_final) }, + { HP_POP(mapindex->addmap, HP_mapindex_addmap) }, + { HP_POP(mapindex->removemap, HP_mapindex_removemap) }, + { HP_POP(mapindex->getmapname, HP_mapindex_getmapname) }, + { HP_POP(mapindex->getmapname_ext, HP_mapindex_getmapname_ext) }, + { HP_POP(mapindex->name2id, HP_mapindex_name2id) }, + { HP_POP(mapindex->id2name, HP_mapindex_id2name) }, + { HP_POP(mapindex->check_default, HP_mapindex_check_default) }, /* mapit */ { HP_POP(mapit->alloc, HP_mapit_alloc) }, { HP_POP(mapit->free, HP_mapit_free) }, @@ -1748,6 +1866,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(npc->market_delfromsql_sub, HP_npc_market_delfromsql_sub) }, { HP_POP(npc->db_checkid, HP_npc_db_checkid) }, { HP_POP(npc->secure_timeout_timer, HP_npc_secure_timeout_timer) }, +/* nullpo */ + { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) }, /* party */ { HP_POP(party->init, HP_party_init) }, { HP_POP(party->final, HP_party_final) }, @@ -2246,6 +2366,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(searchstore->queryremote, HP_searchstore_queryremote) }, { HP_POP(searchstore->clearremote, HP_searchstore_clearremote) }, { HP_POP(searchstore->result, HP_searchstore_result) }, +/* showmsg */ + { HP_POP(showmsg->init, HP_showmsg_init) }, + { HP_POP(showmsg->final, HP_showmsg_final) }, + { HP_POP(showmsg->clearScreen, HP_showmsg_clearScreen) }, + { HP_POP(showmsg->showMessageV, HP_showmsg_showMessageV) }, /* skill */ { HP_POP(skill->init, HP_skill_init) }, { HP_POP(skill->final, HP_skill_final) }, @@ -2464,6 +2589,68 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->get_requirement_off_unknown, HP_skill_get_requirement_off_unknown) }, { HP_POP(skill->get_requirement_item_unknown, HP_skill_get_requirement_item_unknown) }, { HP_POP(skill->get_requirement_unknown, HP_skill_get_requirement_unknown) }, +/* sockt */ + { HP_POP(sockt->init, HP_sockt_init) }, + { HP_POP(sockt->final, HP_sockt_final) }, + { HP_POP(sockt->perform, HP_sockt_perform) }, + { HP_POP(sockt->datasync, HP_sockt_datasync) }, + { HP_POP(sockt->make_listen_bind, HP_sockt_make_listen_bind) }, + { HP_POP(sockt->make_connection, HP_sockt_make_connection) }, + { HP_POP(sockt->realloc_fifo, HP_sockt_realloc_fifo) }, + { HP_POP(sockt->realloc_writefifo, HP_sockt_realloc_writefifo) }, + { HP_POP(sockt->wfifoset, HP_sockt_wfifoset) }, + { HP_POP(sockt->rfifoskip, HP_sockt_rfifoskip) }, + { HP_POP(sockt->close, HP_sockt_close) }, + { HP_POP(sockt->session_is_valid, HP_sockt_session_is_valid) }, + { HP_POP(sockt->session_is_active, HP_sockt_session_is_active) }, + { HP_POP(sockt->flush, HP_sockt_flush) }, + { HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) }, + { HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) }, + { HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) }, + { HP_POP(sockt->host2ip, HP_sockt_host2ip) }, + { HP_POP(sockt->ip2str, HP_sockt_ip2str) }, + { HP_POP(sockt->str2ip, HP_sockt_str2ip) }, + { HP_POP(sockt->ntows, HP_sockt_ntows) }, + { HP_POP(sockt->getips, HP_sockt_getips) }, + { HP_POP(sockt->eof, HP_sockt_eof) }, + { HP_POP(sockt->lan_subnet_check, HP_sockt_lan_subnet_check) }, + { HP_POP(sockt->allowed_ip_check, HP_sockt_allowed_ip_check) }, + { HP_POP(sockt->trusted_ip_check, HP_sockt_trusted_ip_check) }, + { HP_POP(sockt->net_config_read_sub, HP_sockt_net_config_read_sub) }, + { HP_POP(sockt->net_config_read, HP_sockt_net_config_read) }, +/* SQL */ + { HP_POP(SQL->Connect, HP_SQL_Connect) }, + { HP_POP(SQL->GetTimeout, HP_SQL_GetTimeout) }, + { HP_POP(SQL->GetColumnNames, HP_SQL_GetColumnNames) }, + { HP_POP(SQL->SetEncoding, HP_SQL_SetEncoding) }, + { HP_POP(SQL->Ping, HP_SQL_Ping) }, + { HP_POP(SQL->EscapeString, HP_SQL_EscapeString) }, + { HP_POP(SQL->EscapeStringLen, HP_SQL_EscapeStringLen) }, + { HP_POP(SQL->QueryV, HP_SQL_QueryV) }, + { HP_POP(SQL->QueryStr, HP_SQL_QueryStr) }, + { HP_POP(SQL->LastInsertId, HP_SQL_LastInsertId) }, + { HP_POP(SQL->NumColumns, HP_SQL_NumColumns) }, + { HP_POP(SQL->NumRows, HP_SQL_NumRows) }, + { HP_POP(SQL->NextRow, HP_SQL_NextRow) }, + { HP_POP(SQL->GetData, HP_SQL_GetData) }, + { HP_POP(SQL->FreeResult, HP_SQL_FreeResult) }, + { HP_POP(SQL->ShowDebug_, HP_SQL_ShowDebug_) }, + { HP_POP(SQL->Free, HP_SQL_Free) }, + { HP_POP(SQL->Malloc, HP_SQL_Malloc) }, + { HP_POP(SQL->StmtMalloc, HP_SQL_StmtMalloc) }, + { HP_POP(SQL->StmtPrepareV, HP_SQL_StmtPrepareV) }, + { HP_POP(SQL->StmtPrepareStr, HP_SQL_StmtPrepareStr) }, + { HP_POP(SQL->StmtNumParams, HP_SQL_StmtNumParams) }, + { HP_POP(SQL->StmtBindParam, HP_SQL_StmtBindParam) }, + { HP_POP(SQL->StmtExecute, HP_SQL_StmtExecute) }, + { HP_POP(SQL->StmtLastInsertId, HP_SQL_StmtLastInsertId) }, + { HP_POP(SQL->StmtNumColumns, HP_SQL_StmtNumColumns) }, + { HP_POP(SQL->StmtBindColumn, HP_SQL_StmtBindColumn) }, + { HP_POP(SQL->StmtNumRows, HP_SQL_StmtNumRows) }, + { HP_POP(SQL->StmtNextRow, HP_SQL_StmtNextRow) }, + { HP_POP(SQL->StmtFreeResult, HP_SQL_StmtFreeResult) }, + { HP_POP(SQL->StmtFree, HP_SQL_StmtFree) }, + { HP_POP(SQL->StmtShowDebug_, HP_SQL_StmtShowDebug_) }, /* status */ { HP_POP(status->init, HP_status_init) }, { HP_POP(status->final, HP_status_final) }, @@ -2590,6 +2777,73 @@ struct HookingPointData HookingPoints[] = { { HP_POP(storage->comp_item, HP_storage_comp_item) }, { HP_POP(storage->sortitem, HP_storage_sortitem) }, { HP_POP(storage->reconnect_sub, HP_storage_reconnect_sub) }, +/* StrBuf */ + { HP_POP(StrBuf->Malloc, HP_StrBuf_Malloc) }, + { HP_POP(StrBuf->Init, HP_StrBuf_Init) }, + { HP_POP(StrBuf->Vprintf, HP_StrBuf_Vprintf) }, + { HP_POP(StrBuf->Append, HP_StrBuf_Append) }, + { HP_POP(StrBuf->AppendStr, HP_StrBuf_AppendStr) }, + { HP_POP(StrBuf->Length, HP_StrBuf_Length) }, + { HP_POP(StrBuf->Value, HP_StrBuf_Value) }, + { HP_POP(StrBuf->Clear, HP_StrBuf_Clear) }, + { HP_POP(StrBuf->Destroy, HP_StrBuf_Destroy) }, + { HP_POP(StrBuf->Free, HP_StrBuf_Free) }, +/* strlib */ + { HP_POP(strlib->jstrescape, HP_strlib_jstrescape) }, + { HP_POP(strlib->jstrescapecpy, HP_strlib_jstrescapecpy) }, + { HP_POP(strlib->jmemescapecpy, HP_strlib_jmemescapecpy) }, + { HP_POP(strlib->remove_control_chars_, HP_strlib_remove_control_chars_) }, + { HP_POP(strlib->trim_, HP_strlib_trim_) }, + { HP_POP(strlib->normalize_name_, HP_strlib_normalize_name_) }, + { HP_POP(strlib->stristr_, HP_strlib_stristr_) }, + { HP_POP(strlib->strnlen_, HP_strlib_strnlen_) }, + { HP_POP(strlib->strtok_r_, HP_strlib_strtok_r_) }, + { HP_POP(strlib->e_mail_check_, HP_strlib_e_mail_check_) }, + { HP_POP(strlib->config_switch_, HP_strlib_config_switch_) }, + { HP_POP(strlib->safestrncpy_, HP_strlib_safestrncpy_) }, + { HP_POP(strlib->safestrnlen_, HP_strlib_safestrnlen_) }, + { HP_POP(strlib->strline_, HP_strlib_strline_) }, + { HP_POP(strlib->bin2hex_, HP_strlib_bin2hex_) }, +/* sv */ + { HP_POP(sv->parse_next, HP_sv_parse_next) }, + { HP_POP(sv->parse, HP_sv_parse) }, + { HP_POP(sv->split, HP_sv_split) }, + { HP_POP(sv->escape_c, HP_sv_escape_c) }, + { HP_POP(sv->unescape_c, HP_sv_unescape_c) }, + { HP_POP(sv->skip_escaped_c, HP_sv_skip_escaped_c) }, + { HP_POP(sv->readdb, HP_sv_readdb) }, +/* sysinfo */ + { HP_POP(sysinfo->getpagesize, HP_sysinfo_getpagesize) }, + { HP_POP(sysinfo->platform, HP_sysinfo_platform) }, + { HP_POP(sysinfo->osversion, HP_sysinfo_osversion) }, + { HP_POP(sysinfo->cpu, HP_sysinfo_cpu) }, + { HP_POP(sysinfo->cpucores, HP_sysinfo_cpucores) }, + { HP_POP(sysinfo->arch, HP_sysinfo_arch) }, + { HP_POP(sysinfo->is64bit, HP_sysinfo_is64bit) }, + { HP_POP(sysinfo->compiler, HP_sysinfo_compiler) }, + { HP_POP(sysinfo->cflags, HP_sysinfo_cflags) }, + { HP_POP(sysinfo->vcstype, HP_sysinfo_vcstype) }, + { HP_POP(sysinfo->vcstypeid, HP_sysinfo_vcstypeid) }, + { HP_POP(sysinfo->vcsrevision_src, HP_sysinfo_vcsrevision_src) }, + { HP_POP(sysinfo->vcsrevision_scripts, HP_sysinfo_vcsrevision_scripts) }, + { HP_POP(sysinfo->vcsrevision_reload, HP_sysinfo_vcsrevision_reload) }, + { HP_POP(sysinfo->is_superuser, HP_sysinfo_is_superuser) }, + { HP_POP(sysinfo->init, HP_sysinfo_init) }, + { HP_POP(sysinfo->final, HP_sysinfo_final) }, +/* timer */ + { HP_POP(timer->gettick, HP_timer_gettick) }, + { HP_POP(timer->gettick_nocache, HP_timer_gettick_nocache) }, + { HP_POP(timer->add, HP_timer_add) }, + { HP_POP(timer->add_interval, HP_timer_add_interval) }, + { HP_POP(timer->get, HP_timer_get) }, + { HP_POP(timer->delete, HP_timer_delete) }, + { HP_POP(timer->addtick, HP_timer_addtick) }, + { HP_POP(timer->settick, HP_timer_settick) }, + { HP_POP(timer->add_func_list, HP_timer_add_func_list) }, + { HP_POP(timer->get_uptime, HP_timer_get_uptime) }, + { HP_POP(timer->perform, HP_timer_perform) }, + { HP_POP(timer->init, HP_timer_init) }, + { HP_POP(timer->final, HP_timer_final) }, /* trade */ { HP_POP(trade->request, HP_trade_request) }, { HP_POP(trade->ack, HP_trade_ack) }, -- cgit v1.2.3-70-g09d2 From 30987271e6d3c9eb202997494690ed102adeca87 Mon Sep 17 00:00:00 2001 From: Haru Date: Tue, 11 Aug 2015 01:48:47 +0200 Subject: HPM Hooks Update --- src/common/HPMDataCheck.h | 1 + src/common/HPMSymbols.inc.h | 6 +++++ .../HPMHooking/HPMHooking_char.HPMHooksCore.inc | 5 ++++ .../HPMHooking/HPMHooking_char.HookingPoints.inc | 2 ++ src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | 27 ++++++++++++++++++++++ src/plugins/HPMHooking/HPMHooking_char.sources.inc | 1 + .../HPMHooking/HPMHooking_login.HPMHooksCore.inc | 5 ++++ .../HPMHooking/HPMHooking_login.HookingPoints.inc | 2 ++ src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | 27 ++++++++++++++++++++++ .../HPMHooking/HPMHooking_login.sources.inc | 1 + .../HPMHooking/HPMHooking_map.HPMHooksCore.inc | 5 ++++ .../HPMHooking/HPMHooking_map.HookingPoints.inc | 2 ++ src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 27 ++++++++++++++++++++++ src/plugins/HPMHooking/HPMHooking_map.sources.inc | 1 + 14 files changed, 112 insertions(+) (limited to 'src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc') diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h index a219f075e..fc9a92852 100644 --- a/src/common/HPMDataCheck.h +++ b/src/common/HPMDataCheck.h @@ -110,6 +110,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { #ifdef COMMON_CORE_H { "CmdlineArgData", sizeof(struct CmdlineArgData), SERVER_TYPE_ALL }, { "cmdline_interface", sizeof(struct cmdline_interface), SERVER_TYPE_ALL }, + { "core_interface", sizeof(struct core_interface), SERVER_TYPE_ALL }, #else #define COMMON_CORE_H #endif // COMMON_CORE_H diff --git a/src/common/HPMSymbols.inc.h b/src/common/HPMSymbols.inc.h index c8000326f..3a4c5852c 100644 --- a/src/common/HPMSymbols.inc.h +++ b/src/common/HPMSymbols.inc.h @@ -41,6 +41,9 @@ struct cmdline_interface *cmdline; #ifdef COMMON_CONSOLE_H /* console */ struct console_interface *console; #endif // COMMON_CONSOLE_H +#ifdef COMMON_CORE_H /* core */ +struct core_interface *core; +#endif // COMMON_CORE_H #ifdef COMMON_DB_H /* DB */ struct db_interface *DB; #endif // COMMON_DB_H @@ -261,6 +264,9 @@ if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("cmdline", cmdline)) return " #ifdef COMMON_CONSOLE_H /* console */ if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("console", console)) return "console"; #endif // COMMON_CONSOLE_H +#ifdef COMMON_CORE_H /* core */ +if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("core", core)) return "core"; +#endif // COMMON_CORE_H #ifdef COMMON_DB_H /* DB */ if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("DB", DB)) return "DB"; #endif // COMMON_DB_H 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)); -- cgit v1.2.3-70-g09d2