summaryrefslogtreecommitdiff
path: root/src/login/login.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-26 15:59:17 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-07 11:16:02 +0300
commitb623af001d219e1a8c7bde80982007c9a2e93808 (patch)
tree79a2ae4374f6efd4e62f4505e81b3ea63b80aa39 /src/login/login.h
parent653274de31a643d9aa910cc598b3671dfe85bbf4 (diff)
downloadhercules-b623af001d219e1a8c7bde80982007c9a2e93808.tar.gz
hercules-b623af001d219e1a8c7bde80982007c9a2e93808.tar.bz2
hercules-b623af001d219e1a8c7bde80982007c9a2e93808.tar.xz
hercules-b623af001d219e1a8c7bde80982007c9a2e93808.zip
Move global variables to interfaces in login.c
Diffstat (limited to 'src/login/login.h')
-rw-r--r--src/login/login.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/login/login.h b/src/login/login.h
index 3d347857e..5dfbe7b95 100644
--- a/src/login/login.h
+++ b/src/login/login.h
@@ -81,6 +81,8 @@ struct Login_Config {
int min_group_id_to_connect; // minimum group id to connect
bool check_client_version; // check the clientversion set in the clientinfo ?
uint32 client_version_to_connect; // the client version needed to connect (if checking is enabled)
+ int allowed_regs; // account registration flood protection [Kevin]
+ int time_allowed; // time in seconds
bool ipban; // perform IP blocking (via contents of `ipbanlist`) ?
bool dynamic_pass_failure_ban; // automatic IP blocking due to failed login attemps ?
@@ -92,6 +94,14 @@ struct Login_Config {
int client_hash_check; // flags for checking client md5
struct client_hash_node *client_hash_nodes; // linked list containg md5 hash for each gm group
+
+ // Advanced subnet check [LuzZza]
+ struct s_subnet {
+ uint32 mask;
+ uint32 char_ip;
+ uint32 map_ip;
+ } subnet[16];
+ int subnet_count;
};
struct auth_node {
@@ -123,6 +133,10 @@ extern struct mmo_char_server server[MAX_SERVERS];
extern struct Login_Config login_config;
struct login_interface {
+ DBMap* auth_db;
+ DBMap* online_db;
+ int fd;
+
int (*mmo_auth) (struct login_session_data* sd, bool isServer);
int (*mmo_auth_new) (const char* userid, const char* pass, const char sex, const char* last_ip);
int (*waiting_disconnect_timer) (int tid, int64 tick, int id, intptr_t data);