summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/HPMDataCheck.h17
-rw-r--r--src/common/HPMSymbols.inc.h28
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc86
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc160
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc43
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc1045
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.sources.inc4
7 files changed, 1383 insertions, 0 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index f2812a275..fe4745e79 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -309,11 +309,20 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#ifdef LOGIN_ACCOUNT_H
{ "Account_engine", sizeof(struct Account_engine), SERVER_TYPE_LOGIN },
{ "AccountDB", sizeof(struct AccountDB), SERVER_TYPE_LOGIN },
+ { "AccountDB_SQL", sizeof(struct AccountDB_SQL), SERVER_TYPE_LOGIN },
{ "AccountDBIterator", sizeof(struct AccountDBIterator), SERVER_TYPE_LOGIN },
+ { "AccountDBIterator_SQL", sizeof(struct AccountDBIterator_SQL), SERVER_TYPE_LOGIN },
+ { "account_interface", sizeof(struct account_interface), SERVER_TYPE_LOGIN },
{ "mmo_account", sizeof(struct mmo_account), SERVER_TYPE_LOGIN },
#else
#define LOGIN_ACCOUNT_H
#endif // LOGIN_ACCOUNT_H
+ #ifdef LOGIN_IPBAN_H
+ { "ipban_interface", sizeof(struct ipban_interface), SERVER_TYPE_LOGIN },
+ { "s_ipban_dbs", sizeof(struct s_ipban_dbs), SERVER_TYPE_LOGIN },
+ #else
+ #define LOGIN_IPBAN_H
+ #endif // LOGIN_IPBAN_H
#ifdef LOGIN_LCLIF_H
{ "lclif_interface", sizeof(struct lclif_interface), SERVER_TYPE_LOGIN },
{ "login_packet_db", sizeof(struct login_packet_db), SERVER_TYPE_LOGIN },
@@ -341,14 +350,22 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#else
#define LOGIN_LCLIF_P_H
#endif // LOGIN_LCLIF_P_H
+ #ifdef LOGIN_LOGINLOG_H
+ { "loginlog_interface", sizeof(struct loginlog_interface), SERVER_TYPE_LOGIN },
+ { "s_loginlog_dbs", sizeof(struct s_loginlog_dbs), SERVER_TYPE_LOGIN },
+ #else
+ #define LOGIN_LOGINLOG_H
+ #endif // LOGIN_LOGINLOG_H
#ifdef LOGIN_LOGIN_H
{ "Login_Config", sizeof(struct Login_Config), SERVER_TYPE_LOGIN },
{ "client_hash_node", sizeof(struct client_hash_node), SERVER_TYPE_LOGIN },
+ { "lchrif_interface", sizeof(struct lchrif_interface), SERVER_TYPE_LOGIN },
{ "login_auth_node", sizeof(struct login_auth_node), SERVER_TYPE_LOGIN },
{ "login_interface", sizeof(struct login_interface), SERVER_TYPE_LOGIN },
{ "login_session_data", sizeof(struct login_session_data), SERVER_TYPE_LOGIN },
{ "mmo_char_server", sizeof(struct mmo_char_server), SERVER_TYPE_LOGIN },
{ "online_login_data", sizeof(struct online_login_data), SERVER_TYPE_LOGIN },
+ { "s_login_dbs", sizeof(struct s_login_dbs), SERVER_TYPE_LOGIN },
#else
#define LOGIN_LOGIN_H
#endif // LOGIN_LOGIN_H
diff --git a/src/common/HPMSymbols.inc.h b/src/common/HPMSymbols.inc.h
index 6be9d547c..70de5cdef 100644
--- a/src/common/HPMSymbols.inc.h
+++ b/src/common/HPMSymbols.inc.h
@@ -29,6 +29,9 @@
#ifdef COMMON_UTILS_H /* HCache */
struct HCache_interface *HCache;
#endif // COMMON_UTILS_H
+#ifdef LOGIN_ACCOUNT_H /* account */
+struct account_interface *account;
+#endif // LOGIN_ACCOUNT_H
#ifdef MAP_ATCOMMAND_H /* atcommand */
struct atcommand_interface *atcommand;
#endif // MAP_ATCOMMAND_H
@@ -140,12 +143,18 @@ struct inter_storage_interface *inter_storage;
#ifdef MAP_INTIF_H /* intif */
struct intif_interface *intif;
#endif // MAP_INTIF_H
+#ifdef LOGIN_IPBAN_H /* ipban */
+struct ipban_interface *ipban;
+#endif // LOGIN_IPBAN_H
#ifdef MAP_IRC_BOT_H /* ircbot */
struct irc_bot_interface *ircbot;
#endif // MAP_IRC_BOT_H
#ifdef MAP_ITEMDB_H /* itemdb */
struct itemdb_interface *itemdb;
#endif // MAP_ITEMDB_H
+#ifdef LOGIN_LOGIN_H /* lchrif */
+struct lchrif_interface *lchrif;
+#endif // LOGIN_LOGIN_H
#ifdef LOGIN_LCLIF_H /* lclif */
struct lclif_interface *lclif;
#endif // LOGIN_LCLIF_H
@@ -161,6 +170,9 @@ struct login_interface *login;
#ifdef CHAR_LOGINIF_H /* loginif */
struct loginif_interface *loginif;
#endif // CHAR_LOGINIF_H
+#ifdef LOGIN_LOGINLOG_H /* loginlog */
+struct loginlog_interface *loginlog;
+#endif // LOGIN_LOGINLOG_H
#ifdef MAP_MAIL_H /* mail */
struct mail_interface *mail;
#endif // MAP_MAIL_H
@@ -289,6 +301,10 @@ HPExport const char *HPM_shared_symbols(int server_type)
if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("HCache", HCache))
return "HCache";
#endif // COMMON_UTILS_H
+#ifdef LOGIN_ACCOUNT_H /* account */
+ if ((server_type&(SERVER_TYPE_LOGIN)) != 0 && !HPM_SYMBOL("account", account))
+ return "account";
+#endif // LOGIN_ACCOUNT_H
#ifdef MAP_ATCOMMAND_H /* atcommand */
if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("atcommand", atcommand))
return "atcommand";
@@ -437,6 +453,10 @@ HPExport const char *HPM_shared_symbols(int server_type)
if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("intif", intif))
return "intif";
#endif // MAP_INTIF_H
+#ifdef LOGIN_IPBAN_H /* ipban */
+ if ((server_type&(SERVER_TYPE_LOGIN)) != 0 && !HPM_SYMBOL("ipban", ipban))
+ return "ipban";
+#endif // LOGIN_IPBAN_H
#ifdef MAP_IRC_BOT_H /* ircbot */
if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("ircbot", ircbot))
return "ircbot";
@@ -445,6 +465,10 @@ HPExport const char *HPM_shared_symbols(int server_type)
if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("itemdb", itemdb))
return "itemdb";
#endif // MAP_ITEMDB_H
+#ifdef LOGIN_LOGIN_H /* lchrif */
+ if ((server_type&(SERVER_TYPE_LOGIN)) != 0 && !HPM_SYMBOL("lchrif", lchrif))
+ return "lchrif";
+#endif // LOGIN_LOGIN_H
#ifdef LOGIN_LCLIF_H /* lclif */
if ((server_type&(SERVER_TYPE_LOGIN)) != 0 && !HPM_SYMBOL("lclif", lclif))
return "lclif";
@@ -465,6 +489,10 @@ HPExport const char *HPM_shared_symbols(int server_type)
if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("loginif", loginif))
return "loginif";
#endif // CHAR_LOGINIF_H
+#ifdef LOGIN_LOGINLOG_H /* loginlog */
+ if ((server_type&(SERVER_TYPE_LOGIN)) != 0 && !HPM_SYMBOL("loginlog", loginlog))
+ return "loginlog";
+#endif // LOGIN_LOGINLOG_H
#ifdef MAP_MAIL_H /* mail */
if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("mail", mail))
return "mail";
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index c293eb1f7..816e1981d 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -33,6 +33,46 @@ typedef bool (*HPMHOOK_post_HCache_check) (bool retVal___, const char *file);
typedef FILE* (*HPMHOOK_pre_HCache_open) (const char **file, const char **opt);
typedef FILE* (*HPMHOOK_post_HCache_open) (FILE* retVal___, const char *file, const char *opt);
#endif // COMMON_UTILS_H
+#ifdef LOGIN_ACCOUNT_H /* account */
+typedef struct Sql* (*HPMHOOK_pre_account_db_sql_up) (AccountDB **self);
+typedef struct Sql* (*HPMHOOK_post_account_db_sql_up) (struct Sql* retVal___, AccountDB *self);
+typedef void (*HPMHOOK_pre_account_mmo_send_accreg2) (AccountDB **self, int *fd, int *account_id, int *char_id);
+typedef void (*HPMHOOK_post_account_mmo_send_accreg2) (AccountDB *self, int fd, int account_id, int char_id);
+typedef void (*HPMHOOK_pre_account_mmo_save_accreg2) (AccountDB **self, int *fd, int *account_id, int *char_id);
+typedef void (*HPMHOOK_post_account_mmo_save_accreg2) (AccountDB *self, int fd, int account_id, int char_id);
+typedef bool (*HPMHOOK_pre_account_mmo_auth_fromsql) (AccountDB_SQL **db, struct mmo_account **acc, int *account_id);
+typedef bool (*HPMHOOK_post_account_mmo_auth_fromsql) (bool retVal___, AccountDB_SQL *db, struct mmo_account *acc, int account_id);
+typedef bool (*HPMHOOK_pre_account_mmo_auth_tosql) (AccountDB_SQL **db, const struct mmo_account **acc, bool *is_new);
+typedef bool (*HPMHOOK_post_account_mmo_auth_tosql) (bool retVal___, AccountDB_SQL *db, const struct mmo_account *acc, bool is_new);
+typedef AccountDB* (*HPMHOOK_pre_account_db_sql) (void);
+typedef AccountDB* (*HPMHOOK_post_account_db_sql) (AccountDB* retVal___);
+typedef bool (*HPMHOOK_pre_account_db_sql_init) (AccountDB **self);
+typedef bool (*HPMHOOK_post_account_db_sql_init) (bool retVal___, AccountDB *self);
+typedef void (*HPMHOOK_pre_account_db_sql_destroy) (AccountDB **self);
+typedef void (*HPMHOOK_post_account_db_sql_destroy) (AccountDB *self);
+typedef bool (*HPMHOOK_pre_account_db_sql_get_property) (AccountDB **self, const char **key, char **buf, size_t *buflen);
+typedef bool (*HPMHOOK_post_account_db_sql_get_property) (bool retVal___, AccountDB *self, const char *key, char *buf, size_t buflen);
+typedef bool (*HPMHOOK_pre_account_db_sql_set_property) (AccountDB **self, struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_account_db_sql_set_property) (bool retVal___, AccountDB *self, struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_account_db_sql_create) (AccountDB **self, struct mmo_account **acc);
+typedef bool (*HPMHOOK_post_account_db_sql_create) (bool retVal___, AccountDB *self, struct mmo_account *acc);
+typedef bool (*HPMHOOK_pre_account_db_sql_remove) (AccountDB **self, const int *account_id);
+typedef bool (*HPMHOOK_post_account_db_sql_remove) (bool retVal___, AccountDB *self, const int account_id);
+typedef bool (*HPMHOOK_pre_account_db_sql_save) (AccountDB **self, const struct mmo_account **acc);
+typedef bool (*HPMHOOK_post_account_db_sql_save) (bool retVal___, AccountDB *self, const struct mmo_account *acc);
+typedef bool (*HPMHOOK_pre_account_db_sql_load_num) (AccountDB **self, struct mmo_account **acc, const int *account_id);
+typedef bool (*HPMHOOK_post_account_db_sql_load_num) (bool retVal___, AccountDB *self, struct mmo_account *acc, const int account_id);
+typedef bool (*HPMHOOK_pre_account_db_sql_load_str) (AccountDB **self, struct mmo_account **acc, const char **userid);
+typedef bool (*HPMHOOK_post_account_db_sql_load_str) (bool retVal___, AccountDB *self, struct mmo_account *acc, const char *userid);
+typedef AccountDBIterator* (*HPMHOOK_pre_account_db_sql_iterator) (AccountDB **self);
+typedef AccountDBIterator* (*HPMHOOK_post_account_db_sql_iterator) (AccountDBIterator* retVal___, AccountDB *self);
+typedef void (*HPMHOOK_pre_account_db_sql_iter_destroy) (AccountDBIterator **self);
+typedef void (*HPMHOOK_post_account_db_sql_iter_destroy) (AccountDBIterator *self);
+typedef bool (*HPMHOOK_pre_account_db_sql_iter_next) (AccountDBIterator **self, struct mmo_account **acc);
+typedef bool (*HPMHOOK_post_account_db_sql_iter_next) (bool retVal___, AccountDBIterator *self, struct mmo_account *acc);
+typedef bool (*HPMHOOK_pre_account_db_read_inter) (AccountDB_SQL **db, const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_account_db_read_inter) (bool retVal___, AccountDB_SQL *db, const char *filename, bool imported);
+#endif // LOGIN_ACCOUNT_H
#ifdef MAP_ATCOMMAND_H /* atcommand */
typedef void (*HPMHOOK_pre_atcommand_init) (bool *minimal);
typedef void (*HPMHOOK_post_atcommand_init) (bool minimal);
@@ -3429,6 +3469,26 @@ typedef void (*HPMHOOK_post_intif_pRodexCheckName) (int fd);
typedef void (*HPMHOOK_pre_intif_pRecvClanMemberAction) (int *fd);
typedef void (*HPMHOOK_post_intif_pRecvClanMemberAction) (int fd);
#endif // MAP_INTIF_H
+#ifdef LOGIN_IPBAN_H /* ipban */
+typedef void (*HPMHOOK_pre_ipban_init) (void);
+typedef void (*HPMHOOK_post_ipban_init) (void);
+typedef void (*HPMHOOK_pre_ipban_final) (void);
+typedef void (*HPMHOOK_post_ipban_final) (void);
+typedef int (*HPMHOOK_pre_ipban_cleanup) (int *tid, int64 *tick, int *id, intptr_t *data);
+typedef int (*HPMHOOK_post_ipban_cleanup) (int retVal___, int tid, int64 tick, int id, intptr_t data);
+typedef bool (*HPMHOOK_pre_ipban_config_read_inter) (const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_ipban_config_read_inter) (bool retVal___, const char *filename, bool imported);
+typedef bool (*HPMHOOK_pre_ipban_config_read_connection) (const char **filename, struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_ipban_config_read_connection) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_ipban_config_read_dynamic) (const char **filename, struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_ipban_config_read_dynamic) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_ipban_config_read) (const char **filename, struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_ipban_config_read) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_ipban_check) (uint32 *ip);
+typedef bool (*HPMHOOK_post_ipban_check) (bool retVal___, uint32 ip);
+typedef void (*HPMHOOK_pre_ipban_log) (uint32 *ip);
+typedef void (*HPMHOOK_post_ipban_log) (uint32 ip);
+#endif // LOGIN_IPBAN_H
#ifdef MAP_IRC_BOT_H /* ircbot */
typedef void (*HPMHOOK_pre_ircbot_init) (bool *minimal);
typedef void (*HPMHOOK_post_ircbot_init) (bool minimal);
@@ -3599,6 +3659,16 @@ typedef bool (*HPMHOOK_post_itemdb_lookup_const) (bool retVal___, const struct c
typedef bool (*HPMHOOK_pre_itemdb_lookup_const_mask) (const struct config_setting_t **it, const char **name, int **value);
typedef bool (*HPMHOOK_post_itemdb_lookup_const_mask) (bool retVal___, const struct config_setting_t *it, const char *name, int *value);
#endif // MAP_ITEMDB_H
+#ifdef LOGIN_LOGIN_H /* lchrif */
+typedef void (*HPMHOOK_pre_lchrif_server_init) (int *id);
+typedef void (*HPMHOOK_post_lchrif_server_init) (int id);
+typedef void (*HPMHOOK_pre_lchrif_server_destroy) (int *id);
+typedef void (*HPMHOOK_post_lchrif_server_destroy) (int id);
+typedef void (*HPMHOOK_pre_lchrif_server_reset) (int *id);
+typedef void (*HPMHOOK_post_lchrif_server_reset) (int id);
+typedef void (*HPMHOOK_pre_lchrif_on_disconnect) (int *id);
+typedef void (*HPMHOOK_post_lchrif_on_disconnect) (int id);
+#endif // LOGIN_LOGIN_H
#ifdef LOGIN_LCLIF_H /* lclif */
typedef void (*HPMHOOK_pre_lclif_init) (void);
typedef void (*HPMHOOK_post_lclif_init) (void);
@@ -3991,6 +4061,22 @@ typedef void (*HPMHOOK_post_loginif_send_users_count) (int users);
typedef void (*HPMHOOK_pre_loginif_connect_to_server) (void);
typedef void (*HPMHOOK_post_loginif_connect_to_server) (void);
#endif // CHAR_LOGINIF_H
+#ifdef LOGIN_LOGINLOG_H /* loginlog */
+typedef unsigned long (*HPMHOOK_pre_loginlog_failedattempts) (uint32 *ip, unsigned int *minutes);
+typedef unsigned long (*HPMHOOK_post_loginlog_failedattempts) (unsigned long retVal___, uint32 ip, unsigned int minutes);
+typedef void (*HPMHOOK_pre_loginlog_log) (uint32 *ip, const char **username, int *rcode, const char **message);
+typedef void (*HPMHOOK_post_loginlog_log) (uint32 ip, const char *username, int rcode, const char *message);
+typedef bool (*HPMHOOK_pre_loginlog_init) (void);
+typedef bool (*HPMHOOK_post_loginlog_init) (bool retVal___);
+typedef bool (*HPMHOOK_pre_loginlog_final) (void);
+typedef bool (*HPMHOOK_post_loginlog_final) (bool retVal___);
+typedef bool (*HPMHOOK_pre_loginlog_config_read_names) (const char **filename, struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_loginlog_config_read_names) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_loginlog_config_read_log) (const char **filename, struct config_t **config, bool *imported);
+typedef bool (*HPMHOOK_post_loginlog_config_read_log) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+typedef bool (*HPMHOOK_pre_loginlog_config_read) (const char **filename, bool *imported);
+typedef bool (*HPMHOOK_post_loginlog_config_read) (bool retVal___, const char *filename, bool imported);
+#endif // LOGIN_LOGINLOG_H
#ifdef MAP_MAIL_H /* mail */
typedef void (*HPMHOOK_pre_mail_clear) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_mail_clear) (struct map_session_data *sd);
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
index f8c270de3..5300ca3a6 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
@@ -32,6 +32,44 @@ struct {
struct HPMHookPoint *HP_HCache_check_post;
struct HPMHookPoint *HP_HCache_open_pre;
struct HPMHookPoint *HP_HCache_open_post;
+ struct HPMHookPoint *HP_account_db_sql_up_pre;
+ struct HPMHookPoint *HP_account_db_sql_up_post;
+ struct HPMHookPoint *HP_account_mmo_send_accreg2_pre;
+ struct HPMHookPoint *HP_account_mmo_send_accreg2_post;
+ struct HPMHookPoint *HP_account_mmo_save_accreg2_pre;
+ struct HPMHookPoint *HP_account_mmo_save_accreg2_post;
+ struct HPMHookPoint *HP_account_mmo_auth_fromsql_pre;
+ struct HPMHookPoint *HP_account_mmo_auth_fromsql_post;
+ struct HPMHookPoint *HP_account_mmo_auth_tosql_pre;
+ struct HPMHookPoint *HP_account_mmo_auth_tosql_post;
+ struct HPMHookPoint *HP_account_db_sql_pre;
+ struct HPMHookPoint *HP_account_db_sql_post;
+ struct HPMHookPoint *HP_account_db_sql_init_pre;
+ struct HPMHookPoint *HP_account_db_sql_init_post;
+ struct HPMHookPoint *HP_account_db_sql_destroy_pre;
+ struct HPMHookPoint *HP_account_db_sql_destroy_post;
+ struct HPMHookPoint *HP_account_db_sql_get_property_pre;
+ struct HPMHookPoint *HP_account_db_sql_get_property_post;
+ struct HPMHookPoint *HP_account_db_sql_set_property_pre;
+ struct HPMHookPoint *HP_account_db_sql_set_property_post;
+ struct HPMHookPoint *HP_account_db_sql_create_pre;
+ struct HPMHookPoint *HP_account_db_sql_create_post;
+ struct HPMHookPoint *HP_account_db_sql_remove_pre;
+ struct HPMHookPoint *HP_account_db_sql_remove_post;
+ struct HPMHookPoint *HP_account_db_sql_save_pre;
+ struct HPMHookPoint *HP_account_db_sql_save_post;
+ struct HPMHookPoint *HP_account_db_sql_load_num_pre;
+ struct HPMHookPoint *HP_account_db_sql_load_num_post;
+ struct HPMHookPoint *HP_account_db_sql_load_str_pre;
+ struct HPMHookPoint *HP_account_db_sql_load_str_post;
+ struct HPMHookPoint *HP_account_db_sql_iterator_pre;
+ struct HPMHookPoint *HP_account_db_sql_iterator_post;
+ struct HPMHookPoint *HP_account_db_sql_iter_destroy_pre;
+ struct HPMHookPoint *HP_account_db_sql_iter_destroy_post;
+ struct HPMHookPoint *HP_account_db_sql_iter_next_pre;
+ struct HPMHookPoint *HP_account_db_sql_iter_next_post;
+ struct HPMHookPoint *HP_account_db_read_inter_pre;
+ struct HPMHookPoint *HP_account_db_read_inter_post;
struct HPMHookPoint *HP_cmdline_init_pre;
struct HPMHookPoint *HP_cmdline_init_post;
struct HPMHookPoint *HP_cmdline_final_pre;
@@ -96,6 +134,32 @@ struct {
struct HPMHookPoint *HP_des_decrypt_block_post;
struct HPMHookPoint *HP_des_decrypt_pre;
struct HPMHookPoint *HP_des_decrypt_post;
+ struct HPMHookPoint *HP_ipban_init_pre;
+ struct HPMHookPoint *HP_ipban_init_post;
+ struct HPMHookPoint *HP_ipban_final_pre;
+ struct HPMHookPoint *HP_ipban_final_post;
+ struct HPMHookPoint *HP_ipban_cleanup_pre;
+ struct HPMHookPoint *HP_ipban_cleanup_post;
+ struct HPMHookPoint *HP_ipban_config_read_inter_pre;
+ struct HPMHookPoint *HP_ipban_config_read_inter_post;
+ struct HPMHookPoint *HP_ipban_config_read_connection_pre;
+ struct HPMHookPoint *HP_ipban_config_read_connection_post;
+ struct HPMHookPoint *HP_ipban_config_read_dynamic_pre;
+ struct HPMHookPoint *HP_ipban_config_read_dynamic_post;
+ struct HPMHookPoint *HP_ipban_config_read_pre;
+ struct HPMHookPoint *HP_ipban_config_read_post;
+ struct HPMHookPoint *HP_ipban_check_pre;
+ struct HPMHookPoint *HP_ipban_check_post;
+ struct HPMHookPoint *HP_ipban_log_pre;
+ struct HPMHookPoint *HP_ipban_log_post;
+ struct HPMHookPoint *HP_lchrif_server_init_pre;
+ struct HPMHookPoint *HP_lchrif_server_init_post;
+ struct HPMHookPoint *HP_lchrif_server_destroy_pre;
+ struct HPMHookPoint *HP_lchrif_server_destroy_post;
+ struct HPMHookPoint *HP_lchrif_server_reset_pre;
+ struct HPMHookPoint *HP_lchrif_server_reset_post;
+ struct HPMHookPoint *HP_lchrif_on_disconnect_pre;
+ struct HPMHookPoint *HP_lchrif_on_disconnect_post;
struct HPMHookPoint *HP_lclif_init_pre;
struct HPMHookPoint *HP_lclif_init_post;
struct HPMHookPoint *HP_lclif_final_pre;
@@ -406,6 +470,20 @@ struct {
struct HPMHookPoint *HP_login_config_set_md5hash_post;
struct HPMHookPoint *HP_login_convert_users_to_colors_pre;
struct HPMHookPoint *HP_login_convert_users_to_colors_post;
+ struct HPMHookPoint *HP_loginlog_failedattempts_pre;
+ struct HPMHookPoint *HP_loginlog_failedattempts_post;
+ struct HPMHookPoint *HP_loginlog_log_pre;
+ struct HPMHookPoint *HP_loginlog_log_post;
+ struct HPMHookPoint *HP_loginlog_init_pre;
+ struct HPMHookPoint *HP_loginlog_init_post;
+ struct HPMHookPoint *HP_loginlog_final_pre;
+ struct HPMHookPoint *HP_loginlog_final_post;
+ struct HPMHookPoint *HP_loginlog_config_read_names_pre;
+ struct HPMHookPoint *HP_loginlog_config_read_names_post;
+ struct HPMHookPoint *HP_loginlog_config_read_log_pre;
+ struct HPMHookPoint *HP_loginlog_config_read_log_post;
+ struct HPMHookPoint *HP_loginlog_config_read_pre;
+ struct HPMHookPoint *HP_loginlog_config_read_post;
struct HPMHookPoint *HP_md5_string_pre;
struct HPMHookPoint *HP_md5_string_post;
struct HPMHookPoint *HP_md5_binary_pre;
@@ -735,6 +813,44 @@ struct {
int HP_HCache_check_post;
int HP_HCache_open_pre;
int HP_HCache_open_post;
+ int HP_account_db_sql_up_pre;
+ int HP_account_db_sql_up_post;
+ int HP_account_mmo_send_accreg2_pre;
+ int HP_account_mmo_send_accreg2_post;
+ int HP_account_mmo_save_accreg2_pre;
+ int HP_account_mmo_save_accreg2_post;
+ int HP_account_mmo_auth_fromsql_pre;
+ int HP_account_mmo_auth_fromsql_post;
+ int HP_account_mmo_auth_tosql_pre;
+ int HP_account_mmo_auth_tosql_post;
+ int HP_account_db_sql_pre;
+ int HP_account_db_sql_post;
+ int HP_account_db_sql_init_pre;
+ int HP_account_db_sql_init_post;
+ int HP_account_db_sql_destroy_pre;
+ int HP_account_db_sql_destroy_post;
+ int HP_account_db_sql_get_property_pre;
+ int HP_account_db_sql_get_property_post;
+ int HP_account_db_sql_set_property_pre;
+ int HP_account_db_sql_set_property_post;
+ int HP_account_db_sql_create_pre;
+ int HP_account_db_sql_create_post;
+ int HP_account_db_sql_remove_pre;
+ int HP_account_db_sql_remove_post;
+ int HP_account_db_sql_save_pre;
+ int HP_account_db_sql_save_post;
+ int HP_account_db_sql_load_num_pre;
+ int HP_account_db_sql_load_num_post;
+ int HP_account_db_sql_load_str_pre;
+ int HP_account_db_sql_load_str_post;
+ int HP_account_db_sql_iterator_pre;
+ int HP_account_db_sql_iterator_post;
+ int HP_account_db_sql_iter_destroy_pre;
+ int HP_account_db_sql_iter_destroy_post;
+ int HP_account_db_sql_iter_next_pre;
+ int HP_account_db_sql_iter_next_post;
+ int HP_account_db_read_inter_pre;
+ int HP_account_db_read_inter_post;
int HP_cmdline_init_pre;
int HP_cmdline_init_post;
int HP_cmdline_final_pre;
@@ -799,6 +915,32 @@ struct {
int HP_des_decrypt_block_post;
int HP_des_decrypt_pre;
int HP_des_decrypt_post;
+ int HP_ipban_init_pre;
+ int HP_ipban_init_post;
+ int HP_ipban_final_pre;
+ int HP_ipban_final_post;
+ int HP_ipban_cleanup_pre;
+ int HP_ipban_cleanup_post;
+ int HP_ipban_config_read_inter_pre;
+ int HP_ipban_config_read_inter_post;
+ int HP_ipban_config_read_connection_pre;
+ int HP_ipban_config_read_connection_post;
+ int HP_ipban_config_read_dynamic_pre;
+ int HP_ipban_config_read_dynamic_post;
+ int HP_ipban_config_read_pre;
+ int HP_ipban_config_read_post;
+ int HP_ipban_check_pre;
+ int HP_ipban_check_post;
+ int HP_ipban_log_pre;
+ int HP_ipban_log_post;
+ int HP_lchrif_server_init_pre;
+ int HP_lchrif_server_init_post;
+ int HP_lchrif_server_destroy_pre;
+ int HP_lchrif_server_destroy_post;
+ int HP_lchrif_server_reset_pre;
+ int HP_lchrif_server_reset_post;
+ int HP_lchrif_on_disconnect_pre;
+ int HP_lchrif_on_disconnect_post;
int HP_lclif_init_pre;
int HP_lclif_init_post;
int HP_lclif_final_pre;
@@ -1109,6 +1251,20 @@ struct {
int HP_login_config_set_md5hash_post;
int HP_login_convert_users_to_colors_pre;
int HP_login_convert_users_to_colors_post;
+ int HP_loginlog_failedattempts_pre;
+ int HP_loginlog_failedattempts_post;
+ int HP_loginlog_log_pre;
+ int HP_loginlog_log_post;
+ int HP_loginlog_init_pre;
+ int HP_loginlog_init_post;
+ int HP_loginlog_final_pre;
+ int HP_loginlog_final_post;
+ int HP_loginlog_config_read_names_pre;
+ int HP_loginlog_config_read_names_post;
+ int HP_loginlog_config_read_log_pre;
+ int HP_loginlog_config_read_log_post;
+ int HP_loginlog_config_read_pre;
+ int HP_loginlog_config_read_post;
int HP_md5_string_pre;
int HP_md5_string_post;
int HP_md5_binary_pre;
@@ -1433,15 +1589,19 @@ struct {
struct {
struct HCache_interface HCache;
+ struct account_interface account;
struct cmdline_interface cmdline;
struct console_interface console;
struct core_interface core;
struct db_interface DB;
struct des_interface des;
+ struct ipban_interface ipban;
+ struct lchrif_interface lchrif;
struct lclif_interface lclif;
struct lclif_interface_private PRIV__lclif;
struct libconfig_interface libconfig;
struct login_interface login;
+ struct loginlog_interface loginlog;
struct md5_interface md5;
struct mutex_interface mutex;
struct nullpo_interface nullpo;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
index 8cec39974..6eb2e8121 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
@@ -30,6 +30,26 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(HCache->init, HP_HCache_init) },
{ HP_POP(HCache->check, HP_HCache_check) },
{ HP_POP(HCache->open, HP_HCache_open) },
+/* account_interface */
+ { HP_POP(account->db_sql_up, HP_account_db_sql_up) },
+ { HP_POP(account->mmo_send_accreg2, HP_account_mmo_send_accreg2) },
+ { HP_POP(account->mmo_save_accreg2, HP_account_mmo_save_accreg2) },
+ { HP_POP(account->mmo_auth_fromsql, HP_account_mmo_auth_fromsql) },
+ { HP_POP(account->mmo_auth_tosql, HP_account_mmo_auth_tosql) },
+ { HP_POP(account->db_sql, HP_account_db_sql) },
+ { HP_POP(account->db_sql_init, HP_account_db_sql_init) },
+ { HP_POP(account->db_sql_destroy, HP_account_db_sql_destroy) },
+ { HP_POP(account->db_sql_get_property, HP_account_db_sql_get_property) },
+ { HP_POP(account->db_sql_set_property, HP_account_db_sql_set_property) },
+ { HP_POP(account->db_sql_create, HP_account_db_sql_create) },
+ { HP_POP(account->db_sql_remove, HP_account_db_sql_remove) },
+ { HP_POP(account->db_sql_save, HP_account_db_sql_save) },
+ { HP_POP(account->db_sql_load_num, HP_account_db_sql_load_num) },
+ { HP_POP(account->db_sql_load_str, HP_account_db_sql_load_str) },
+ { HP_POP(account->db_sql_iterator, HP_account_db_sql_iterator) },
+ { HP_POP(account->db_sql_iter_destroy, HP_account_db_sql_iter_destroy) },
+ { HP_POP(account->db_sql_iter_next, HP_account_db_sql_iter_next) },
+ { HP_POP(account->db_read_inter, HP_account_db_read_inter) },
/* cmdline_interface */
{ HP_POP(cmdline->init, HP_cmdline_init) },
{ HP_POP(cmdline->final, HP_cmdline_final) },
@@ -67,6 +87,21 @@ struct HookingPointData HookingPoints[] = {
/* des_interface */
{ HP_POP(des->decrypt_block, HP_des_decrypt_block) },
{ HP_POP(des->decrypt, HP_des_decrypt) },
+/* ipban_interface */
+ { HP_POP(ipban->init, HP_ipban_init) },
+ { HP_POP(ipban->final, HP_ipban_final) },
+ { HP_POP(ipban->cleanup, HP_ipban_cleanup) },
+ { HP_POP(ipban->config_read_inter, HP_ipban_config_read_inter) },
+ { HP_POP(ipban->config_read_connection, HP_ipban_config_read_connection) },
+ { HP_POP(ipban->config_read_dynamic, HP_ipban_config_read_dynamic) },
+ { HP_POP(ipban->config_read, HP_ipban_config_read) },
+ { HP_POP(ipban->check, HP_ipban_check) },
+ { HP_POP(ipban->log, HP_ipban_log) },
+/* lchrif_interface */
+ { HP_POP(lchrif->server_init, HP_lchrif_server_init) },
+ { HP_POP(lchrif->server_destroy, HP_lchrif_server_destroy) },
+ { HP_POP(lchrif->server_reset, HP_lchrif_server_reset) },
+ { HP_POP(lchrif->on_disconnect, HP_lchrif_on_disconnect) },
/* lclif_interface */
{ HP_POP(lclif->init, HP_lclif_init) },
{ HP_POP(lclif->final, HP_lclif_final) },
@@ -226,6 +261,14 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(login->clear_client_hash_nodes, HP_login_clear_client_hash_nodes) },
{ HP_POP(login->config_set_md5hash, HP_login_config_set_md5hash) },
{ HP_POP(login->convert_users_to_colors, HP_login_convert_users_to_colors) },
+/* loginlog_interface */
+ { HP_POP(loginlog->failedattempts, HP_loginlog_failedattempts) },
+ { HP_POP(loginlog->log, HP_loginlog_log) },
+ { HP_POP(loginlog->init, HP_loginlog_init) },
+ { HP_POP(loginlog->final, HP_loginlog_final) },
+ { HP_POP(loginlog->config_read_names, HP_loginlog_config_read_names) },
+ { HP_POP(loginlog->config_read_log, HP_loginlog_config_read_log) },
+ { HP_POP(loginlog->config_read, HP_loginlog_config_read) },
/* md5_interface */
{ HP_POP(md5->string, HP_md5_string) },
{ HP_POP(md5->binary, HP_md5_binary) },
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index 658ee874d..e432da70d 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -106,6 +106,516 @@ FILE* HP_HCache_open(const char *file, const char *opt) {
}
return retVal___;
}
+/* account_interface */
+struct Sql* HP_account_db_sql_up(AccountDB *self) {
+ int hIndex = 0;
+ struct Sql* retVal___ = NULL;
+ if (HPMHooks.count.HP_account_db_sql_up_pre > 0) {
+ struct Sql* (*preHookFunc) (AccountDB **self);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_up_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_db_sql_up_pre[hIndex].func;
+ retVal___ = preHookFunc(&self);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.account.db_sql_up(self);
+ }
+ if (HPMHooks.count.HP_account_db_sql_up_post > 0) {
+ struct Sql* (*postHookFunc) (struct Sql* retVal___, AccountDB *self);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_up_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_db_sql_up_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+void HP_account_mmo_send_accreg2(AccountDB *self, int fd, int account_id, int char_id) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_account_mmo_send_accreg2_pre > 0) {
+ void (*preHookFunc) (AccountDB **self, int *fd, int *account_id, int *char_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_mmo_send_accreg2_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_mmo_send_accreg2_pre[hIndex].func;
+ preHookFunc(&self, &fd, &account_id, &char_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.account.mmo_send_accreg2(self, fd, account_id, char_id);
+ }
+ if (HPMHooks.count.HP_account_mmo_send_accreg2_post > 0) {
+ void (*postHookFunc) (AccountDB *self, int fd, int account_id, int char_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_mmo_send_accreg2_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_mmo_send_accreg2_post[hIndex].func;
+ postHookFunc(self, fd, account_id, char_id);
+ }
+ }
+ return;
+}
+void HP_account_mmo_save_accreg2(AccountDB *self, int fd, int account_id, int char_id) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_account_mmo_save_accreg2_pre > 0) {
+ void (*preHookFunc) (AccountDB **self, int *fd, int *account_id, int *char_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_mmo_save_accreg2_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_mmo_save_accreg2_pre[hIndex].func;
+ preHookFunc(&self, &fd, &account_id, &char_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.account.mmo_save_accreg2(self, fd, account_id, char_id);
+ }
+ if (HPMHooks.count.HP_account_mmo_save_accreg2_post > 0) {
+ void (*postHookFunc) (AccountDB *self, int fd, int account_id, int char_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_mmo_save_accreg2_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_mmo_save_accreg2_post[hIndex].func;
+ postHookFunc(self, fd, account_id, char_id);
+ }
+ }
+ return;
+}
+bool HP_account_mmo_auth_fromsql(AccountDB_SQL *db, struct mmo_account *acc, int account_id) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_account_mmo_auth_fromsql_pre > 0) {
+ bool (*preHookFunc) (AccountDB_SQL **db, struct mmo_account **acc, int *account_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_mmo_auth_fromsql_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_mmo_auth_fromsql_pre[hIndex].func;
+ retVal___ = preHookFunc(&db, &acc, &account_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.account.mmo_auth_fromsql(db, acc, account_id);
+ }
+ if (HPMHooks.count.HP_account_mmo_auth_fromsql_post > 0) {
+ bool (*postHookFunc) (bool retVal___, AccountDB_SQL *db, struct mmo_account *acc, int account_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_mmo_auth_fromsql_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_mmo_auth_fromsql_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, db, acc, account_id);
+ }
+ }
+ return retVal___;
+}
+bool HP_account_mmo_auth_tosql(AccountDB_SQL *db, const struct mmo_account *acc, bool is_new) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_account_mmo_auth_tosql_pre > 0) {
+ bool (*preHookFunc) (AccountDB_SQL **db, const struct mmo_account **acc, bool *is_new);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_mmo_auth_tosql_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_mmo_auth_tosql_pre[hIndex].func;
+ retVal___ = preHookFunc(&db, &acc, &is_new);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.account.mmo_auth_tosql(db, acc, is_new);
+ }
+ if (HPMHooks.count.HP_account_mmo_auth_tosql_post > 0) {
+ bool (*postHookFunc) (bool retVal___, AccountDB_SQL *db, const struct mmo_account *acc, bool is_new);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_mmo_auth_tosql_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_mmo_auth_tosql_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, db, acc, is_new);
+ }
+ }
+ return retVal___;
+}
+AccountDB* HP_account_db_sql(void) {
+ int hIndex = 0;
+ AccountDB* retVal___ = NULL;
+ if (HPMHooks.count.HP_account_db_sql_pre > 0) {
+ AccountDB* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_db_sql_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.account.db_sql();
+ }
+ if (HPMHooks.count.HP_account_db_sql_post > 0) {
+ AccountDB* (*postHookFunc) (AccountDB* retVal___);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_db_sql_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+bool HP_account_db_sql_init(AccountDB *self) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_account_db_sql_init_pre > 0) {
+ bool (*preHookFunc) (AccountDB **self);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_init_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_db_sql_init_pre[hIndex].func;
+ retVal___ = preHookFunc(&self);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.account.db_sql_init(self);
+ }
+ if (HPMHooks.count.HP_account_db_sql_init_post > 0) {
+ bool (*postHookFunc) (bool retVal___, AccountDB *self);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_init_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_db_sql_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+void HP_account_db_sql_destroy(AccountDB *self) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_account_db_sql_destroy_pre > 0) {
+ void (*preHookFunc) (AccountDB **self);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_destroy_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_db_sql_destroy_pre[hIndex].func;
+ preHookFunc(&self);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.account.db_sql_destroy(self);
+ }
+ if (HPMHooks.count.HP_account_db_sql_destroy_post > 0) {
+ void (*postHookFunc) (AccountDB *self);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_destroy_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_db_sql_destroy_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+bool HP_account_db_sql_get_property(AccountDB *self, const char *key, char *buf, size_t buflen) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_account_db_sql_get_property_pre > 0) {
+ bool (*preHookFunc) (AccountDB **self, const char **key, char **buf, size_t *buflen);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_get_property_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_db_sql_get_property_pre[hIndex].func;
+ retVal___ = preHookFunc(&self, &key, &buf, &buflen);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.account.db_sql_get_property(self, key, buf, buflen);
+ }
+ if (HPMHooks.count.HP_account_db_sql_get_property_post > 0) {
+ bool (*postHookFunc) (bool retVal___, AccountDB *self, const char *key, char *buf, size_t buflen);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_get_property_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_db_sql_get_property_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, key, buf, buflen);
+ }
+ }
+ return retVal___;
+}
+bool HP_account_db_sql_set_property(AccountDB *self, struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_account_db_sql_set_property_pre > 0) {
+ bool (*preHookFunc) (AccountDB **self, struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_set_property_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_db_sql_set_property_pre[hIndex].func;
+ retVal___ = preHookFunc(&self, &config, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.account.db_sql_set_property(self, config, imported);
+ }
+ if (HPMHooks.count.HP_account_db_sql_set_property_post > 0) {
+ bool (*postHookFunc) (bool retVal___, AccountDB *self, struct config_t *config, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_set_property_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_db_sql_set_property_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_account_db_sql_create(AccountDB *self, struct mmo_account *acc) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_account_db_sql_create_pre > 0) {
+ bool (*preHookFunc) (AccountDB **self, struct mmo_account **acc);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_create_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_db_sql_create_pre[hIndex].func;
+ retVal___ = preHookFunc(&self, &acc);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.account.db_sql_create(self, acc);
+ }
+ if (HPMHooks.count.HP_account_db_sql_create_post > 0) {
+ bool (*postHookFunc) (bool retVal___, AccountDB *self, struct mmo_account *acc);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_create_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_db_sql_create_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, acc);
+ }
+ }
+ return retVal___;
+}
+bool HP_account_db_sql_remove(AccountDB *self, const int account_id) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_account_db_sql_remove_pre > 0) {
+ bool (*preHookFunc) (AccountDB **self, const int *account_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_remove_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_db_sql_remove_pre[hIndex].func;
+ retVal___ = preHookFunc(&self, &account_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.account.db_sql_remove(self, account_id);
+ }
+ if (HPMHooks.count.HP_account_db_sql_remove_post > 0) {
+ bool (*postHookFunc) (bool retVal___, AccountDB *self, const int account_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_remove_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_db_sql_remove_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, account_id);
+ }
+ }
+ return retVal___;
+}
+bool HP_account_db_sql_save(AccountDB *self, const struct mmo_account *acc) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_account_db_sql_save_pre > 0) {
+ bool (*preHookFunc) (AccountDB **self, const struct mmo_account **acc);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_save_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_db_sql_save_pre[hIndex].func;
+ retVal___ = preHookFunc(&self, &acc);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.account.db_sql_save(self, acc);
+ }
+ if (HPMHooks.count.HP_account_db_sql_save_post > 0) {
+ bool (*postHookFunc) (bool retVal___, AccountDB *self, const struct mmo_account *acc);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_save_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_db_sql_save_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, acc);
+ }
+ }
+ return retVal___;
+}
+bool HP_account_db_sql_load_num(AccountDB *self, struct mmo_account *acc, const int account_id) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_account_db_sql_load_num_pre > 0) {
+ bool (*preHookFunc) (AccountDB **self, struct mmo_account **acc, const int *account_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_load_num_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_db_sql_load_num_pre[hIndex].func;
+ retVal___ = preHookFunc(&self, &acc, &account_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.account.db_sql_load_num(self, acc, account_id);
+ }
+ if (HPMHooks.count.HP_account_db_sql_load_num_post > 0) {
+ bool (*postHookFunc) (bool retVal___, AccountDB *self, struct mmo_account *acc, const int account_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_load_num_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_db_sql_load_num_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, acc, account_id);
+ }
+ }
+ return retVal___;
+}
+bool HP_account_db_sql_load_str(AccountDB *self, struct mmo_account *acc, const char *userid) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_account_db_sql_load_str_pre > 0) {
+ bool (*preHookFunc) (AccountDB **self, struct mmo_account **acc, const char **userid);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_load_str_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_db_sql_load_str_pre[hIndex].func;
+ retVal___ = preHookFunc(&self, &acc, &userid);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.account.db_sql_load_str(self, acc, userid);
+ }
+ if (HPMHooks.count.HP_account_db_sql_load_str_post > 0) {
+ bool (*postHookFunc) (bool retVal___, AccountDB *self, struct mmo_account *acc, const char *userid);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_load_str_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_db_sql_load_str_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, acc, userid);
+ }
+ }
+ return retVal___;
+}
+AccountDBIterator* HP_account_db_sql_iterator(AccountDB *self) {
+ int hIndex = 0;
+ AccountDBIterator* retVal___ = NULL;
+ if (HPMHooks.count.HP_account_db_sql_iterator_pre > 0) {
+ AccountDBIterator* (*preHookFunc) (AccountDB **self);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_iterator_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_db_sql_iterator_pre[hIndex].func;
+ retVal___ = preHookFunc(&self);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.account.db_sql_iterator(self);
+ }
+ if (HPMHooks.count.HP_account_db_sql_iterator_post > 0) {
+ AccountDBIterator* (*postHookFunc) (AccountDBIterator* retVal___, AccountDB *self);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_iterator_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_db_sql_iterator_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+void HP_account_db_sql_iter_destroy(AccountDBIterator *self) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_account_db_sql_iter_destroy_pre > 0) {
+ void (*preHookFunc) (AccountDBIterator **self);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_iter_destroy_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_db_sql_iter_destroy_pre[hIndex].func;
+ preHookFunc(&self);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.account.db_sql_iter_destroy(self);
+ }
+ if (HPMHooks.count.HP_account_db_sql_iter_destroy_post > 0) {
+ void (*postHookFunc) (AccountDBIterator *self);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_iter_destroy_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_db_sql_iter_destroy_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+bool HP_account_db_sql_iter_next(AccountDBIterator *self, struct mmo_account *acc) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_account_db_sql_iter_next_pre > 0) {
+ bool (*preHookFunc) (AccountDBIterator **self, struct mmo_account **acc);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_iter_next_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_db_sql_iter_next_pre[hIndex].func;
+ retVal___ = preHookFunc(&self, &acc);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.account.db_sql_iter_next(self, acc);
+ }
+ if (HPMHooks.count.HP_account_db_sql_iter_next_post > 0) {
+ bool (*postHookFunc) (bool retVal___, AccountDBIterator *self, struct mmo_account *acc);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_iter_next_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_db_sql_iter_next_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, acc);
+ }
+ }
+ return retVal___;
+}
+bool HP_account_db_read_inter(AccountDB_SQL *db, const char *filename, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_account_db_read_inter_pre > 0) {
+ bool (*preHookFunc) (AccountDB_SQL **db, const char **filename, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_read_inter_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_account_db_read_inter_pre[hIndex].func;
+ retVal___ = preHookFunc(&db, &filename, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.account.db_read_inter(db, filename, imported);
+ }
+ if (HPMHooks.count.HP_account_db_read_inter_post > 0) {
+ bool (*postHookFunc) (bool retVal___, AccountDB_SQL *db, const char *filename, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_read_inter_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_account_db_read_inter_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, db, filename, imported);
+ }
+ }
+ return retVal___;
+}
/* cmdline_interface */
void HP_cmdline_init(void) {
int hIndex = 0;
@@ -964,6 +1474,352 @@ void HP_des_decrypt(unsigned char *data, size_t size) {
}
return;
}
+/* ipban_interface */
+void HP_ipban_init(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_ipban_init_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_init_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_ipban_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.ipban.init();
+ }
+ if (HPMHooks.count.HP_ipban_init_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_init_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_ipban_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_ipban_final(void) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_ipban_final_pre > 0) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_final_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_ipban_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.ipban.final();
+ }
+ if (HPMHooks.count.HP_ipban_final_post > 0) {
+ void (*postHookFunc) (void);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_final_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_ipban_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_ipban_cleanup(int tid, int64 tick, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_ipban_cleanup_pre > 0) {
+ int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_cleanup_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_ipban_cleanup_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick, &id, &data);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.ipban.cleanup(tid, tick, id, data);
+ }
+ if (HPMHooks.count.HP_ipban_cleanup_post > 0) {
+ int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_cleanup_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_ipban_cleanup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, tid, tick, id, data);
+ }
+ }
+ return retVal___;
+}
+bool HP_ipban_config_read_inter(const char *filename, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_ipban_config_read_inter_pre > 0) {
+ bool (*preHookFunc) (const char **filename, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_config_read_inter_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_ipban_config_read_inter_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.ipban.config_read_inter(filename, imported);
+ }
+ if (HPMHooks.count.HP_ipban_config_read_inter_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_config_read_inter_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_ipban_config_read_inter_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_ipban_config_read_connection(const char *filename, struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_ipban_config_read_connection_pre > 0) {
+ bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_config_read_connection_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_ipban_config_read_connection_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.ipban.config_read_connection(filename, config, imported);
+ }
+ if (HPMHooks.count.HP_ipban_config_read_connection_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_config_read_connection_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_ipban_config_read_connection_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_ipban_config_read_dynamic(const char *filename, struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_ipban_config_read_dynamic_pre > 0) {
+ bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_config_read_dynamic_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_ipban_config_read_dynamic_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.ipban.config_read_dynamic(filename, config, imported);
+ }
+ if (HPMHooks.count.HP_ipban_config_read_dynamic_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_config_read_dynamic_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_ipban_config_read_dynamic_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_ipban_config_read(const char *filename, struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_ipban_config_read_pre > 0) {
+ bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_config_read_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_ipban_config_read_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.ipban.config_read(filename, config, imported);
+ }
+ if (HPMHooks.count.HP_ipban_config_read_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_config_read_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_ipban_config_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_ipban_check(uint32 ip) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_ipban_check_pre > 0) {
+ bool (*preHookFunc) (uint32 *ip);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_check_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_ipban_check_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.ipban.check(ip);
+ }
+ if (HPMHooks.count.HP_ipban_check_post > 0) {
+ bool (*postHookFunc) (bool retVal___, uint32 ip);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_check_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_ipban_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ip);
+ }
+ }
+ return retVal___;
+}
+void HP_ipban_log(uint32 ip) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_ipban_log_pre > 0) {
+ void (*preHookFunc) (uint32 *ip);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_log_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_ipban_log_pre[hIndex].func;
+ preHookFunc(&ip);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.ipban.log(ip);
+ }
+ if (HPMHooks.count.HP_ipban_log_post > 0) {
+ void (*postHookFunc) (uint32 ip);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_log_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_ipban_log_post[hIndex].func;
+ postHookFunc(ip);
+ }
+ }
+ return;
+}
+/* lchrif_interface */
+void HP_lchrif_server_init(int id) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_lchrif_server_init_pre > 0) {
+ void (*preHookFunc) (int *id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_lchrif_server_init_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_lchrif_server_init_pre[hIndex].func;
+ preHookFunc(&id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.lchrif.server_init(id);
+ }
+ if (HPMHooks.count.HP_lchrif_server_init_post > 0) {
+ void (*postHookFunc) (int id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_lchrif_server_init_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_lchrif_server_init_post[hIndex].func;
+ postHookFunc(id);
+ }
+ }
+ return;
+}
+void HP_lchrif_server_destroy(int id) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_lchrif_server_destroy_pre > 0) {
+ void (*preHookFunc) (int *id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_lchrif_server_destroy_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_lchrif_server_destroy_pre[hIndex].func;
+ preHookFunc(&id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.lchrif.server_destroy(id);
+ }
+ if (HPMHooks.count.HP_lchrif_server_destroy_post > 0) {
+ void (*postHookFunc) (int id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_lchrif_server_destroy_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_lchrif_server_destroy_post[hIndex].func;
+ postHookFunc(id);
+ }
+ }
+ return;
+}
+void HP_lchrif_server_reset(int id) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_lchrif_server_reset_pre > 0) {
+ void (*preHookFunc) (int *id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_lchrif_server_reset_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_lchrif_server_reset_pre[hIndex].func;
+ preHookFunc(&id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.lchrif.server_reset(id);
+ }
+ if (HPMHooks.count.HP_lchrif_server_reset_post > 0) {
+ void (*postHookFunc) (int id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_lchrif_server_reset_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_lchrif_server_reset_post[hIndex].func;
+ postHookFunc(id);
+ }
+ }
+ return;
+}
+void HP_lchrif_on_disconnect(int id) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_lchrif_on_disconnect_pre > 0) {
+ void (*preHookFunc) (int *id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_lchrif_on_disconnect_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_lchrif_on_disconnect_pre[hIndex].func;
+ preHookFunc(&id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.lchrif.on_disconnect(id);
+ }
+ if (HPMHooks.count.HP_lchrif_on_disconnect_post > 0) {
+ void (*postHookFunc) (int id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_lchrif_on_disconnect_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_lchrif_on_disconnect_post[hIndex].func;
+ postHookFunc(id);
+ }
+ }
+ return;
+}
/* lclif_interface */
void HP_lclif_init(void) {
int hIndex = 0;
@@ -5117,6 +5973,195 @@ uint16 HP_login_convert_users_to_colors(uint16 users) {
}
return retVal___;
}
+/* loginlog_interface */
+unsigned long HP_loginlog_failedattempts(uint32 ip, unsigned int minutes) {
+ int hIndex = 0;
+ unsigned long retVal___ = 0;
+ if (HPMHooks.count.HP_loginlog_failedattempts_pre > 0) {
+ unsigned long (*preHookFunc) (uint32 *ip, unsigned int *minutes);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_failedattempts_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_loginlog_failedattempts_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip, &minutes);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.loginlog.failedattempts(ip, minutes);
+ }
+ if (HPMHooks.count.HP_loginlog_failedattempts_post > 0) {
+ unsigned long (*postHookFunc) (unsigned long retVal___, uint32 ip, unsigned int minutes);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_failedattempts_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_loginlog_failedattempts_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ip, minutes);
+ }
+ }
+ return retVal___;
+}
+void HP_loginlog_log(uint32 ip, const char *username, int rcode, const char *message) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_loginlog_log_pre > 0) {
+ void (*preHookFunc) (uint32 *ip, const char **username, int *rcode, const char **message);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_log_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_loginlog_log_pre[hIndex].func;
+ preHookFunc(&ip, &username, &rcode, &message);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.loginlog.log(ip, username, rcode, message);
+ }
+ if (HPMHooks.count.HP_loginlog_log_post > 0) {
+ void (*postHookFunc) (uint32 ip, const char *username, int rcode, const char *message);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_log_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_loginlog_log_post[hIndex].func;
+ postHookFunc(ip, username, rcode, message);
+ }
+ }
+ return;
+}
+bool HP_loginlog_init(void) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_loginlog_init_pre > 0) {
+ bool (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_init_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_loginlog_init_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.loginlog.init();
+ }
+ if (HPMHooks.count.HP_loginlog_init_post > 0) {
+ bool (*postHookFunc) (bool retVal___);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_init_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_loginlog_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+bool HP_loginlog_final(void) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_loginlog_final_pre > 0) {
+ bool (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_final_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_loginlog_final_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.loginlog.final();
+ }
+ if (HPMHooks.count.HP_loginlog_final_post > 0) {
+ bool (*postHookFunc) (bool retVal___);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_final_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_loginlog_final_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+bool HP_loginlog_config_read_names(const char *filename, struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_loginlog_config_read_names_pre > 0) {
+ bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_config_read_names_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_loginlog_config_read_names_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.loginlog.config_read_names(filename, config, imported);
+ }
+ if (HPMHooks.count.HP_loginlog_config_read_names_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_config_read_names_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_loginlog_config_read_names_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_loginlog_config_read_log(const char *filename, struct config_t *config, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_loginlog_config_read_log_pre > 0) {
+ bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_config_read_log_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_loginlog_config_read_log_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &config, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.loginlog.config_read_log(filename, config, imported);
+ }
+ if (HPMHooks.count.HP_loginlog_config_read_log_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_config_read_log_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_loginlog_config_read_log_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, config, imported);
+ }
+ }
+ return retVal___;
+}
+bool HP_loginlog_config_read(const char *filename, bool imported) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_loginlog_config_read_pre > 0) {
+ bool (*preHookFunc) (const char **filename, bool *imported);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_config_read_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_loginlog_config_read_pre[hIndex].func;
+ retVal___ = preHookFunc(&filename, &imported);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.loginlog.config_read(filename, imported);
+ }
+ if (HPMHooks.count.HP_loginlog_config_read_post > 0) {
+ bool (*postHookFunc) (bool retVal___, const char *filename, bool imported);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_config_read_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_loginlog_config_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, filename, imported);
+ }
+ }
+ return retVal___;
+}
/* md5_interface */
void HP_md5_string(const char *string, char *output) {
int hIndex = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.sources.inc b/src/plugins/HPMHooking/HPMHooking_login.sources.inc
index 55ced3025..78c506043 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.sources.inc
@@ -26,15 +26,19 @@
/* GENERATED FILE DO NOT EDIT */
HPMHooks.source.HCache = *HCache;
+HPMHooks.source.account = *account;
HPMHooks.source.cmdline = *cmdline;
HPMHooks.source.console = *console;
HPMHooks.source.core = *core;
HPMHooks.source.DB = *DB;
HPMHooks.source.des = *des;
+HPMHooks.source.ipban = *ipban;
+HPMHooks.source.lchrif = *lchrif;
HPMHooks.source.lclif = *lclif;
HPMHooks.source.PRIV__lclif = *lclif->p;
HPMHooks.source.libconfig = *libconfig;
HPMHooks.source.login = *login;
+HPMHooks.source.loginlog = *loginlog;
HPMHooks.source.md5 = *md5;
HPMHooks.source.mutex = *mutex;
HPMHooks.source.nullpo = *nullpo;