diff options
author | Ibrahem Hossam <hemagx2@gmail.com> | 2016-04-16 15:37:47 +0200 |
---|---|---|
committer | Ibrahem Hossam <hemagx2@gmail.com> | 2016-04-16 15:37:47 +0200 |
commit | bbcb0406e5a430d1c85b3448f88a72f342530cf0 (patch) | |
tree | cc2348d9a18ea4d7e462e0247aeb8d23a1808abf /src/plugins | |
parent | c7410453a15110a12d9fffb06b70e9557fb9f73a (diff) | |
parent | 8448e3f8cdcbf820e304a68c7507a0ed96d53544 (diff) | |
download | hercules-bbcb0406e5a430d1c85b3448f88a72f342530cf0.tar.gz hercules-bbcb0406e5a430d1c85b3448f88a72f342530cf0.tar.bz2 hercules-bbcb0406e5a430d1c85b3448f88a72f342530cf0.tar.xz hercules-bbcb0406e5a430d1c85b3448f88a72f342530cf0.zip |
Merge pull request #1255 from HerculesWS/login-clif_rewrite
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/HPMHooking.c | 4 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc | 66 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | 72 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc | 130 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc | 68 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | 863 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.sources.inc | 2 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc | 116 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 122 | ||||
-rw-r--r-- | src/plugins/Makefile.in | 3 |
10 files changed, 984 insertions, 462 deletions
diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c index 7a26c8f98..6530035b9 100644 --- a/src/plugins/HPMHooking.c +++ b/src/plugins/HPMHooking.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2015 Hercules Dev Team + * Copyright (C) 2013-2016 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,6 +29,8 @@ #define HPM_HOOKS_INCLUDE "HPMHooking/HPMHooking_login.Hooks.inc" #define HPM_POINTS_INCLUDE "HPMHooking/HPMHooking_login.HookingPoints.inc" #define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking_login.sources.inc" +#include "login/lclif.h" +#include "login/lclif.p.h" #include "login/login.h" #elif defined (HPMHOOKING_CHAR) #define HPM_SERVER_TYPE SERVER_TYPE_CHAR diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc index fbf332ffb..ab273a852 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc @@ -23,11 +23,11 @@ */ struct HookingPointData HookingPoints[] = { -/* HCache */ +/* HCache_interface */ { HP_POP(HCache->init, HP_HCache_init) }, { HP_POP(HCache->check, HP_HCache_check) }, { HP_POP(HCache->open, HP_HCache_open) }, -/* chr */ +/* char_interface */ { HP_POP(chr->waiting_disconnect, HP_chr_waiting_disconnect) }, { HP_POP(chr->delete_char_sql, HP_chr_delete_char_sql) }, { HP_POP(chr->create_online_char_data, HP_chr_create_online_char_data) }, @@ -186,21 +186,21 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chr->sql_config_read, HP_chr_sql_config_read) }, { HP_POP(chr->config_dispatch, HP_chr_config_dispatch) }, { HP_POP(chr->config_read, HP_chr_config_read) }, -/* cmdline */ +/* cmdline_interface */ { 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 */ +/* console_interface */ { HP_POP(console->init, HP_console_init) }, { HP_POP(console->final, HP_console_final) }, { HP_POP(console->display_title, HP_console_display_title) }, { HP_POP(console->display_gplnotice, HP_console_display_gplnotice) }, -/* core */ +/* core_interface */ { HP_POP(core->shutdown_callback, HP_core_shutdown_callback) }, -/* DB */ +/* db_interface */ { 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) }, @@ -220,11 +220,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(DB->data2ptr, HP_DB_data2ptr) }, { HP_POP(DB->init, HP_DB_init) }, { HP_POP(DB->final, HP_DB_final) }, -/* geoip */ +/* geoip_interface */ { HP_POP(geoip->getcountry, HP_geoip_getcountry) }, { HP_POP(geoip->final, HP_geoip_final) }, { HP_POP(geoip->init, HP_geoip_init) }, -/* inter_auction */ +/* inter_auction_interface */ { HP_POP(inter_auction->count, HP_inter_auction_count) }, { HP_POP(inter_auction->save, HP_inter_auction_save) }, { HP_POP(inter_auction->create, HP_inter_auction_create) }, @@ -234,11 +234,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_auction->parse_frommap, HP_inter_auction_parse_frommap) }, { HP_POP(inter_auction->sql_init, HP_inter_auction_sql_init) }, { HP_POP(inter_auction->sql_final, HP_inter_auction_sql_final) }, -/* inter_elemental */ +/* inter_elemental_interface */ { HP_POP(inter_elemental->sql_init, HP_inter_elemental_sql_init) }, { HP_POP(inter_elemental->sql_final, HP_inter_elemental_sql_final) }, { HP_POP(inter_elemental->parse_frommap, HP_inter_elemental_parse_frommap) }, -/* inter_guild */ +/* inter_guild_interface */ { HP_POP(inter_guild->save_timer, HP_inter_guild_save_timer) }, { HP_POP(inter_guild->removemember_tosql, HP_inter_guild_removemember_tosql) }, { HP_POP(inter_guild->tosql, HP_inter_guild_tosql) }, @@ -261,11 +261,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_guild->parse_frommap, HP_inter_guild_parse_frommap) }, { HP_POP(inter_guild->leave, HP_inter_guild_leave) }, { HP_POP(inter_guild->broken, HP_inter_guild_broken) }, -/* inter_homunculus */ +/* inter_homunculus_interface */ { HP_POP(inter_homunculus->sql_init, HP_inter_homunculus_sql_init) }, { HP_POP(inter_homunculus->sql_final, HP_inter_homunculus_sql_final) }, { HP_POP(inter_homunculus->parse_frommap, HP_inter_homunculus_parse_frommap) }, -/* inter */ +/* inter_interface */ { HP_POP(inter->msg_txt, HP_inter_msg_txt) }, { HP_POP(inter->msg_config_read, HP_inter_msg_config_read) }, { HP_POP(inter->do_final_msg, HP_inter_do_final_msg) }, @@ -282,7 +282,7 @@ 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) }, -/* inter_mail */ +/* 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) }, { HP_POP(inter_mail->parse_frommap, HP_inter_mail_parse_frommap) }, @@ -291,14 +291,14 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_mail->loadmessage, HP_inter_mail_loadmessage) }, { HP_POP(inter_mail->DeleteAttach, HP_inter_mail_DeleteAttach) }, { HP_POP(inter_mail->sendmail, HP_inter_mail_sendmail) }, -/* inter_mercenary */ +/* inter_mercenary_interface */ { HP_POP(inter_mercenary->owner_fromsql, HP_inter_mercenary_owner_fromsql) }, { HP_POP(inter_mercenary->owner_tosql, HP_inter_mercenary_owner_tosql) }, { HP_POP(inter_mercenary->owner_delete, HP_inter_mercenary_owner_delete) }, { HP_POP(inter_mercenary->sql_init, HP_inter_mercenary_sql_init) }, { HP_POP(inter_mercenary->sql_final, HP_inter_mercenary_sql_final) }, { HP_POP(inter_mercenary->parse_frommap, HP_inter_mercenary_parse_frommap) }, -/* inter_party */ +/* inter_party_interface */ { HP_POP(inter_party->check_lv, HP_inter_party_check_lv) }, { HP_POP(inter_party->calc_state, HP_inter_party_calc_state) }, { HP_POP(inter_party->tosql, HP_inter_party_tosql) }, @@ -312,16 +312,16 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_party->leave, HP_inter_party_leave) }, { HP_POP(inter_party->CharOnline, HP_inter_party_CharOnline) }, { HP_POP(inter_party->CharOffline, HP_inter_party_CharOffline) }, -/* inter_pet */ +/* inter_pet_interface */ { HP_POP(inter_pet->tosql, HP_inter_pet_tosql) }, { HP_POP(inter_pet->fromsql, HP_inter_pet_fromsql) }, { HP_POP(inter_pet->sql_init, HP_inter_pet_sql_init) }, { HP_POP(inter_pet->sql_final, HP_inter_pet_sql_final) }, { HP_POP(inter_pet->delete_, HP_inter_pet_delete_) }, { HP_POP(inter_pet->parse_frommap, HP_inter_pet_parse_frommap) }, -/* inter_quest */ +/* inter_quest_interface */ { HP_POP(inter_quest->parse_frommap, HP_inter_quest_parse_frommap) }, -/* inter_storage */ +/* inter_storage_interface */ { HP_POP(inter_storage->tosql, HP_inter_storage_tosql) }, { HP_POP(inter_storage->fromsql, HP_inter_storage_fromsql) }, { HP_POP(inter_storage->guild_storage_tosql, HP_inter_storage_guild_storage_tosql) }, @@ -331,7 +331,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_storage->delete_, HP_inter_storage_delete_) }, { HP_POP(inter_storage->guild_storage_delete, HP_inter_storage_guild_storage_delete) }, { HP_POP(inter_storage->parse_frommap, HP_inter_storage_parse_frommap) }, -/* libconfig */ +/* libconfig_interface */ { HP_POP(libconfig->read, HP_libconfig_read) }, { HP_POP(libconfig->write, HP_libconfig_write) }, { HP_POP(libconfig->set_options, HP_libconfig_set_options) }, @@ -400,7 +400,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(libconfig->setting_lookup_int16, HP_libconfig_setting_lookup_int16) }, { HP_POP(libconfig->setting_lookup_mutable_string, HP_libconfig_setting_lookup_mutable_string) }, { HP_POP(libconfig->lookup_mutable_string, HP_libconfig_lookup_mutable_string) }, -/* loginif */ +/* loginif_interface */ { HP_POP(loginif->init, HP_loginif_init) }, { HP_POP(loginif->final, HP_loginif_final) }, { HP_POP(loginif->reset, HP_loginif_reset) }, @@ -414,7 +414,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(loginif->auth, HP_loginif_auth) }, { HP_POP(loginif->send_users_count, HP_loginif_send_users_count) }, { HP_POP(loginif->connect_to_server, HP_loginif_connect_to_server) }, -/* iMalloc */ +/* malloc_interface */ { HP_POP(iMalloc->init, HP_iMalloc_init) }, { HP_POP(iMalloc->final, HP_iMalloc_final) }, { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) }, @@ -429,7 +429,7 @@ struct HookingPointData HookingPoints[] = { { 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) }, -/* mapif */ +/* mapif_interface */ { HP_POP(mapif->ban, HP_mapif_ban) }, { HP_POP(mapif->server_init, HP_mapif_server_init) }, { HP_POP(mapif->server_destroy, HP_mapif_server_destroy) }, @@ -599,7 +599,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->parse_RegistryRequest, HP_mapif_parse_RegistryRequest) }, { HP_POP(mapif->namechange_ack, HP_mapif_namechange_ack) }, { HP_POP(mapif->parse_NameChangeRequest, HP_mapif_parse_NameChangeRequest) }, -/* mapindex */ +/* mapindex_interface */ { HP_POP(mapindex->init, HP_mapindex_init) }, { HP_POP(mapindex->final, HP_mapindex_final) }, { HP_POP(mapindex->addmap, HP_mapindex_addmap) }, @@ -609,9 +609,9 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapindex->name2id, HP_mapindex_name2id) }, { HP_POP(mapindex->id2name, HP_mapindex_id2name) }, { HP_POP(mapindex->check_default, HP_mapindex_check_default) }, -/* nullpo */ +/* nullpo_interface */ { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) }, -/* pincode */ +/* pincode_interface */ { HP_POP(pincode->handle, HP_pincode_handle) }, { HP_POP(pincode->decrypt, HP_pincode_decrypt) }, { HP_POP(pincode->error, HP_pincode_error) }, @@ -622,12 +622,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pincode->compare, HP_pincode_compare) }, { HP_POP(pincode->check, HP_pincode_check) }, { HP_POP(pincode->config_read, HP_pincode_config_read) }, -/* showmsg */ +/* showmsg_interface */ { 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) }, -/* sockt */ +/* socket_interface */ { HP_POP(sockt->init, HP_sockt_init) }, { HP_POP(sockt->final, HP_sockt_final) }, { HP_POP(sockt->perform, HP_sockt_perform) }, @@ -656,7 +656,7 @@ struct HookingPointData HookingPoints[] = { { 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 */ +/* sql_interface */ { HP_POP(SQL->Connect, HP_SQL_Connect) }, { HP_POP(SQL->GetTimeout, HP_SQL_GetTimeout) }, { HP_POP(SQL->GetColumnNames, HP_SQL_GetColumnNames) }, @@ -689,7 +689,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(SQL->StmtFreeResult, HP_SQL_StmtFreeResult) }, { HP_POP(SQL->StmtFree, HP_SQL_StmtFree) }, { HP_POP(SQL->StmtShowDebug_, HP_SQL_StmtShowDebug_) }, -/* StrBuf */ +/* stringbuf_interface */ { HP_POP(StrBuf->Malloc, HP_StrBuf_Malloc) }, { HP_POP(StrBuf->Init, HP_StrBuf_Init) }, { HP_POP(StrBuf->Vprintf, HP_StrBuf_Vprintf) }, @@ -700,7 +700,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(StrBuf->Clear, HP_StrBuf_Clear) }, { HP_POP(StrBuf->Destroy, HP_StrBuf_Destroy) }, { HP_POP(StrBuf->Free, HP_StrBuf_Free) }, -/* strlib */ +/* strlib_interface */ { HP_POP(strlib->jstrescape, HP_strlib_jstrescape) }, { HP_POP(strlib->jstrescapecpy, HP_strlib_jstrescapecpy) }, { HP_POP(strlib->jmemescapecpy, HP_strlib_jmemescapecpy) }, @@ -716,7 +716,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(strlib->safestrnlen_, HP_strlib_safestrnlen_) }, { HP_POP(strlib->strline_, HP_strlib_strline_) }, { HP_POP(strlib->bin2hex_, HP_strlib_bin2hex_) }, -/* sv */ +/* sv_interface */ { HP_POP(sv->parse_next, HP_sv_parse_next) }, { HP_POP(sv->parse, HP_sv_parse) }, { HP_POP(sv->split, HP_sv_split) }, @@ -724,7 +724,7 @@ struct HookingPointData HookingPoints[] = { { 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 */ +/* sysinfo_interface */ { HP_POP(sysinfo->getpagesize, HP_sysinfo_getpagesize) }, { HP_POP(sysinfo->platform, HP_sysinfo_platform) }, { HP_POP(sysinfo->osversion, HP_sysinfo_osversion) }, @@ -743,7 +743,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sysinfo->is_superuser, HP_sysinfo_is_superuser) }, { HP_POP(sysinfo->init, HP_sysinfo_init) }, { HP_POP(sysinfo->final, HP_sysinfo_final) }, -/* timer */ +/* timer_interface */ { HP_POP(timer->gettick, HP_timer_gettick) }, { HP_POP(timer->gettick_nocache, HP_timer_gettick_nocache) }, { HP_POP(timer->add, HP_timer_add) }, diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index b06abebb7..04dc90c6c 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -23,7 +23,7 @@ * as it will get overwritten. */ -/* HCache */ +/* HCache_interface */ void HP_HCache_init(void) { int hIndex = 0; if( HPMHooks.count.HP_HCache_init_pre ) { @@ -104,7 +104,7 @@ FILE* HP_HCache_open(const char *file, const char *opt) { } return retVal___; } -/* chr */ +/* char_interface */ int HP_chr_waiting_disconnect(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; @@ -4295,7 +4295,7 @@ int HP_chr_config_read(const char *cfgName) { } return retVal___; } -/* cmdline */ +/* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; if( HPMHooks.count.HP_cmdline_init_pre ) { @@ -4456,7 +4456,7 @@ const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { } return retVal___; } -/* console */ +/* console_interface */ void HP_console_init(void) { int hIndex = 0; if( HPMHooks.count.HP_console_init_pre ) { @@ -4561,7 +4561,7 @@ void HP_console_display_gplnotice(void) { } return; } -/* core */ +/* core_interface */ void HP_core_shutdown_callback(void) { int hIndex = 0; if( HPMHooks.count.HP_core_shutdown_callback_pre ) { @@ -4588,7 +4588,7 @@ void HP_core_shutdown_callback(void) { } return; } -/* DB */ +/* db_interface */ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { int hIndex = 0; enum DBOptions retVal___ = DB_OPT_BASE; @@ -5108,7 +5108,7 @@ void HP_DB_final(void) { } return; } -/* geoip */ +/* geoip_interface */ const char* HP_geoip_getcountry(uint32 ipnum) { int hIndex = 0; const char* retVal___ = NULL; @@ -5188,7 +5188,7 @@ void HP_geoip_init(void) { } return; } -/* inter_auction */ +/* inter_auction_interface */ int HP_inter_auction_count(int char_id, bool buy) { int hIndex = 0; int retVal___ = 0; @@ -5428,7 +5428,7 @@ void HP_inter_auction_sql_final(void) { } return; } -/* inter_elemental */ +/* inter_elemental_interface */ void HP_inter_elemental_sql_init(void) { int hIndex = 0; if( HPMHooks.count.HP_inter_elemental_sql_init_pre ) { @@ -5508,7 +5508,7 @@ int HP_inter_elemental_parse_frommap(int fd) { } return retVal___; } -/* inter_guild */ +/* inter_guild_interface */ int HP_inter_guild_save_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; @@ -6108,7 +6108,7 @@ int HP_inter_guild_broken(int guild_id) { } return retVal___; } -/* inter_homunculus */ +/* inter_homunculus_interface */ int HP_inter_homunculus_sql_init(void) { int hIndex = 0; int retVal___ = 0; @@ -6189,7 +6189,7 @@ int HP_inter_homunculus_parse_frommap(int fd) { } return retVal___; } -/* inter */ +/* inter_interface */ const char* HP_inter_msg_txt(int msg_number) { int hIndex = 0; const char* retVal___ = NULL; @@ -6636,7 +6636,7 @@ void HP_inter_final(void) { } return; } -/* inter_mail */ +/* inter_mail_interface */ int HP_inter_mail_sql_init(void) { int hIndex = 0; int retVal___ = 0; @@ -6851,7 +6851,7 @@ void HP_inter_mail_sendmail(int send_id, const char *send_name, int dest_id, con } return; } -/* inter_mercenary */ +/* inter_mercenary_interface */ bool HP_inter_mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status) { int hIndex = 0; bool retVal___ = false; @@ -7013,7 +7013,7 @@ int HP_inter_mercenary_parse_frommap(int fd) { } return retVal___; } -/* inter_party */ +/* inter_party_interface */ int HP_inter_party_check_lv(struct party_data *p) { int hIndex = 0; int retVal___ = 0; @@ -7363,7 +7363,7 @@ int HP_inter_party_CharOffline(int char_id, int party_id) { } return retVal___; } -/* inter_pet */ +/* inter_pet_interface */ int HP_inter_pet_tosql(const struct s_pet *p) { int hIndex = 0; int retVal___ = 0; @@ -7525,7 +7525,7 @@ int HP_inter_pet_parse_frommap(int fd) { } return retVal___; } -/* inter_quest */ +/* inter_quest_interface */ int HP_inter_quest_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; @@ -7553,7 +7553,7 @@ int HP_inter_quest_parse_frommap(int fd) { } return retVal___; } -/* inter_storage */ +/* inter_storage_interface */ int HP_inter_storage_tosql(int account_id, struct storage_data *p) { int hIndex = 0; int retVal___ = 0; @@ -7796,7 +7796,7 @@ int HP_inter_storage_parse_frommap(int fd) { } return retVal___; } -/* libconfig */ +/* libconfig_interface */ int HP_libconfig_read(struct config_t *config, FILE *stream) { int hIndex = 0; int retVal___ = 0; @@ -9623,7 +9623,7 @@ int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char } return retVal___; } -/* loginif */ +/* loginif_interface */ void HP_loginif_init(void) { int hIndex = 0; if( HPMHooks.count.HP_loginif_init_pre ) { @@ -9962,7 +9962,7 @@ void HP_loginif_connect_to_server(void) { } return; } -/* iMalloc */ +/* malloc_interface */ void HP_iMalloc_init(void) { int hIndex = 0; if( HPMHooks.count.HP_iMalloc_init_pre ) { @@ -10335,7 +10335,7 @@ void HP_iMalloc_init_messages(void) { } return; } -/* mapif */ +/* mapif_interface */ void HP_mapif_ban(int id, unsigned int flag, int status) { int hIndex = 0; if( HPMHooks.count.HP_mapif_ban_pre ) { @@ -14833,7 +14833,7 @@ int HP_mapif_parse_NameChangeRequest(int fd) { } return retVal___; } -/* mapindex */ +/* mapindex_interface */ int HP_mapindex_init(void) { int hIndex = 0; int retVal___ = 0; @@ -15075,7 +15075,7 @@ bool HP_mapindex_check_default(void) { } return retVal___; } -/* nullpo */ +/* nullpo_interface */ void HP_nullpo_assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) { int hIndex = 0; if( HPMHooks.count.HP_nullpo_assert_report_pre ) { @@ -15102,7 +15102,7 @@ void HP_nullpo_assert_report(const char *file, int line, const char *func, const } return; } -/* pincode */ +/* pincode_interface */ void HP_pincode_handle(int fd, struct char_session_data *sd) { int hIndex = 0; if( HPMHooks.count.HP_pincode_handle_pre ) { @@ -15365,7 +15365,7 @@ bool HP_pincode_config_read(char *w1, char *w2) { } return retVal___; } -/* showmsg */ +/* showmsg_interface */ void HP_showmsg_init(void) { int hIndex = 0; if( HPMHooks.count.HP_showmsg_init_pre ) { @@ -15477,7 +15477,7 @@ int HP_showmsg_showMessageV(const char *string, va_list ap) { } return retVal___; } -/* sockt */ +/* socket_interface */ void HP_sockt_init(void) { int hIndex = 0; if( HPMHooks.count.HP_sockt_init_pre ) { @@ -16224,7 +16224,7 @@ void HP_sockt_net_config_read(const char *filename) { } return; } -/* SQL */ +/* sql_interface */ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db) { int hIndex = 0; int retVal___ = 0; @@ -17095,7 +17095,7 @@ void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const u } return; } -/* StrBuf */ +/* stringbuf_interface */ StringBuf* HP_StrBuf_Malloc(void) { int hIndex = 0; StringBuf* retVal___ = NULL; @@ -17368,7 +17368,7 @@ void HP_StrBuf_Free(StringBuf *self) { } return; } -/* strlib */ +/* strlib_interface */ char* HP_strlib_jstrescape(char *pt) { int hIndex = 0; char* retVal___ = NULL; @@ -17747,11 +17747,11 @@ int HP_strlib_strline_(const char *str, size_t pos) { } return retVal___; } -bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { +bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count) { int hIndex = 0; bool retVal___ = false; if( HPMHooks.count.HP_strlib_bin2hex__pre ) { - bool (*preHookFunc) (char *output, unsigned char *input, size_t *count); + bool (*preHookFunc) (char *output, const unsigned char *input, size_t *count); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_strlib_bin2hex__pre[hIndex].func; @@ -17766,7 +17766,7 @@ bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { retVal___ = HPMHooks.source.strlib.bin2hex_(output, input, count); } if( HPMHooks.count.HP_strlib_bin2hex__post ) { - bool (*postHookFunc) (bool retVal___, char *output, unsigned char *input, size_t *count); + bool (*postHookFunc) (bool retVal___, char *output, const unsigned char *input, size_t *count); for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_strlib_bin2hex__post[hIndex].func; retVal___ = postHookFunc(retVal___, output, input, &count); @@ -17774,7 +17774,7 @@ bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { } return retVal___; } -/* sv */ +/* sv_interface */ int HP_sv_parse_next(struct s_svstate *svstate) { int hIndex = 0; int retVal___ = 0; @@ -17964,7 +17964,7 @@ bool HP_sv_readdb(const char *directory, const char *filename, char delim, int m } return retVal___; } -/* sysinfo */ +/* sysinfo_interface */ int HP_sysinfo_getpagesize(void) { int hIndex = 0; int retVal___ = 0; @@ -18448,7 +18448,7 @@ void HP_sysinfo_final(void) { } return; } -/* timer */ +/* timer_interface */ int64 HP_timer_gettick(void) { int hIndex = 0; int64 retVal___ = 0; diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc index 67257883f..88e4f51dd 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc @@ -90,6 +90,52 @@ struct { struct HPMHookPoint *HP_DB_init_post; struct HPMHookPoint *HP_DB_final_pre; struct HPMHookPoint *HP_DB_final_post; + struct HPMHookPoint *HP_lclif_init_pre; + struct HPMHookPoint *HP_lclif_init_post; + struct HPMHookPoint *HP_lclif_final_pre; + struct HPMHookPoint *HP_lclif_final_post; + struct HPMHookPoint *HP_lclif_connection_error_pre; + struct HPMHookPoint *HP_lclif_connection_error_post; + struct HPMHookPoint *HP_lclif_server_list_pre; + struct HPMHookPoint *HP_lclif_server_list_post; + struct HPMHookPoint *HP_lclif_auth_failed_pre; + struct HPMHookPoint *HP_lclif_auth_failed_post; + struct HPMHookPoint *HP_lclif_login_error_pre; + struct HPMHookPoint *HP_lclif_login_error_post; + struct HPMHookPoint *HP_lclif_coding_key_pre; + struct HPMHookPoint *HP_lclif_coding_key_post; + struct HPMHookPoint *HP_lclif_packet_pre; + struct HPMHookPoint *HP_lclif_packet_post; + struct HPMHookPoint *HP_lclif_parse_packet_pre; + struct HPMHookPoint *HP_lclif_parse_packet_post; + struct HPMHookPoint *HP_lclif_parse_pre; + struct HPMHookPoint *HP_lclif_parse_post; + struct HPMHookPoint *HP_PRIV__lclif_packetdb_loaddb_pre; + struct HPMHookPoint *HP_PRIV__lclif_packetdb_loaddb_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_sub_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_sub_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN2_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN2_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN3_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN3_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN4_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN4_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_HAN_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_HAN_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_REQ_HASH_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_REQ_HASH_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post; struct HPMHookPoint *HP_libconfig_read_pre; struct HPMHookPoint *HP_libconfig_read_post; struct HPMHookPoint *HP_libconfig_write_pre; @@ -308,32 +354,18 @@ struct { struct HPMHookPoint *HP_login_fromchar_parse_accinfo_post; struct HPMHookPoint *HP_login_parse_fromchar_pre; struct HPMHookPoint *HP_login_parse_fromchar_post; - struct HPMHookPoint *HP_login_connection_problem_pre; - struct HPMHookPoint *HP_login_connection_problem_post; struct HPMHookPoint *HP_login_kick_pre; struct HPMHookPoint *HP_login_kick_post; struct HPMHookPoint *HP_login_auth_ok_pre; struct HPMHookPoint *HP_login_auth_ok_post; struct HPMHookPoint *HP_login_auth_failed_pre; struct HPMHookPoint *HP_login_auth_failed_post; - struct HPMHookPoint *HP_login_login_error_pre; - struct HPMHookPoint *HP_login_login_error_post; - struct HPMHookPoint *HP_login_parse_ping_pre; - struct HPMHookPoint *HP_login_parse_ping_post; - struct HPMHookPoint *HP_login_parse_client_md5_pre; - struct HPMHookPoint *HP_login_parse_client_md5_post; - struct HPMHookPoint *HP_login_parse_client_login_pre; - struct HPMHookPoint *HP_login_parse_client_login_post; - struct HPMHookPoint *HP_login_send_coding_key_pre; - struct HPMHookPoint *HP_login_send_coding_key_post; - struct HPMHookPoint *HP_login_parse_request_coding_key_pre; - struct HPMHookPoint *HP_login_parse_request_coding_key_post; + struct HPMHookPoint *HP_login_client_login_pre; + struct HPMHookPoint *HP_login_client_login_post; struct HPMHookPoint *HP_login_char_server_connection_status_pre; struct HPMHookPoint *HP_login_char_server_connection_status_post; struct HPMHookPoint *HP_login_parse_request_connection_pre; struct HPMHookPoint *HP_login_parse_request_connection_post; - struct HPMHookPoint *HP_login_parse_login_pre; - struct HPMHookPoint *HP_login_parse_login_post; struct HPMHookPoint *HP_login_config_set_defaults_pre; struct HPMHookPoint *HP_login_config_set_defaults_post; struct HPMHookPoint *HP_login_config_read_pre; @@ -691,6 +723,52 @@ struct { int HP_DB_init_post; int HP_DB_final_pre; int HP_DB_final_post; + int HP_lclif_init_pre; + int HP_lclif_init_post; + int HP_lclif_final_pre; + int HP_lclif_final_post; + int HP_lclif_connection_error_pre; + int HP_lclif_connection_error_post; + int HP_lclif_server_list_pre; + int HP_lclif_server_list_post; + int HP_lclif_auth_failed_pre; + int HP_lclif_auth_failed_post; + int HP_lclif_login_error_pre; + int HP_lclif_login_error_post; + int HP_lclif_coding_key_pre; + int HP_lclif_coding_key_post; + int HP_lclif_packet_pre; + int HP_lclif_packet_post; + int HP_lclif_parse_packet_pre; + int HP_lclif_parse_packet_post; + int HP_lclif_parse_pre; + int HP_lclif_parse_post; + int HP_PRIV__lclif_packetdb_loaddb_pre; + int HP_PRIV__lclif_packetdb_loaddb_post; + int HP_PRIV__lclif_parse_sub_pre; + int HP_PRIV__lclif_parse_sub_post; + int HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_pre; + int HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_post; + int HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_pre; + int HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_post; + int HP_PRIV__lclif_parse_CA_LOGIN_pre; + int HP_PRIV__lclif_parse_CA_LOGIN_post; + int HP_PRIV__lclif_parse_CA_LOGIN2_pre; + int HP_PRIV__lclif_parse_CA_LOGIN2_post; + int HP_PRIV__lclif_parse_CA_LOGIN3_pre; + int HP_PRIV__lclif_parse_CA_LOGIN3_post; + int HP_PRIV__lclif_parse_CA_LOGIN4_pre; + int HP_PRIV__lclif_parse_CA_LOGIN4_post; + int HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_pre; + int HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_post; + int HP_PRIV__lclif_parse_CA_LOGIN_HAN_pre; + int HP_PRIV__lclif_parse_CA_LOGIN_HAN_post; + int HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_pre; + int HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post; + int HP_PRIV__lclif_parse_CA_REQ_HASH_pre; + int HP_PRIV__lclif_parse_CA_REQ_HASH_post; + int HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre; + int HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post; int HP_libconfig_read_pre; int HP_libconfig_read_post; int HP_libconfig_write_pre; @@ -909,32 +987,18 @@ struct { int HP_login_fromchar_parse_accinfo_post; int HP_login_parse_fromchar_pre; int HP_login_parse_fromchar_post; - int HP_login_connection_problem_pre; - int HP_login_connection_problem_post; int HP_login_kick_pre; int HP_login_kick_post; int HP_login_auth_ok_pre; int HP_login_auth_ok_post; int HP_login_auth_failed_pre; int HP_login_auth_failed_post; - int HP_login_login_error_pre; - int HP_login_login_error_post; - int HP_login_parse_ping_pre; - int HP_login_parse_ping_post; - int HP_login_parse_client_md5_pre; - int HP_login_parse_client_md5_post; - int HP_login_parse_client_login_pre; - int HP_login_parse_client_login_post; - int HP_login_send_coding_key_pre; - int HP_login_send_coding_key_post; - int HP_login_parse_request_coding_key_pre; - int HP_login_parse_request_coding_key_post; + int HP_login_client_login_pre; + int HP_login_client_login_post; int HP_login_char_server_connection_status_pre; int HP_login_char_server_connection_status_post; int HP_login_parse_request_connection_pre; int HP_login_parse_request_connection_post; - int HP_login_parse_login_pre; - int HP_login_parse_login_post; int HP_login_config_set_defaults_pre; int HP_login_config_set_defaults_post; int HP_login_config_read_pre; @@ -1231,6 +1295,8 @@ struct { struct console_interface console; struct core_interface core; struct db_interface DB; + struct lclif_interface lclif; + struct lclif_interface_private PRIV__lclif; struct libconfig_interface libconfig; struct login_interface login; struct malloc_interface iMalloc; diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc index 0460f4ca4..a558b16c5 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc @@ -23,25 +23,25 @@ */ struct HookingPointData HookingPoints[] = { -/* HCache */ +/* HCache_interface */ { HP_POP(HCache->init, HP_HCache_init) }, { HP_POP(HCache->check, HP_HCache_check) }, { HP_POP(HCache->open, HP_HCache_open) }, -/* cmdline */ +/* cmdline_interface */ { 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 */ +/* console_interface */ { HP_POP(console->init, HP_console_init) }, { HP_POP(console->final, HP_console_final) }, { HP_POP(console->display_title, HP_console_display_title) }, { HP_POP(console->display_gplnotice, HP_console_display_gplnotice) }, -/* core */ +/* core_interface */ { HP_POP(core->shutdown_callback, HP_core_shutdown_callback) }, -/* DB */ +/* db_interface */ { 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) }, @@ -61,7 +61,32 @@ struct HookingPointData HookingPoints[] = { { HP_POP(DB->data2ptr, HP_DB_data2ptr) }, { HP_POP(DB->init, HP_DB_init) }, { HP_POP(DB->final, HP_DB_final) }, -/* libconfig */ +/* lclif_interface */ + { HP_POP(lclif->init, HP_lclif_init) }, + { HP_POP(lclif->final, HP_lclif_final) }, + { HP_POP(lclif->connection_error, HP_lclif_connection_error) }, + { HP_POP(lclif->server_list, HP_lclif_server_list) }, + { HP_POP(lclif->auth_failed, HP_lclif_auth_failed) }, + { HP_POP(lclif->login_error, HP_lclif_login_error) }, + { HP_POP(lclif->coding_key, HP_lclif_coding_key) }, + { HP_POP(lclif->packet, HP_lclif_packet) }, + { HP_POP(lclif->parse_packet, HP_lclif_parse_packet) }, + { HP_POP(lclif->parse, HP_lclif_parse) }, +/* lclif_interface_private */ + { HP_POP(lclif->p->packetdb_loaddb, HP_PRIV__lclif_packetdb_loaddb) }, + { HP_POP(lclif->p->parse_sub, HP_PRIV__lclif_parse_sub) }, + { HP_POP(lclif->p->parse_CA_CONNECT_INFO_CHANGED, HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED) }, + { HP_POP(lclif->p->parse_CA_EXE_HASHCHECK, HP_PRIV__lclif_parse_CA_EXE_HASHCHECK) }, + { HP_POP(lclif->p->parse_CA_LOGIN, HP_PRIV__lclif_parse_CA_LOGIN) }, + { HP_POP(lclif->p->parse_CA_LOGIN2, HP_PRIV__lclif_parse_CA_LOGIN2) }, + { HP_POP(lclif->p->parse_CA_LOGIN3, HP_PRIV__lclif_parse_CA_LOGIN3) }, + { HP_POP(lclif->p->parse_CA_LOGIN4, HP_PRIV__lclif_parse_CA_LOGIN4) }, + { HP_POP(lclif->p->parse_CA_LOGIN_PCBANG, HP_PRIV__lclif_parse_CA_LOGIN_PCBANG) }, + { HP_POP(lclif->p->parse_CA_LOGIN_HAN, HP_PRIV__lclif_parse_CA_LOGIN_HAN) }, + { HP_POP(lclif->p->parse_CA_SSO_LOGIN_REQ, HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ) }, + { HP_POP(lclif->p->parse_CA_REQ_HASH, HP_PRIV__lclif_parse_CA_REQ_HASH) }, + { HP_POP(lclif->p->parse_CA_CHARSERVERCONNECT, HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT) }, +/* libconfig_interface */ { HP_POP(libconfig->read, HP_libconfig_read) }, { HP_POP(libconfig->write, HP_libconfig_write) }, { HP_POP(libconfig->set_options, HP_libconfig_set_options) }, @@ -130,7 +155,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(libconfig->setting_lookup_int16, HP_libconfig_setting_lookup_int16) }, { HP_POP(libconfig->setting_lookup_mutable_string, HP_libconfig_setting_lookup_mutable_string) }, { HP_POP(libconfig->lookup_mutable_string, HP_libconfig_lookup_mutable_string) }, -/* login */ +/* login_interface */ { HP_POP(login->mmo_auth, HP_login_mmo_auth) }, { HP_POP(login->mmo_auth_new, HP_login_mmo_auth_new) }, { HP_POP(login->waiting_disconnect_timer, HP_login_waiting_disconnect_timer) }, @@ -172,22 +197,15 @@ struct HookingPointData HookingPoints[] = { { HP_POP(login->fromchar_parse_wrong_pincode, HP_login_fromchar_parse_wrong_pincode) }, { HP_POP(login->fromchar_parse_accinfo, HP_login_fromchar_parse_accinfo) }, { HP_POP(login->parse_fromchar, HP_login_parse_fromchar) }, - { HP_POP(login->connection_problem, HP_login_connection_problem) }, { HP_POP(login->kick, HP_login_kick) }, { HP_POP(login->auth_ok, HP_login_auth_ok) }, { HP_POP(login->auth_failed, HP_login_auth_failed) }, - { HP_POP(login->login_error, HP_login_login_error) }, - { HP_POP(login->parse_ping, HP_login_parse_ping) }, - { HP_POP(login->parse_client_md5, HP_login_parse_client_md5) }, - { HP_POP(login->parse_client_login, HP_login_parse_client_login) }, - { HP_POP(login->send_coding_key, HP_login_send_coding_key) }, - { HP_POP(login->parse_request_coding_key, HP_login_parse_request_coding_key) }, + { HP_POP(login->client_login, HP_login_client_login) }, { HP_POP(login->char_server_connection_status, HP_login_char_server_connection_status) }, { HP_POP(login->parse_request_connection, HP_login_parse_request_connection) }, - { HP_POP(login->parse_login, HP_login_parse_login) }, { HP_POP(login->config_set_defaults, HP_login_config_set_defaults) }, { HP_POP(login->config_read, HP_login_config_read) }, -/* iMalloc */ +/* malloc_interface */ { HP_POP(iMalloc->init, HP_iMalloc_init) }, { HP_POP(iMalloc->final, HP_iMalloc_final) }, { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) }, @@ -202,14 +220,14 @@ struct HookingPointData HookingPoints[] = { { 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) }, -/* nullpo */ +/* nullpo_interface */ { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) }, -/* showmsg */ +/* showmsg_interface */ { 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) }, -/* sockt */ +/* socket_interface */ { HP_POP(sockt->init, HP_sockt_init) }, { HP_POP(sockt->final, HP_sockt_final) }, { HP_POP(sockt->perform, HP_sockt_perform) }, @@ -238,7 +256,7 @@ struct HookingPointData HookingPoints[] = { { 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 */ +/* sql_interface */ { HP_POP(SQL->Connect, HP_SQL_Connect) }, { HP_POP(SQL->GetTimeout, HP_SQL_GetTimeout) }, { HP_POP(SQL->GetColumnNames, HP_SQL_GetColumnNames) }, @@ -271,7 +289,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(SQL->StmtFreeResult, HP_SQL_StmtFreeResult) }, { HP_POP(SQL->StmtFree, HP_SQL_StmtFree) }, { HP_POP(SQL->StmtShowDebug_, HP_SQL_StmtShowDebug_) }, -/* StrBuf */ +/* stringbuf_interface */ { HP_POP(StrBuf->Malloc, HP_StrBuf_Malloc) }, { HP_POP(StrBuf->Init, HP_StrBuf_Init) }, { HP_POP(StrBuf->Vprintf, HP_StrBuf_Vprintf) }, @@ -282,7 +300,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(StrBuf->Clear, HP_StrBuf_Clear) }, { HP_POP(StrBuf->Destroy, HP_StrBuf_Destroy) }, { HP_POP(StrBuf->Free, HP_StrBuf_Free) }, -/* strlib */ +/* strlib_interface */ { HP_POP(strlib->jstrescape, HP_strlib_jstrescape) }, { HP_POP(strlib->jstrescapecpy, HP_strlib_jstrescapecpy) }, { HP_POP(strlib->jmemescapecpy, HP_strlib_jmemescapecpy) }, @@ -298,7 +316,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(strlib->safestrnlen_, HP_strlib_safestrnlen_) }, { HP_POP(strlib->strline_, HP_strlib_strline_) }, { HP_POP(strlib->bin2hex_, HP_strlib_bin2hex_) }, -/* sv */ +/* sv_interface */ { HP_POP(sv->parse_next, HP_sv_parse_next) }, { HP_POP(sv->parse, HP_sv_parse) }, { HP_POP(sv->split, HP_sv_split) }, @@ -306,7 +324,7 @@ struct HookingPointData HookingPoints[] = { { 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 */ +/* sysinfo_interface */ { HP_POP(sysinfo->getpagesize, HP_sysinfo_getpagesize) }, { HP_POP(sysinfo->platform, HP_sysinfo_platform) }, { HP_POP(sysinfo->osversion, HP_sysinfo_osversion) }, @@ -325,7 +343,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sysinfo->is_superuser, HP_sysinfo_is_superuser) }, { HP_POP(sysinfo->init, HP_sysinfo_init) }, { HP_POP(sysinfo->final, HP_sysinfo_final) }, -/* timer */ +/* timer_interface */ { HP_POP(timer->gettick, HP_timer_gettick) }, { HP_POP(timer->gettick_nocache, HP_timer_gettick_nocache) }, { HP_POP(timer->add, HP_timer_add) }, diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc index d49998deb..91909b819 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc @@ -23,7 +23,7 @@ * as it will get overwritten. */ -/* HCache */ +/* HCache_interface */ void HP_HCache_init(void) { int hIndex = 0; if( HPMHooks.count.HP_HCache_init_pre ) { @@ -104,7 +104,7 @@ FILE* HP_HCache_open(const char *file, const char *opt) { } return retVal___; } -/* cmdline */ +/* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; if( HPMHooks.count.HP_cmdline_init_pre ) { @@ -265,7 +265,7 @@ const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { } return retVal___; } -/* console */ +/* console_interface */ void HP_console_init(void) { int hIndex = 0; if( HPMHooks.count.HP_console_init_pre ) { @@ -370,7 +370,7 @@ void HP_console_display_gplnotice(void) { } return; } -/* core */ +/* core_interface */ void HP_core_shutdown_callback(void) { int hIndex = 0; if( HPMHooks.count.HP_core_shutdown_callback_pre ) { @@ -397,7 +397,7 @@ void HP_core_shutdown_callback(void) { } return; } -/* DB */ +/* db_interface */ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { int hIndex = 0; enum DBOptions retVal___ = DB_OPT_BASE; @@ -917,7 +917,623 @@ void HP_DB_final(void) { } return; } -/* libconfig */ +/* lclif_interface */ +void HP_lclif_init(void) { + int hIndex = 0; + if( HPMHooks.count.HP_lclif_init_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_init_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_lclif_init_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.lclif.init(); + } + if( HPMHooks.count.HP_lclif_init_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_init_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_lclif_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_lclif_final(void) { + int hIndex = 0; + if( HPMHooks.count.HP_lclif_final_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_final_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_lclif_final_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.lclif.final(); + } + if( HPMHooks.count.HP_lclif_final_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_final_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_lclif_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_lclif_connection_error(int fd, uint8 error) { + int hIndex = 0; + if( HPMHooks.count.HP_lclif_connection_error_pre ) { + void (*preHookFunc) (int *fd, uint8 *error); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_connection_error_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_lclif_connection_error_pre[hIndex].func; + preHookFunc(&fd, &error); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.lclif.connection_error(fd, error); + } + if( HPMHooks.count.HP_lclif_connection_error_post ) { + void (*postHookFunc) (int *fd, uint8 *error); + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_connection_error_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_lclif_connection_error_post[hIndex].func; + postHookFunc(&fd, &error); + } + } + return; +} +bool HP_lclif_server_list(struct login_session_data *sd) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_lclif_server_list_pre ) { + bool (*preHookFunc) (struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_server_list_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_lclif_server_list_pre[hIndex].func; + retVal___ = preHookFunc(sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.lclif.server_list(sd); + } + if( HPMHooks.count.HP_lclif_server_list_post ) { + bool (*postHookFunc) (bool retVal___, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_server_list_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_lclif_server_list_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +void HP_lclif_auth_failed(int fd, time_t ban, uint32 error) { + int hIndex = 0; + if( HPMHooks.count.HP_lclif_auth_failed_pre ) { + void (*preHookFunc) (int *fd, time_t *ban, uint32 *error); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_auth_failed_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_lclif_auth_failed_pre[hIndex].func; + preHookFunc(&fd, &ban, &error); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.lclif.auth_failed(fd, ban, error); + } + if( HPMHooks.count.HP_lclif_auth_failed_post ) { + void (*postHookFunc) (int *fd, time_t *ban, uint32 *error); + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_auth_failed_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_lclif_auth_failed_post[hIndex].func; + postHookFunc(&fd, &ban, &error); + } + } + return; +} +void HP_lclif_login_error(int fd, uint8 error) { + int hIndex = 0; + if( HPMHooks.count.HP_lclif_login_error_pre ) { + void (*preHookFunc) (int *fd, uint8 *error); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_login_error_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_lclif_login_error_pre[hIndex].func; + preHookFunc(&fd, &error); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.lclif.login_error(fd, error); + } + if( HPMHooks.count.HP_lclif_login_error_post ) { + void (*postHookFunc) (int *fd, uint8 *error); + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_login_error_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_lclif_login_error_post[hIndex].func; + postHookFunc(&fd, &error); + } + } + return; +} +void HP_lclif_coding_key(int fd, struct login_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_lclif_coding_key_pre ) { + void (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_coding_key_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_lclif_coding_key_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.lclif.coding_key(fd, sd); + } + if( HPMHooks.count.HP_lclif_coding_key_post ) { + void (*postHookFunc) (int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_coding_key_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_lclif_coding_key_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +const struct login_packet_db* HP_lclif_packet(int16 packet_id) { + int hIndex = 0; + const struct login_packet_db* retVal___ = NULL; + if( HPMHooks.count.HP_lclif_packet_pre ) { + const struct login_packet_db* (*preHookFunc) (int16 *packet_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_packet_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_lclif_packet_pre[hIndex].func; + retVal___ = preHookFunc(&packet_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.lclif.packet(packet_id); + } + if( HPMHooks.count.HP_lclif_packet_post ) { + const struct login_packet_db* (*postHookFunc) (const struct login_packet_db* retVal___, int16 *packet_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_packet_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_lclif_packet_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &packet_id); + } + } + return retVal___; +} +enum parsefunc_rcode HP_lclif_parse_packet(const struct login_packet_db *lpd, int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if( HPMHooks.count.HP_lclif_parse_packet_pre ) { + enum parsefunc_rcode (*preHookFunc) (const struct login_packet_db *lpd, int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_packet_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_lclif_parse_packet_pre[hIndex].func; + retVal___ = preHookFunc(lpd, &fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.lclif.parse_packet(lpd, fd, sd); + } + if( HPMHooks.count.HP_lclif_parse_packet_post ) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, const struct login_packet_db *lpd, int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_packet_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_lclif_parse_packet_post[hIndex].func; + retVal___ = postHookFunc(retVal___, lpd, &fd, sd); + } + } + return retVal___; +} +int HP_lclif_parse(int fd) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_lclif_parse_pre ) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_lclif_parse_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.lclif.parse(fd); + } + if( HPMHooks.count.HP_lclif_parse_post ) { + int (*postHookFunc) (int retVal___, int *fd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_lclif_parse_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd); + } + } + return retVal___; +} +/* lclif_interface_private */ +void HP_PRIV__lclif_packetdb_loaddb(void) { + int hIndex = 0; + if( HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_packetdb_loaddb_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.PRIV__lclif.packetdb_loaddb(); + } + if( HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_packetdb_loaddb_post[hIndex].func; + postHookFunc(); + } + } + return; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_sub(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if( HPMHooks.count.HP_PRIV__lclif_parse_sub_pre ) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_sub_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_sub_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_sub(fd, sd); + } + if( HPMHooks.count.HP_PRIV__lclif_parse_sub_post ) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_sub_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_pre ) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_CONNECT_INFO_CHANGED(fd, sd); + } + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_post ) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_EXE_HASHCHECK(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_pre ) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_EXE_HASHCHECK(fd, sd); + } + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_post ) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_pre ) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN(fd, sd); + } + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_post ) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN2(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN2_pre ) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN2_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN2_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN2(fd, sd); + } + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN2_post ) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN2_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN3(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN3_pre ) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN3_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN3_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN3(fd, sd); + } + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN3_post ) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN3_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN3_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN4(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN4_pre ) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN4_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN4_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN4(fd, sd); + } + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN4_post ) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN4_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN4_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN_PCBANG(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_pre ) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN_PCBANG(fd, sd); + } + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_post ) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN_HAN(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_HAN_pre ) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_HAN_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_HAN_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN_HAN(fd, sd); + } + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_HAN_post ) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_HAN_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_HAN_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_pre ) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_SSO_LOGIN_REQ(fd, sd); + } + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post ) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_REQ_HASH(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_REQ_HASH_pre ) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_REQ_HASH_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_REQ_HASH_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_REQ_HASH(fd, sd); + } + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_REQ_HASH_post ) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_REQ_HASH_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_REQ_HASH_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre ) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_CHARSERVERCONNECT(fd, sd); + } + if( HPMHooks.count.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post ) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd); + } + } + return retVal___; +} +/* libconfig_interface */ int HP_libconfig_read(struct config_t *config, FILE *stream) { int hIndex = 0; int retVal___ = 0; @@ -2744,7 +3360,7 @@ int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char } return retVal___; } -/* login */ +/* login_interface */ int HP_login_mmo_auth(struct login_session_data *sd, bool isServer) { int hIndex = 0; int retVal___ = 0; @@ -3844,32 +4460,6 @@ int HP_login_parse_fromchar(int fd) { } return retVal___; } -void HP_login_connection_problem(int fd, uint8 status) { - int hIndex = 0; - if( HPMHooks.count.HP_login_connection_problem_pre ) { - void (*preHookFunc) (int *fd, uint8 *status); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_connection_problem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_connection_problem_pre[hIndex].func; - preHookFunc(&fd, &status); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.login.connection_problem(fd, status); - } - if( HPMHooks.count.HP_login_connection_problem_post ) { - void (*postHookFunc) (int *fd, uint8 *status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_connection_problem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_connection_problem_post[hIndex].func; - postHookFunc(&fd, &status); - } - } - return; -} void HP_login_kick(struct login_session_data *sd) { int hIndex = 0; if( HPMHooks.count.HP_login_kick_pre ) { @@ -3948,93 +4538,15 @@ void HP_login_auth_failed(struct login_session_data *sd, int result) { } return; } -void HP_login_login_error(int fd, uint8 status) { - int hIndex = 0; - if( HPMHooks.count.HP_login_login_error_pre ) { - void (*preHookFunc) (int *fd, uint8 *status); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_login_error_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_login_error_pre[hIndex].func; - preHookFunc(&fd, &status); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.login.login_error(fd, status); - } - if( HPMHooks.count.HP_login_login_error_post ) { - void (*postHookFunc) (int *fd, uint8 *status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_login_error_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_login_error_post[hIndex].func; - postHookFunc(&fd, &status); - } - } - return; -} -void HP_login_parse_ping(int fd, struct login_session_data *sd) { - int hIndex = 0; - if( HPMHooks.count.HP_login_parse_ping_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_ping_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_ping_pre[hIndex].func; - preHookFunc(&fd, sd); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.login.parse_ping(fd, sd); - } - if( HPMHooks.count.HP_login_parse_ping_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_ping_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_ping_post[hIndex].func; - postHookFunc(&fd, sd); - } - } - return; -} -void HP_login_parse_client_md5(int fd, struct login_session_data *sd) { - int hIndex = 0; - if( HPMHooks.count.HP_login_parse_client_md5_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_client_md5_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_client_md5_pre[hIndex].func; - preHookFunc(&fd, sd); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.login.parse_client_md5(fd, sd); - } - if( HPMHooks.count.HP_login_parse_client_md5_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_client_md5_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_client_md5_post[hIndex].func; - postHookFunc(&fd, sd); - } - } - return; -} -bool HP_login_parse_client_login(int fd, struct login_session_data *sd, const char *ip) { +bool HP_login_client_login(int fd, struct login_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_login_parse_client_login_pre ) { - bool (*preHookFunc) (int *fd, struct login_session_data *sd, const char *ip); + if( HPMHooks.count.HP_login_client_login_pre ) { + bool (*preHookFunc) (int *fd, struct login_session_data *sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_client_login_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_client_login_pre[hIndex].func; - retVal___ = preHookFunc(&fd, sd, ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_client_login_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd); } if( *HPMforce_return ) { *HPMforce_return = false; @@ -4042,69 +4554,17 @@ bool HP_login_parse_client_login(int fd, struct login_session_data *sd, const ch } } { - retVal___ = HPMHooks.source.login.parse_client_login(fd, sd, ip); + retVal___ = HPMHooks.source.login.client_login(fd, sd); } - if( HPMHooks.count.HP_login_parse_client_login_post ) { - bool (*postHookFunc) (bool retVal___, int *fd, struct login_session_data *sd, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_client_login_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_client_login_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, sd, ip); + if( HPMHooks.count.HP_login_client_login_post ) { + bool (*postHookFunc) (bool retVal___, int *fd, struct login_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_client_login_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd); } } return retVal___; } -void HP_login_send_coding_key(int fd, struct login_session_data *sd) { - int hIndex = 0; - if( HPMHooks.count.HP_login_send_coding_key_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_send_coding_key_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_send_coding_key_pre[hIndex].func; - preHookFunc(&fd, sd); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.login.send_coding_key(fd, sd); - } - if( HPMHooks.count.HP_login_send_coding_key_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_send_coding_key_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_send_coding_key_post[hIndex].func; - postHookFunc(&fd, sd); - } - } - return; -} -void HP_login_parse_request_coding_key(int fd, struct login_session_data *sd) { - int hIndex = 0; - if( HPMHooks.count.HP_login_parse_request_coding_key_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_coding_key_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_request_coding_key_pre[hIndex].func; - preHookFunc(&fd, sd); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.login.parse_request_coding_key(fd, sd); - } - if( HPMHooks.count.HP_login_parse_request_coding_key_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_coding_key_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_request_coding_key_post[hIndex].func; - postHookFunc(&fd, sd); - } - } - return; -} void HP_login_char_server_connection_status(int fd, struct login_session_data *sd, uint8 status) { int hIndex = 0; if( HPMHooks.count.HP_login_char_server_connection_status_pre ) { @@ -4157,33 +4617,6 @@ void HP_login_parse_request_connection(int fd, struct login_session_data *sd, co } return; } -int HP_login_parse_login(int fd) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_login_parse_login_pre ) { - int (*preHookFunc) (int *fd); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_login_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_login_pre[hIndex].func; - retVal___ = preHookFunc(&fd); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.login.parse_login(fd); - } - if( HPMHooks.count.HP_login_parse_login_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_login_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_login_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); - } - } - return retVal___; -} void HP_login_config_set_defaults(void) { int hIndex = 0; if( HPMHooks.count.HP_login_config_set_defaults_pre ) { @@ -4237,7 +4670,7 @@ int HP_login_config_read(const char *cfgName) { } return retVal___; } -/* iMalloc */ +/* malloc_interface */ void HP_iMalloc_init(void) { int hIndex = 0; if( HPMHooks.count.HP_iMalloc_init_pre ) { @@ -4610,7 +5043,7 @@ void HP_iMalloc_init_messages(void) { } return; } -/* nullpo */ +/* nullpo_interface */ void HP_nullpo_assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) { int hIndex = 0; if( HPMHooks.count.HP_nullpo_assert_report_pre ) { @@ -4637,7 +5070,7 @@ void HP_nullpo_assert_report(const char *file, int line, const char *func, const } return; } -/* showmsg */ +/* showmsg_interface */ void HP_showmsg_init(void) { int hIndex = 0; if( HPMHooks.count.HP_showmsg_init_pre ) { @@ -4749,7 +5182,7 @@ int HP_showmsg_showMessageV(const char *string, va_list ap) { } return retVal___; } -/* sockt */ +/* socket_interface */ void HP_sockt_init(void) { int hIndex = 0; if( HPMHooks.count.HP_sockt_init_pre ) { @@ -5496,7 +5929,7 @@ void HP_sockt_net_config_read(const char *filename) { } return; } -/* SQL */ +/* sql_interface */ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db) { int hIndex = 0; int retVal___ = 0; @@ -6367,7 +6800,7 @@ void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const u } return; } -/* StrBuf */ +/* stringbuf_interface */ StringBuf* HP_StrBuf_Malloc(void) { int hIndex = 0; StringBuf* retVal___ = NULL; @@ -6640,7 +7073,7 @@ void HP_StrBuf_Free(StringBuf *self) { } return; } -/* strlib */ +/* strlib_interface */ char* HP_strlib_jstrescape(char *pt) { int hIndex = 0; char* retVal___ = NULL; @@ -7019,11 +7452,11 @@ int HP_strlib_strline_(const char *str, size_t pos) { } return retVal___; } -bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { +bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count) { int hIndex = 0; bool retVal___ = false; if( HPMHooks.count.HP_strlib_bin2hex__pre ) { - bool (*preHookFunc) (char *output, unsigned char *input, size_t *count); + bool (*preHookFunc) (char *output, const unsigned char *input, size_t *count); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_strlib_bin2hex__pre[hIndex].func; @@ -7038,7 +7471,7 @@ bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { retVal___ = HPMHooks.source.strlib.bin2hex_(output, input, count); } if( HPMHooks.count.HP_strlib_bin2hex__post ) { - bool (*postHookFunc) (bool retVal___, char *output, unsigned char *input, size_t *count); + bool (*postHookFunc) (bool retVal___, char *output, const unsigned char *input, size_t *count); for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_strlib_bin2hex__post[hIndex].func; retVal___ = postHookFunc(retVal___, output, input, &count); @@ -7046,7 +7479,7 @@ bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { } return retVal___; } -/* sv */ +/* sv_interface */ int HP_sv_parse_next(struct s_svstate *svstate) { int hIndex = 0; int retVal___ = 0; @@ -7236,7 +7669,7 @@ bool HP_sv_readdb(const char *directory, const char *filename, char delim, int m } return retVal___; } -/* sysinfo */ +/* sysinfo_interface */ int HP_sysinfo_getpagesize(void) { int hIndex = 0; int retVal___ = 0; @@ -7720,7 +8153,7 @@ void HP_sysinfo_final(void) { } return; } -/* timer */ +/* timer_interface */ int64 HP_timer_gettick(void) { int hIndex = 0; int64 retVal___ = 0; diff --git a/src/plugins/HPMHooking/HPMHooking_login.sources.inc b/src/plugins/HPMHooking/HPMHooking_login.sources.inc index bbc1cecbc..1c1927619 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.sources.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.sources.inc @@ -28,6 +28,8 @@ 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.lclif, lclif, sizeof(struct lclif_interface)); +memcpy(&HPMHooks.source.PRIV__lclif, lclif->p, sizeof(struct lclif_interface_private)); memcpy(&HPMHooks.source.libconfig, libconfig, sizeof(struct libconfig_interface)); memcpy(&HPMHooks.source.login, login, sizeof(struct login_interface)); memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface)); diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 714da27bf..8d9752849 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -23,11 +23,11 @@ */ struct HookingPointData HookingPoints[] = { -/* HCache */ +/* HCache_interface */ { HP_POP(HCache->init, HP_HCache_init) }, { HP_POP(HCache->check, HP_HCache_check) }, { HP_POP(HCache->open, HP_HCache_open) }, -/* atcommand */ +/* atcommand_interface */ { HP_POP(atcommand->init, HP_atcommand_init) }, { HP_POP(atcommand->final, HP_atcommand_final) }, { HP_POP(atcommand->exec, HP_atcommand_exec) }, @@ -63,7 +63,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(atcommand->expand_message_table, HP_atcommand_expand_message_table) }, { HP_POP(atcommand->msgfd, HP_atcommand_msgfd) }, { HP_POP(atcommand->msgsd, HP_atcommand_msgsd) }, -/* battle */ +/* battle_interface */ { HP_POP(battle->init, HP_battle_init) }, { HP_POP(battle->final, HP_battle_final) }, { HP_POP(battle->calc_attack, HP_battle_calc_attack) }, @@ -119,7 +119,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(battle->calc_skillratio_magic_unknown, HP_battle_calc_skillratio_magic_unknown) }, { HP_POP(battle->calc_skillratio_weapon_unknown, HP_battle_calc_skillratio_weapon_unknown) }, { HP_POP(battle->calc_misc_attack_unknown, HP_battle_calc_misc_attack_unknown) }, -/* bg */ +/* battleground_interface */ { HP_POP(bg->init, HP_bg_init) }, { HP_POP(bg->final, HP_bg_final) }, { HP_POP(bg->name2arena, HP_bg_name2arena) }, @@ -151,7 +151,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(bg->team_db_final, HP_bg_team_db_final) }, { HP_POP(bg->str2teamtype, HP_bg_str2teamtype) }, { HP_POP(bg->config_read, HP_bg_config_read) }, -/* buyingstore */ +/* buyingstore_interface */ { HP_POP(buyingstore->setup, HP_buyingstore_setup) }, { HP_POP(buyingstore->create, HP_buyingstore_create) }, { HP_POP(buyingstore->close, HP_buyingstore_close) }, @@ -160,7 +160,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(buyingstore->search, HP_buyingstore_search) }, { HP_POP(buyingstore->searchall, HP_buyingstore_searchall) }, { HP_POP(buyingstore->getuid, HP_buyingstore_getuid) }, -/* channel */ +/* channel_interface */ { HP_POP(channel->init, HP_channel_init) }, { HP_POP(channel->final, HP_channel_final) }, { HP_POP(channel->search, HP_channel_search) }, @@ -182,7 +182,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(channel->quit_guild, HP_channel_quit_guild) }, { HP_POP(channel->irc_join, HP_channel_irc_join) }, { HP_POP(channel->config_read, HP_channel_config_read) }, -/* chat */ +/* chat_interface */ { HP_POP(chat->create_pc_chat, HP_chat_create_pc_chat) }, { HP_POP(chat->join, HP_chat_join) }, { HP_POP(chat->leave, HP_chat_leave) }, @@ -196,7 +196,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chat->npc_kick_all, HP_chat_npc_kick_all) }, { HP_POP(chat->trigger_event, HP_chat_trigger_event) }, { HP_POP(chat->create, HP_chat_create) }, -/* chrif */ +/* chrif_interface */ { HP_POP(chrif->init, HP_chrif_init) }, { HP_POP(chrif->final, HP_chrif_final) }, { HP_POP(chrif->setuserid, HP_chrif_setuserid) }, @@ -267,7 +267,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chrif->parse, HP_chrif_parse) }, { HP_POP(chrif->save_scdata_single, HP_chrif_save_scdata_single) }, { HP_POP(chrif->del_scdata_single, HP_chrif_del_scdata_single) }, -/* clif */ +/* clif_interface */ { HP_POP(clif->init, HP_clif_init) }, { HP_POP(clif->final, HP_clif_final) }, { HP_POP(clif->setip, HP_clif_setip) }, @@ -948,21 +948,21 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->selectcart, HP_clif_selectcart) }, { HP_POP(clif->pSelectCart, HP_clif_pSelectCart) }, { HP_POP(clif->get_bl_name, HP_clif_get_bl_name) }, -/* cmdline */ +/* cmdline_interface */ { 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 */ +/* console_interface */ { HP_POP(console->init, HP_console_init) }, { HP_POP(console->final, HP_console_final) }, { HP_POP(console->display_title, HP_console_display_title) }, { HP_POP(console->display_gplnotice, HP_console_display_gplnotice) }, -/* core */ +/* core_interface */ { HP_POP(core->shutdown_callback, HP_core_shutdown_callback) }, -/* DB */ +/* db_interface */ { 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) }, @@ -982,7 +982,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(DB->data2ptr, HP_DB_data2ptr) }, { HP_POP(DB->init, HP_DB_init) }, { HP_POP(DB->final, HP_DB_final) }, -/* duel */ +/* duel_interface */ { HP_POP(duel->create, HP_duel_create) }, { HP_POP(duel->invite, HP_duel_invite) }, { HP_POP(duel->accept, HP_duel_accept) }, @@ -992,7 +992,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(duel->checktime, HP_duel_checktime) }, { HP_POP(duel->init, HP_duel_init) }, { HP_POP(duel->final, HP_duel_final) }, -/* elemental */ +/* elemental_interface */ { HP_POP(elemental->init, HP_elemental_init) }, { HP_POP(elemental->final, HP_elemental_final) }, { HP_POP(elemental->class, HP_elemental_class) }, @@ -1025,7 +1025,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(elemental->ai_sub_foreachclient, HP_elemental_ai_sub_foreachclient) }, { HP_POP(elemental->ai_timer, HP_elemental_ai_timer) }, { HP_POP(elemental->read_db, HP_elemental_read_db) }, -/* guild */ +/* guild_interface */ { HP_POP(guild->init, HP_guild_init) }, { HP_POP(guild->final, HP_guild_final) }, { HP_POP(guild->skill_get_max, HP_guild_skill_get_max) }, @@ -1112,7 +1112,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(guild->check_member, HP_guild_check_member) }, { HP_POP(guild->get_alliance_count, HP_guild_get_alliance_count) }, { HP_POP(guild->castle_reconnect_sub, HP_guild_castle_reconnect_sub) }, -/* gstorage */ +/* guild_storage_interface */ { HP_POP(gstorage->ensure, HP_gstorage_ensure) }, { HP_POP(gstorage->init, HP_gstorage_init) }, { HP_POP(gstorage->final, HP_gstorage_final) }, @@ -1129,7 +1129,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(gstorage->save, HP_gstorage_save) }, { HP_POP(gstorage->saved, HP_gstorage_saved) }, { HP_POP(gstorage->create, HP_gstorage_create) }, -/* homun */ +/* homunculus_interface */ { HP_POP(homun->init, HP_homun_init) }, { HP_POP(homun->final, HP_homun_final) }, { HP_POP(homun->reload, HP_homun_reload) }, @@ -1177,7 +1177,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(homun->addspiritball, HP_homun_addspiritball) }, { HP_POP(homun->delspiritball, HP_homun_delspiritball) }, { HP_POP(homun->get_intimacy_grade, HP_homun_get_intimacy_grade) }, -/* instance */ +/* instance_interface */ { HP_POP(instance->init, HP_instance_init) }, { HP_POP(instance->final, HP_instance_final) }, { HP_POP(instance->reload, HP_instance_reload) }, @@ -1196,7 +1196,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(instance->set_timeout, HP_instance_set_timeout) }, { HP_POP(instance->valid, HP_instance_valid) }, { HP_POP(instance->destroy_timer, HP_instance_destroy_timer) }, -/* intif */ +/* intif_interface */ { HP_POP(intif->parse, HP_intif_parse) }, { HP_POP(intif->create_pet, HP_intif_create_pet) }, { HP_POP(intif->broadcast, HP_intif_broadcast) }, @@ -1328,7 +1328,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->pRecvHomunculusData, HP_intif_pRecvHomunculusData) }, { HP_POP(intif->pSaveHomunculusOk, HP_intif_pSaveHomunculusOk) }, { HP_POP(intif->pDeleteHomunculusOk, HP_intif_pDeleteHomunculusOk) }, -/* ircbot */ +/* irc_bot_interface */ { HP_POP(ircbot->init, HP_ircbot_init) }, { HP_POP(ircbot->final, HP_ircbot_final) }, { HP_POP(ircbot->parse, HP_ircbot_parse) }, @@ -1345,7 +1345,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(ircbot->userjoin, HP_ircbot_userjoin) }, { HP_POP(ircbot->userleave, HP_ircbot_userleave) }, { HP_POP(ircbot->usernick, HP_ircbot_usernick) }, -/* itemdb */ +/* itemdb_interface */ { HP_POP(itemdb->init, HP_itemdb_init) }, { HP_POP(itemdb->final, HP_itemdb_final) }, { HP_POP(itemdb->reload, HP_itemdb_reload) }, @@ -1405,7 +1405,7 @@ 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 */ +/* libconfig_interface */ { HP_POP(libconfig->read, HP_libconfig_read) }, { HP_POP(libconfig->write, HP_libconfig_write) }, { HP_POP(libconfig->set_options, HP_libconfig_set_options) }, @@ -1474,7 +1474,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(libconfig->setting_lookup_int16, HP_libconfig_setting_lookup_int16) }, { HP_POP(libconfig->setting_lookup_mutable_string, HP_libconfig_setting_lookup_mutable_string) }, { HP_POP(libconfig->lookup_mutable_string, HP_libconfig_lookup_mutable_string) }, -/* logs */ +/* log_interface */ { HP_POP(logs->pick_pc, HP_logs_pick_pc) }, { HP_POP(logs->pick_mob, HP_logs_pick_mob) }, { HP_POP(logs->zeny, HP_logs_zeny) }, @@ -1497,7 +1497,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(logs->picktype2char, HP_logs_picktype2char) }, { HP_POP(logs->chattype2char, HP_logs_chattype2char) }, { HP_POP(logs->should_log_item, HP_logs_should_log_item) }, -/* mail */ +/* mail_interface */ { HP_POP(mail->clear, HP_mail_clear) }, { HP_POP(mail->removeitem, HP_mail_removeitem) }, { HP_POP(mail->removezeny, HP_mail_removezeny) }, @@ -1507,7 +1507,7 @@ 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 */ +/* malloc_interface */ { HP_POP(iMalloc->init, HP_iMalloc_init) }, { HP_POP(iMalloc->final, HP_iMalloc_final) }, { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) }, @@ -1522,7 +1522,7 @@ struct HookingPointData HookingPoints[] = { { 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 */ +/* map_interface */ { HP_POP(map->zone_init, HP_map_zone_init) }, { HP_POP(map->zone_remove, HP_map_zone_remove) }, { HP_POP(map->zone_apply, HP_map_zone_apply) }, @@ -1656,7 +1656,7 @@ 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 */ +/* mapindex_interface */ { HP_POP(mapindex->init, HP_mapindex_init) }, { HP_POP(mapindex->final, HP_mapindex_final) }, { HP_POP(mapindex->addmap, HP_mapindex_addmap) }, @@ -1666,7 +1666,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapindex->name2id, HP_mapindex_name2id) }, { HP_POP(mapindex->id2name, HP_mapindex_id2name) }, { HP_POP(mapindex->check_default, HP_mapindex_check_default) }, -/* mapit */ +/* mapit_interface */ { HP_POP(mapit->alloc, HP_mapit_alloc) }, { HP_POP(mapit->free, HP_mapit_free) }, { HP_POP(mapit->first, HP_mapit_first) }, @@ -1674,7 +1674,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapit->next, HP_mapit_next) }, { HP_POP(mapit->prev, HP_mapit_prev) }, { HP_POP(mapit->exists, HP_mapit_exists) }, -/* mapreg */ +/* mapreg_interface */ { HP_POP(mapreg->init, HP_mapreg_init) }, { HP_POP(mapreg->final, HP_mapreg_final) }, { HP_POP(mapreg->readreg, HP_mapreg_readreg) }, @@ -1687,7 +1687,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapreg->destroyreg, HP_mapreg_destroyreg) }, { HP_POP(mapreg->reload, HP_mapreg_reload) }, { HP_POP(mapreg->config_read, HP_mapreg_config_read) }, -/* mercenary */ +/* mercenary_interface */ { HP_POP(mercenary->init, HP_mercenary_init) }, { HP_POP(mercenary->class, HP_mercenary_class) }, { HP_POP(mercenary->get_viewdata, HP_mercenary_get_viewdata) }, @@ -1713,7 +1713,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mercenary->contract_end_timer, HP_mercenary_contract_end_timer) }, { HP_POP(mercenary->read_db_sub, HP_mercenary_read_db_sub) }, { HP_POP(mercenary->read_skill_db_sub, HP_mercenary_read_skill_db_sub) }, -/* mob */ +/* mob_interface */ { HP_POP(mob->init, HP_mob_init) }, { HP_POP(mob->final, HP_mob_final) }, { HP_POP(mob->reload, HP_mob_reload) }, @@ -1817,7 +1817,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->load, HP_mob_load) }, { HP_POP(mob->clear_spawninfo, HP_mob_clear_spawninfo) }, { HP_POP(mob->destroy_mob_db, HP_mob_destroy_mob_db) }, -/* npc_chat */ +/* npc_chat_interface */ { HP_POP(npc_chat->sub, HP_npc_chat_sub) }, { HP_POP(npc_chat->finalize, HP_npc_chat_finalize) }, { HP_POP(npc_chat->def_pattern, HP_npc_chat_def_pattern) }, @@ -1827,7 +1827,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(npc_chat->activate_pcreset, HP_npc_chat_activate_pcreset) }, { HP_POP(npc_chat->lookup_pcreset, HP_npc_chat_lookup_pcreset) }, { HP_POP(npc_chat->finalize_pcrematch_entry, HP_npc_chat_finalize_pcrematch_entry) }, -/* npc */ +/* npc_interface */ { HP_POP(npc->init, HP_npc_init) }, { HP_POP(npc->final, HP_npc_final) }, { HP_POP(npc->get_new_npc_id, HP_npc_get_new_npc_id) }, @@ -1938,9 +1938,9 @@ 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 */ +/* nullpo_interface */ { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) }, -/* party */ +/* party_interface */ { HP_POP(party->init, HP_party_init) }, { HP_POP(party->final, HP_party_final) }, { HP_POP(party->search, HP_party_search) }, @@ -1990,7 +1990,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(party->check_state, HP_party_check_state) }, { HP_POP(party->create_booking_data, HP_party_create_booking_data) }, { HP_POP(party->db_final, HP_party_db_final) }, -/* path */ +/* path_interface */ { HP_POP(path->blownpos, HP_path_blownpos) }, { HP_POP(path->search, HP_path_search) }, { HP_POP(path->search_long, HP_path_search_long) }, @@ -1998,7 +1998,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(path->distance, HP_path_distance) }, { HP_POP(path->check_distance_client, HP_path_check_distance_client) }, { HP_POP(path->distance_client, HP_path_distance_client) }, -/* pcg */ +/* pc_groups_interface */ { HP_POP(pcg->init, HP_pcg_init) }, { HP_POP(pcg->final, HP_pcg_final) }, { HP_POP(pcg->reload, HP_pcg_reload) }, @@ -2010,7 +2010,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pcg->get_name, HP_pcg_get_name) }, { HP_POP(pcg->get_level, HP_pcg_get_level) }, { HP_POP(pcg->get_idx, HP_pcg_get_idx) }, -/* pc */ +/* pc_interface */ { HP_POP(pc->init, HP_pc_init) }, { HP_POP(pc->final, HP_pc_final) }, { HP_POP(pc->get_dummy_sd, HP_pc_get_dummy_sd) }, @@ -2228,7 +2228,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->check_job_name, HP_pc_check_job_name) }, { HP_POP(pc->update_idle_time, HP_pc_update_idle_time) }, { HP_POP(pc->have_magnifier, HP_pc_have_magnifier) }, -/* libpcre */ +/* pcre_interface */ { HP_POP(libpcre->compile, HP_libpcre_compile) }, { HP_POP(libpcre->study, HP_libpcre_study) }, { HP_POP(libpcre->exec, HP_libpcre_exec) }, @@ -2237,7 +2237,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(libpcre->free_substring, HP_libpcre_free_substring) }, { HP_POP(libpcre->copy_named_substring, HP_libpcre_copy_named_substring) }, { HP_POP(libpcre->get_substring, HP_libpcre_get_substring) }, -/* pet */ +/* pet_interface */ { HP_POP(pet->init, HP_pet_init) }, { HP_POP(pet->final, HP_pet_final) }, { HP_POP(pet->hungry_val, HP_pet_hungry_val) }, @@ -2276,7 +2276,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pet->recovery_timer, HP_pet_recovery_timer) }, { HP_POP(pet->skill_support_timer, HP_pet_skill_support_timer) }, { HP_POP(pet->read_db, HP_pet_read_db) }, -/* quest */ +/* quest_interface */ { HP_POP(quest->init, HP_quest_init) }, { HP_POP(quest->final, HP_quest_final) }, { HP_POP(quest->reload, HP_quest_reload) }, @@ -2292,7 +2292,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(quest->clear, HP_quest_clear) }, { HP_POP(quest->read_db, HP_quest_read_db) }, { HP_POP(quest->read_db_sub, HP_quest_read_db_sub) }, -/* script */ +/* script_interface */ { HP_POP(script->init, HP_script_init) }, { HP_POP(script->final, HP_script_final) }, { HP_POP(script->reload, HP_script_reload) }, @@ -2462,7 +2462,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->run_use_script, HP_script_run_use_script) }, { HP_POP(script->run_item_equip_script, HP_script_run_item_equip_script) }, { HP_POP(script->run_item_unequip_script, HP_script_run_item_unequip_script) }, -/* searchstore */ +/* searchstore_interface */ { HP_POP(searchstore->open, HP_searchstore_open) }, { HP_POP(searchstore->query, HP_searchstore_query) }, { HP_POP(searchstore->querynext, HP_searchstore_querynext) }, @@ -2473,12 +2473,12 @@ 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 */ +/* showmsg_interface */ { 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 */ +/* skill_interface */ { HP_POP(skill->init, HP_skill_init) }, { HP_POP(skill->final, HP_skill_final) }, { HP_POP(skill->reload, HP_skill_reload) }, @@ -2696,7 +2696,7 @@ 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 */ +/* socket_interface */ { HP_POP(sockt->init, HP_sockt_init) }, { HP_POP(sockt->final, HP_sockt_final) }, { HP_POP(sockt->perform, HP_sockt_perform) }, @@ -2725,7 +2725,7 @@ struct HookingPointData HookingPoints[] = { { 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 */ +/* sql_interface */ { HP_POP(SQL->Connect, HP_SQL_Connect) }, { HP_POP(SQL->GetTimeout, HP_SQL_GetTimeout) }, { HP_POP(SQL->GetColumnNames, HP_SQL_GetColumnNames) }, @@ -2758,7 +2758,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(SQL->StmtFreeResult, HP_SQL_StmtFreeResult) }, { HP_POP(SQL->StmtFree, HP_SQL_StmtFree) }, { HP_POP(SQL->StmtShowDebug_, HP_SQL_StmtShowDebug_) }, -/* status */ +/* status_interface */ { HP_POP(status->init, HP_status_init) }, { HP_POP(status->final, HP_status_final) }, { HP_POP(status->get_refine_chance, HP_status_get_refine_chance) }, @@ -2871,7 +2871,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(status->readdb_scconfig, HP_status_readdb_scconfig) }, { HP_POP(status->read_job_db, HP_status_read_job_db) }, { HP_POP(status->read_job_db_sub, HP_status_read_job_db_sub) }, -/* storage */ +/* storage_interface */ { HP_POP(storage->reconnect, HP_storage_reconnect) }, { HP_POP(storage->delitem, HP_storage_delitem) }, { HP_POP(storage->open, HP_storage_open) }, @@ -2885,7 +2885,7 @@ 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 */ +/* stringbuf_interface */ { HP_POP(StrBuf->Malloc, HP_StrBuf_Malloc) }, { HP_POP(StrBuf->Init, HP_StrBuf_Init) }, { HP_POP(StrBuf->Vprintf, HP_StrBuf_Vprintf) }, @@ -2896,7 +2896,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(StrBuf->Clear, HP_StrBuf_Clear) }, { HP_POP(StrBuf->Destroy, HP_StrBuf_Destroy) }, { HP_POP(StrBuf->Free, HP_StrBuf_Free) }, -/* strlib */ +/* strlib_interface */ { HP_POP(strlib->jstrescape, HP_strlib_jstrescape) }, { HP_POP(strlib->jstrescapecpy, HP_strlib_jstrescapecpy) }, { HP_POP(strlib->jmemescapecpy, HP_strlib_jmemescapecpy) }, @@ -2912,7 +2912,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(strlib->safestrnlen_, HP_strlib_safestrnlen_) }, { HP_POP(strlib->strline_, HP_strlib_strline_) }, { HP_POP(strlib->bin2hex_, HP_strlib_bin2hex_) }, -/* sv */ +/* sv_interface */ { HP_POP(sv->parse_next, HP_sv_parse_next) }, { HP_POP(sv->parse, HP_sv_parse) }, { HP_POP(sv->split, HP_sv_split) }, @@ -2920,7 +2920,7 @@ struct HookingPointData HookingPoints[] = { { 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 */ +/* sysinfo_interface */ { HP_POP(sysinfo->getpagesize, HP_sysinfo_getpagesize) }, { HP_POP(sysinfo->platform, HP_sysinfo_platform) }, { HP_POP(sysinfo->osversion, HP_sysinfo_osversion) }, @@ -2939,7 +2939,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sysinfo->is_superuser, HP_sysinfo_is_superuser) }, { HP_POP(sysinfo->init, HP_sysinfo_init) }, { HP_POP(sysinfo->final, HP_sysinfo_final) }, -/* timer */ +/* timer_interface */ { HP_POP(timer->gettick, HP_timer_gettick) }, { HP_POP(timer->gettick_nocache, HP_timer_gettick_nocache) }, { HP_POP(timer->add, HP_timer_add) }, @@ -2953,7 +2953,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(timer->perform, HP_timer_perform) }, { HP_POP(timer->init, HP_timer_init) }, { HP_POP(timer->final, HP_timer_final) }, -/* trade */ +/* trade_interface */ { HP_POP(trade->request, HP_trade_request) }, { HP_POP(trade->ack, HP_trade_ack) }, { HP_POP(trade->check_impossible, HP_trade_check_impossible) }, @@ -2963,7 +2963,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(trade->ok, HP_trade_ok) }, { HP_POP(trade->cancel, HP_trade_cancel) }, { HP_POP(trade->commit, HP_trade_commit) }, -/* unit */ +/* unit_interface */ { HP_POP(unit->init, HP_unit_init) }, { HP_POP(unit->final, HP_unit_final) }, { HP_POP(unit->bl2ud, HP_unit_bl2ud) }, @@ -3012,7 +3012,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(unit->remove_map_pc, HP_unit_remove_map_pc) }, { HP_POP(unit->free_pc, HP_unit_free_pc) }, { HP_POP(unit->free, HP_unit_free) }, -/* vending */ +/* vending_interface */ { HP_POP(vending->init, HP_vending_init) }, { HP_POP(vending->final, HP_vending_final) }, { HP_POP(vending->close, HP_vending_close) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 71ced808b..fa7b192c6 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -23,7 +23,7 @@ * as it will get overwritten. */ -/* HCache */ +/* HCache_interface */ void HP_HCache_init(void) { int hIndex = 0; if( HPMHooks.count.HP_HCache_init_pre ) { @@ -104,7 +104,7 @@ FILE* HP_HCache_open(const char *file, const char *opt) { } return retVal___; } -/* atcommand */ +/* atcommand_interface */ void HP_atcommand_init(bool minimal) { int hIndex = 0; if( HPMHooks.count.HP_atcommand_init_pre ) { @@ -1077,7 +1077,7 @@ const char* HP_atcommand_msgsd(struct map_session_data *sd, int msg_number) { } return retVal___; } -/* battle */ +/* battle_interface */ void HP_battle_init(bool minimal) { int hIndex = 0; if( HPMHooks.count.HP_battle_init_pre ) { @@ -2580,7 +2580,7 @@ void HP_battle_calc_misc_attack_unknown(struct block_list *src, struct block_lis } return; } -/* bg */ +/* battleground_interface */ void HP_bg_init(bool minimal) { int hIndex = 0; if( HPMHooks.count.HP_bg_init_pre ) { @@ -3419,7 +3419,7 @@ void HP_bg_config_read(void) { } return; } -/* buyingstore */ +/* buyingstore_interface */ bool HP_buyingstore_setup(struct map_session_data *sd, unsigned char slots) { int hIndex = 0; bool retVal___ = false; @@ -3632,7 +3632,7 @@ unsigned int HP_buyingstore_getuid(void) { } return retVal___; } -/* channel */ +/* channel_interface */ int HP_channel_init(bool minimal) { int hIndex = 0; int retVal___ = 0; @@ -4185,7 +4185,7 @@ void HP_channel_config_read(void) { } return; } -/* chat */ +/* chat_interface */ bool HP_chat_create_pc_chat(struct map_session_data *sd, const char *title, const char *pass, int limit, bool pub) { int hIndex = 0; bool retVal___ = false; @@ -4537,7 +4537,7 @@ struct chat_data* HP_chat_create(struct block_list *bl, const char *title, const } return retVal___; } -/* chrif */ +/* chrif_interface */ void HP_chrif_init(bool minimal) { int hIndex = 0; if( HPMHooks.count.HP_chrif_init_pre ) { @@ -6416,7 +6416,7 @@ void HP_chrif_del_scdata_single(int account_id, int char_id, short type) { } return; } -/* clif */ +/* clif_interface */ int HP_clif_init(bool minimal) { int hIndex = 0; int retVal___ = 0; @@ -24172,7 +24172,7 @@ const char* HP_clif_get_bl_name(const struct block_list *bl) { } return retVal___; } -/* cmdline */ +/* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; if( HPMHooks.count.HP_cmdline_init_pre ) { @@ -24333,7 +24333,7 @@ const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { } return retVal___; } -/* console */ +/* console_interface */ void HP_console_init(void) { int hIndex = 0; if( HPMHooks.count.HP_console_init_pre ) { @@ -24438,7 +24438,7 @@ void HP_console_display_gplnotice(void) { } return; } -/* core */ +/* core_interface */ void HP_core_shutdown_callback(void) { int hIndex = 0; if( HPMHooks.count.HP_core_shutdown_callback_pre ) { @@ -24465,7 +24465,7 @@ void HP_core_shutdown_callback(void) { } return; } -/* DB */ +/* db_interface */ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { int hIndex = 0; enum DBOptions retVal___ = DB_OPT_BASE; @@ -24985,7 +24985,7 @@ void HP_DB_final(void) { } return; } -/* duel */ +/* duel_interface */ int HP_duel_create(struct map_session_data *sd, const unsigned int maxpl) { int hIndex = 0; int retVal___ = 0; @@ -25222,7 +25222,7 @@ void HP_duel_final(void) { } return; } -/* elemental */ +/* elemental_interface */ int HP_elemental_init(bool minimal) { int hIndex = 0; int retVal___ = 0; @@ -26094,7 +26094,7 @@ int HP_elemental_read_db(void) { } return retVal___; } -/* guild */ +/* guild_interface */ void HP_guild_init(bool minimal) { int hIndex = 0; if( HPMHooks.count.HP_guild_init_pre ) { @@ -28455,7 +28455,7 @@ void HP_guild_castle_reconnect_sub(void *key, void *data, va_list ap) { } return; } -/* gstorage */ +/* guild_storage_interface */ struct guild_storage* HP_gstorage_ensure(int guild_id) { int hIndex = 0; struct guild_storage* retVal___ = NULL; @@ -28893,7 +28893,7 @@ struct DBData HP_gstorage_create(union DBKey key, va_list args) { } return retVal___; } -/* homun */ +/* homunculus_interface */ void HP_homun_init(bool minimal) { int hIndex = 0; if( HPMHooks.count.HP_homun_init_pre ) { @@ -30146,7 +30146,7 @@ int8 HP_homun_get_intimacy_grade(struct homun_data *hd) { } return retVal___; } -/* instance */ +/* instance_interface */ void HP_instance_init(bool minimal) { int hIndex = 0; if( HPMHooks.count.HP_instance_init_pre ) { @@ -30636,7 +30636,7 @@ int HP_instance_destroy_timer(int tid, int64 tick, int id, intptr_t data) { } return retVal___; } -/* intif */ +/* intif_interface */ int HP_intif_parse(int fd) { int hIndex = 0; int retVal___ = 0; @@ -34116,7 +34116,7 @@ void HP_intif_pDeleteHomunculusOk(int fd) { } return; } -/* ircbot */ +/* irc_bot_interface */ void HP_ircbot_init(bool minimal) { int hIndex = 0; if( HPMHooks.count.HP_ircbot_init_pre ) { @@ -34538,7 +34538,7 @@ void HP_ircbot_usernick(int fd, char *cmd, char *source, char *target, char *msg } return; } -/* itemdb */ +/* itemdb_interface */ void HP_itemdb_init(bool minimal) { int hIndex = 0; if( HPMHooks.count.HP_itemdb_init_pre ) { @@ -36132,7 +36132,7 @@ bool HP_itemdb_lookup_const(const struct config_setting_t *it, const char *name, } return retVal___; } -/* libconfig */ +/* libconfig_interface */ int HP_libconfig_read(struct config_t *config, FILE *stream) { int hIndex = 0; int retVal___ = 0; @@ -37959,7 +37959,7 @@ int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char } return retVal___; } -/* logs */ +/* log_interface */ void HP_logs_pick_pc(struct map_session_data *sd, e_log_pick_type type, int amount, struct item *itm, struct item_data *data) { int hIndex = 0; if( HPMHooks.count.HP_logs_pick_pc_pre ) { @@ -38536,7 +38536,7 @@ bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_dat } return retVal___; } -/* mail */ +/* mail_interface */ void HP_mail_clear(struct map_session_data *sd) { int hIndex = 0; if( HPMHooks.count.HP_mail_clear_pre ) { @@ -38777,7 +38777,7 @@ bool HP_mail_invalid_operation(struct map_session_data *sd) { } return retVal___; } -/* iMalloc */ +/* malloc_interface */ void HP_iMalloc_init(void) { int hIndex = 0; if( HPMHooks.count.HP_iMalloc_init_pre ) { @@ -39150,7 +39150,7 @@ void HP_iMalloc_init_messages(void) { } return; } -/* map */ +/* map_interface */ void HP_map_zone_init(void) { int hIndex = 0; if( HPMHooks.count.HP_map_zone_init_pre ) { @@ -42855,7 +42855,7 @@ void HP_map_zone_clear_single(struct map_zone_data *zone) { } return; } -/* mapindex */ +/* mapindex_interface */ int HP_mapindex_init(void) { int hIndex = 0; int retVal___ = 0; @@ -43097,7 +43097,7 @@ bool HP_mapindex_check_default(void) { } return retVal___; } -/* mapit */ +/* mapit_interface */ struct s_mapiterator* HP_mapit_alloc(enum e_mapitflags flags, enum bl_type types) { int hIndex = 0; struct s_mapiterator* retVal___ = NULL; @@ -43286,7 +43286,7 @@ bool HP_mapit_exists(struct s_mapiterator *iter) { } return retVal___; } -/* mapreg */ +/* mapreg_interface */ void HP_mapreg_init(void) { int hIndex = 0; if( HPMHooks.count.HP_mapreg_init_pre ) { @@ -43612,7 +43612,7 @@ bool HP_mapreg_config_read(const char *w1, const char *w2) { } return retVal___; } -/* mercenary */ +/* mercenary_interface */ void HP_mercenary_init(bool minimal) { int hIndex = 0; if( HPMHooks.count.HP_mercenary_init_pre ) { @@ -44285,7 +44285,7 @@ bool HP_mercenary_read_skill_db_sub(char *str[], int columns, int current) { } return retVal___; } -/* mob */ +/* mob_interface */ int HP_mob_init(bool mimimal) { int hIndex = 0; int retVal___ = 0; @@ -47137,7 +47137,7 @@ void HP_mob_destroy_mob_db(int index) { } return; } -/* npc_chat */ +/* npc_chat_interface */ int HP_npc_chat_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; @@ -47381,7 +47381,7 @@ void HP_npc_chat_finalize_pcrematch_entry(struct pcrematch_entry *e) { } return; } -/* npc */ +/* npc_interface */ int HP_npc_init(bool minimal) { int hIndex = 0; int retVal___ = 0; @@ -50390,7 +50390,7 @@ int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) { } return retVal___; } -/* nullpo */ +/* nullpo_interface */ void HP_nullpo_assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) { int hIndex = 0; if( HPMHooks.count.HP_nullpo_assert_report_pre ) { @@ -50417,7 +50417,7 @@ void HP_nullpo_assert_report(const char *file, int line, const char *func, const } return; } -/* party */ +/* party_interface */ void HP_party_init(bool minimal) { int hIndex = 0; if( HPMHooks.count.HP_party_init_pre ) { @@ -51750,7 +51750,7 @@ int HP_party_db_final(union DBKey key, struct DBData *data, va_list ap) { } return retVal___; } -/* path */ +/* path_interface */ int HP_path_blownpos(struct block_list *bl, int16 m, int16 x0, int16 y0, int16 dx, int16 dy, int count) { int hIndex = 0; int retVal___ = 0; @@ -51940,7 +51940,7 @@ int HP_path_distance_client(int dx, int dy) { } return retVal___; } -/* pcg */ +/* pc_groups_interface */ void HP_pcg_init(void) { int hIndex = 0; if( HPMHooks.count.HP_pcg_init_pre ) { @@ -52235,7 +52235,7 @@ int HP_pcg_get_idx(GroupSettings *group) { } return retVal___; } -/* pc */ +/* pc_interface */ void HP_pc_init(bool minimal) { int hIndex = 0; if( HPMHooks.count.HP_pc_init_pre ) { @@ -58079,7 +58079,7 @@ int HP_pc_have_magnifier(struct map_session_data *sd) { } return retVal___; } -/* libpcre */ +/* pcre_interface */ pcre* HP_libpcre_compile(const char *pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr) { int hIndex = 0; pcre* retVal___ = NULL; @@ -58294,7 +58294,7 @@ int HP_libpcre_get_substring(const char *subject, int *ovector, int stringcount, } return retVal___; } -/* pet */ +/* pet_interface */ int HP_pet_init(bool minimal) { int hIndex = 0; int retVal___ = 0; @@ -59332,7 +59332,7 @@ int HP_pet_read_db(void) { } return retVal___; } -/* quest */ +/* quest_interface */ void HP_quest_init(bool minimal) { int hIndex = 0; if( HPMHooks.count.HP_quest_init_pre ) { @@ -59739,7 +59739,7 @@ struct quest_db* HP_quest_read_db_sub(struct config_setting_t *cs, int n, const } return retVal___; } -/* script */ +/* script_interface */ void HP_script_init(bool minimal) { int hIndex = 0; if( HPMHooks.count.HP_script_init_pre ) { @@ -64375,7 +64375,7 @@ void HP_script_run_item_unequip_script(struct map_session_data *sd, struct item_ } return; } -/* searchstore */ +/* searchstore_interface */ bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigned short effect) { int hIndex = 0; bool retVal___ = false; @@ -64640,7 +64640,7 @@ bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, i } return retVal___; } -/* showmsg */ +/* showmsg_interface */ void HP_showmsg_init(void) { int hIndex = 0; if( HPMHooks.count.HP_showmsg_init_pre ) { @@ -64752,7 +64752,7 @@ int HP_showmsg_showMessageV(const char *string, va_list ap) { } return retVal___; } -/* skill */ +/* skill_interface */ int HP_skill_init(bool minimal) { int hIndex = 0; int retVal___ = 0; @@ -70726,7 +70726,7 @@ void HP_skill_get_requirement_unknown(struct status_change *sc, struct map_sessi } return; } -/* sockt */ +/* socket_interface */ void HP_sockt_init(void) { int hIndex = 0; if( HPMHooks.count.HP_sockt_init_pre ) { @@ -71473,7 +71473,7 @@ void HP_sockt_net_config_read(const char *filename) { } return; } -/* SQL */ +/* sql_interface */ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db) { int hIndex = 0; int retVal___ = 0; @@ -72344,7 +72344,7 @@ void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const u } return; } -/* status */ +/* status_interface */ int HP_status_init(bool minimal) { int hIndex = 0; int retVal___ = 0; @@ -75365,7 +75365,7 @@ void HP_status_read_job_db_sub(int idx, const char *name, struct config_setting_ } return; } -/* storage */ +/* storage_interface */ void HP_storage_reconnect(void) { int hIndex = 0; if( HPMHooks.count.HP_storage_reconnect_pre ) { @@ -75719,7 +75719,7 @@ int HP_storage_reconnect_sub(union DBKey key, struct DBData *data, va_list ap) { } return retVal___; } -/* StrBuf */ +/* stringbuf_interface */ StringBuf* HP_StrBuf_Malloc(void) { int hIndex = 0; StringBuf* retVal___ = NULL; @@ -75992,7 +75992,7 @@ void HP_StrBuf_Free(StringBuf *self) { } return; } -/* strlib */ +/* strlib_interface */ char* HP_strlib_jstrescape(char *pt) { int hIndex = 0; char* retVal___ = NULL; @@ -76371,11 +76371,11 @@ int HP_strlib_strline_(const char *str, size_t pos) { } return retVal___; } -bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { +bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count) { int hIndex = 0; bool retVal___ = false; if( HPMHooks.count.HP_strlib_bin2hex__pre ) { - bool (*preHookFunc) (char *output, unsigned char *input, size_t *count); + bool (*preHookFunc) (char *output, const unsigned char *input, size_t *count); *HPMforce_return = false; for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++ ) { preHookFunc = HPMHooks.list.HP_strlib_bin2hex__pre[hIndex].func; @@ -76390,7 +76390,7 @@ bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { retVal___ = HPMHooks.source.strlib.bin2hex_(output, input, count); } if( HPMHooks.count.HP_strlib_bin2hex__post ) { - bool (*postHookFunc) (bool retVal___, char *output, unsigned char *input, size_t *count); + bool (*postHookFunc) (bool retVal___, char *output, const unsigned char *input, size_t *count); for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++ ) { postHookFunc = HPMHooks.list.HP_strlib_bin2hex__post[hIndex].func; retVal___ = postHookFunc(retVal___, output, input, &count); @@ -76398,7 +76398,7 @@ bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { } return retVal___; } -/* sv */ +/* sv_interface */ int HP_sv_parse_next(struct s_svstate *svstate) { int hIndex = 0; int retVal___ = 0; @@ -76588,7 +76588,7 @@ bool HP_sv_readdb(const char *directory, const char *filename, char delim, int m } return retVal___; } -/* sysinfo */ +/* sysinfo_interface */ int HP_sysinfo_getpagesize(void) { int hIndex = 0; int retVal___ = 0; @@ -77072,7 +77072,7 @@ void HP_sysinfo_final(void) { } return; } -/* timer */ +/* timer_interface */ int64 HP_timer_gettick(void) { int hIndex = 0; int64 retVal___ = 0; @@ -77422,7 +77422,7 @@ void HP_timer_final(void) { } return; } -/* trade */ +/* trade_interface */ void HP_trade_request(struct map_session_data *sd, struct map_session_data *target_sd) { int hIndex = 0; if( HPMHooks.count.HP_trade_request_pre ) { @@ -77659,7 +77659,7 @@ void HP_trade_commit(struct map_session_data *sd) { } return; } -/* unit */ +/* unit_interface */ int HP_unit_init(bool minimal) { int hIndex = 0; int retVal___ = 0; @@ -78950,7 +78950,7 @@ int HP_unit_free(struct block_list *bl, clr_type clrtype) { } return retVal___; } -/* vending */ +/* vending_interface */ void HP_vending_init(bool minimal) { int hIndex = 0; if( HPMHooks.count.HP_vending_init_pre ) { diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index 3fe38b6bc..c3baa2f30 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -1,7 +1,7 @@ # This file is part of Hercules. # http://herc.ws - http://github.com/HerculesWS/Hercules # -# Copyright (C) 2013-2015 Hercules Dev Team +# Copyright (C) 2013-2016 Hercules Dev Team # # Hercules is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -46,6 +46,7 @@ ALLPLUGINS = $(filter-out HPMHooking, $(basename $(wildcard *.c))) $(HPMHOOKING) PLUGINS = sample db2sql HPMHooking_char HPMHooking_login HPMHooking_map $(MYPLUGINS) COMMON_D = ../common +# Includes private headers (plugins might need them) COMMON_H = $(wildcard $(COMMON_D)/*.h) COMMON_INCLUDE = -I.. |