diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2015-08-11 15:32:15 +0200 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2015-08-11 15:32:15 +0200 |
commit | f9cc60831717b91b5ab72c03283ce23f6bfd5317 (patch) | |
tree | 09f9536abe1ad66648de971001f59fb3a65352fe /src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | |
parent | 49211f9ea1ef985fd6c84cdf902b35dbb8d779a6 (diff) | |
download | hercules-f9cc60831717b91b5ab72c03283ce23f6bfd5317.tar.gz hercules-f9cc60831717b91b5ab72c03283ce23f6bfd5317.tar.bz2 hercules-f9cc60831717b91b5ab72c03283ce23f6bfd5317.tar.xz hercules-f9cc60831717b91b5ab72c03283ce23f6bfd5317.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_login.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | 49 |
1 files changed, 11 insertions, 38 deletions
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 ) { |