diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-11-15 17:51:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-12-12 21:18:05 +0300 |
commit | 5964302e6cd5a8cceda5b7fd3cb85f8081815d7d (patch) | |
tree | 3b03e9daec8e84df2127a271c799a8ecaea23380 /src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | |
parent | 175de7f89d615491f2aa3a2d6bdd3f08bb24ae49 (diff) | |
download | hercules-5964302e6cd5a8cceda5b7fd3cb85f8081815d7d.tar.gz hercules-5964302e6cd5a8cceda5b7fd3cb85f8081815d7d.tar.bz2 hercules-5964302e6cd5a8cceda5b7fd3cb85f8081815d7d.tar.xz hercules-5964302e6cd5a8cceda5b7fd3cb85f8081815d7d.zip |
Update HPM.
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_login.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc index c4359a2ad..f556c621d 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc @@ -2409,6 +2409,60 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN_OTP(int fd, struct login_sess } return retVal___; } +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre > 0) { + 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_ACK_MOBILE_OTP_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_ACK_MOBILE_OTP(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post > 0) { + 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_ACK_MOBILE_OTP_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_OTP_CODE(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_pre > 0) { + 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_OTP_CODE_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_OTP_CODE_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_OTP_CODE(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_post > 0) { + 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_OTP_CODE_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_OTP_CODE_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; @@ -5521,6 +5575,32 @@ bool HP_login_client_login_otp(int fd, struct login_session_data *sd) { } return retVal___; } +void HP_login_client_login_mobile_otp_request(int fd, struct login_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_login_client_login_mobile_otp_request_pre > 0) { + void (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_mobile_otp_request_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_client_login_mobile_otp_request_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.client_login_mobile_otp_request(fd, sd); + } + if (HPMHooks.count.HP_login_client_login_mobile_otp_request_post > 0) { + void (*postHookFunc) (int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_mobile_otp_request_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_client_login_mobile_otp_request_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 > 0) { |