diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/HPMDataCheck.h | 1 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc | 12 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc | 3 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | 49 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc | 12 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc | 3 | ||||
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | 49 |
7 files changed, 33 insertions, 96 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h index a27dbeb07..584cab5c9 100644 --- a/src/common/HPMDataCheck.h +++ b/src/common/HPMDataCheck.h @@ -187,6 +187,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { #endif // COMMON_NULLPO_H #ifdef COMMON_SOCKET_H { "hSockOpt", sizeof(struct hSockOpt), SERVER_TYPE_ALL }, + { "s_subnet", sizeof(struct s_subnet), SERVER_TYPE_ALL }, { "socket_data", sizeof(struct socket_data), SERVER_TYPE_ALL }, { "socket_interface", sizeof(struct socket_interface), SERVER_TYPE_ALL }, #else diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc index 09d6ce1b6..bcda4332d 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc @@ -219,8 +219,8 @@ struct { struct HPMHookPoint *HP_chr_search_mapserver_post; struct HPMHookPoint *HP_chr_mapif_init_pre; struct HPMHookPoint *HP_chr_mapif_init_post; - struct HPMHookPoint *HP_chr_lan_subnetcheck_pre; - struct HPMHookPoint *HP_chr_lan_subnetcheck_post; + struct HPMHookPoint *HP_chr_lan_subnet_check_pre; + struct HPMHookPoint *HP_chr_lan_subnet_check_post; struct HPMHookPoint *HP_chr_delete2_ack_pre; struct HPMHookPoint *HP_chr_delete2_ack_post; struct HPMHookPoint *HP_chr_delete2_accept_actual_ack_pre; @@ -317,8 +317,6 @@ struct { struct HPMHookPoint *HP_chr_online_data_cleanup_sub_post; struct HPMHookPoint *HP_chr_online_data_cleanup_pre; struct HPMHookPoint *HP_chr_online_data_cleanup_post; - struct HPMHookPoint *HP_chr_lan_config_read_pre; - struct HPMHookPoint *HP_chr_lan_config_read_post; struct HPMHookPoint *HP_chr_sql_config_read_pre; struct HPMHookPoint *HP_chr_sql_config_read_post; struct HPMHookPoint *HP_chr_config_dispatch_pre; @@ -1118,8 +1116,8 @@ struct { int HP_chr_search_mapserver_post; int HP_chr_mapif_init_pre; int HP_chr_mapif_init_post; - int HP_chr_lan_subnetcheck_pre; - int HP_chr_lan_subnetcheck_post; + int HP_chr_lan_subnet_check_pre; + int HP_chr_lan_subnet_check_post; int HP_chr_delete2_ack_pre; int HP_chr_delete2_ack_post; int HP_chr_delete2_accept_actual_ack_pre; @@ -1216,8 +1214,6 @@ struct { int HP_chr_online_data_cleanup_sub_post; int HP_chr_online_data_cleanup_pre; int HP_chr_online_data_cleanup_post; - int HP_chr_lan_config_read_pre; - int HP_chr_lan_config_read_post; int HP_chr_sql_config_read_pre; int HP_chr_sql_config_read_post; int HP_chr_config_dispatch_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc index 631544248..b11149cf1 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc @@ -113,7 +113,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chr->parse_frommap, HP_chr_parse_frommap) }, { HP_POP(chr->search_mapserver, HP_chr_search_mapserver) }, { HP_POP(chr->mapif_init, HP_chr_mapif_init) }, - { HP_POP(chr->lan_subnetcheck, HP_chr_lan_subnetcheck) }, + { HP_POP(chr->lan_subnet_check, HP_chr_lan_subnet_check) }, { HP_POP(chr->delete2_ack, HP_chr_delete2_ack) }, { HP_POP(chr->delete2_accept_actual_ack, HP_chr_delete2_accept_actual_ack) }, { HP_POP(chr->delete2_accept_ack, HP_chr_delete2_accept_ack) }, @@ -162,7 +162,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chr->check_connect_login_server, HP_chr_check_connect_login_server) }, { HP_POP(chr->online_data_cleanup_sub, HP_chr_online_data_cleanup_sub) }, { HP_POP(chr->online_data_cleanup, HP_chr_online_data_cleanup) }, - { HP_POP(chr->lan_config_read, HP_chr_lan_config_read) }, { 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) }, diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index c6cca0b0c..f8d01cb28 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -2847,14 +2847,14 @@ int HP_chr_mapif_init(int fd) { } return retVal___; } -int HP_chr_lan_subnetcheck(uint32 ip) { +uint32 HP_chr_lan_subnet_check(uint32 ip) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_chr_lan_subnetcheck_pre ) { - int (*preHookFunc) (uint32 *ip); + uint32 retVal___ = 0; + if( HPMHooks.count.HP_chr_lan_subnet_check_pre ) { + uint32 (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_subnetcheck_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_chr_lan_subnetcheck_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_subnet_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_chr_lan_subnet_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } if( *HPMforce_return ) { @@ -2863,12 +2863,12 @@ int HP_chr_lan_subnetcheck(uint32 ip) { } } { - retVal___ = HPMHooks.source.chr.lan_subnetcheck(ip); + retVal___ = HPMHooks.source.chr.lan_subnet_check(ip); } - if( HPMHooks.count.HP_chr_lan_subnetcheck_post ) { - int (*postHookFunc) (int retVal___, uint32 *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_subnetcheck_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_chr_lan_subnetcheck_post[hIndex].func; + if( HPMHooks.count.HP_chr_lan_subnet_check_post ) { + uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_subnet_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_chr_lan_subnet_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, &ip); } } @@ -4143,33 +4143,6 @@ int HP_chr_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { } return retVal___; } -int HP_chr_lan_config_read(const char *lancfgName) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_chr_lan_config_read_pre ) { - int (*preHookFunc) (const char *lancfgName); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_config_read_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_chr_lan_config_read_pre[hIndex].func; - retVal___ = preHookFunc(lancfgName); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.chr.lan_config_read(lancfgName); - } - if( HPMHooks.count.HP_chr_lan_config_read_post ) { - int (*postHookFunc) (int retVal___, const char *lancfgName); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_config_read_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_chr_lan_config_read_post[hIndex].func; - retVal___ = postHookFunc(retVal___, lancfgName); - } - } - return retVal___; -} void HP_chr_sql_config_read(const char *cfgName) { int hIndex = 0; if( HPMHooks.count.HP_chr_sql_config_read_pre ) { diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc index af7e7250c..31cd3d710 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc @@ -29,10 +29,8 @@ struct { struct HPMHookPoint *HP_login_check_encrypted_post; struct HPMHookPoint *HP_login_check_password_pre; struct HPMHookPoint *HP_login_check_password_post; - struct HPMHookPoint *HP_login_lan_subnetcheck_pre; - struct HPMHookPoint *HP_login_lan_subnetcheck_post; - struct HPMHookPoint *HP_login_lan_config_read_pre; - struct HPMHookPoint *HP_login_lan_config_read_post; + struct HPMHookPoint *HP_login_lan_subnet_check_pre; + struct HPMHookPoint *HP_login_lan_subnet_check_post; struct HPMHookPoint *HP_login_fromchar_accinfo_pre; struct HPMHookPoint *HP_login_fromchar_accinfo_post; struct HPMHookPoint *HP_login_fromchar_account_pre; @@ -142,10 +140,8 @@ struct { int HP_login_check_encrypted_post; int HP_login_check_password_pre; int HP_login_check_password_post; - int HP_login_lan_subnetcheck_pre; - int HP_login_lan_subnetcheck_post; - int HP_login_lan_config_read_pre; - int HP_login_lan_config_read_post; + int HP_login_lan_subnet_check_pre; + int HP_login_lan_subnet_check_post; int HP_login_fromchar_accinfo_pre; int HP_login_fromchar_accinfo_post; int HP_login_fromchar_account_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc index a4a9db119..00cdfc8c9 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc @@ -18,8 +18,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(login->sync_ip_addresses, HP_login_sync_ip_addresses) }, { HP_POP(login->check_encrypted, HP_login_check_encrypted) }, { HP_POP(login->check_password, HP_login_check_password) }, - { HP_POP(login->lan_subnetcheck, HP_login_lan_subnetcheck) }, - { HP_POP(login->lan_config_read, HP_login_lan_config_read) }, + { HP_POP(login->lan_subnet_check, HP_login_lan_subnet_check) }, { HP_POP(login->fromchar_accinfo, HP_login_fromchar_accinfo) }, { HP_POP(login->fromchar_account, HP_login_fromchar_account) }, { HP_POP(login->fromchar_account_update_other, HP_login_fromchar_account_update_other) }, diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc index 375b78e11..18195af77 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc @@ -347,14 +347,14 @@ bool HP_login_check_password(const char *md5key, int passwdenc, const char *pass } return retVal___; } -int HP_login_lan_subnetcheck(uint32 ip) { +uint32 HP_login_lan_subnet_check(uint32 ip) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_login_lan_subnetcheck_pre ) { - int (*preHookFunc) (uint32 *ip); + uint32 retVal___ = 0; + if( HPMHooks.count.HP_login_lan_subnet_check_pre ) { + uint32 (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnetcheck_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_lan_subnetcheck_pre[hIndex].func; + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnet_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_login_lan_subnet_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } if( *HPMforce_return ) { @@ -363,44 +363,17 @@ int HP_login_lan_subnetcheck(uint32 ip) { } } { - retVal___ = HPMHooks.source.login.lan_subnetcheck(ip); + retVal___ = HPMHooks.source.login.lan_subnet_check(ip); } - if( HPMHooks.count.HP_login_lan_subnetcheck_post ) { - int (*postHookFunc) (int retVal___, uint32 *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnetcheck_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_lan_subnetcheck_post[hIndex].func; + if( HPMHooks.count.HP_login_lan_subnet_check_post ) { + uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip); + for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnet_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_login_lan_subnet_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, &ip); } } return retVal___; } -int HP_login_lan_config_read(const char *lancfgName) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_login_lan_config_read_pre ) { - int (*preHookFunc) (const char *lancfgName); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_config_read_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_lan_config_read_pre[hIndex].func; - retVal___ = preHookFunc(lancfgName); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.login.lan_config_read(lancfgName); - } - if( HPMHooks.count.HP_login_lan_config_read_post ) { - int (*postHookFunc) (int retVal___, const char *lancfgName); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_config_read_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_lan_config_read_post[hIndex].func; - retVal___ = postHookFunc(retVal___, lancfgName); - } - } - return retVal___; -} void HP_login_fromchar_accinfo(int fd, int account_id, int u_fd, int u_aid, int u_group, int map_fd, struct mmo_account *acc) { int hIndex = 0; if( HPMHooks.count.HP_login_fromchar_accinfo_pre ) { |