summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-29 13:14:18 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-29 13:14:18 +0000
commit82bfe67b47a6f51242dec643334fb6b7e2cfaad6 (patch)
tree02186d2d42a2e4414a611203da8dfe192940dde0 /src
parentad5290dcbfba41987835868c9b1113f15551dfda (diff)
downloadhercules-82bfe67b47a6f51242dec643334fb6b7e2cfaad6.tar.gz
hercules-82bfe67b47a6f51242dec643334fb6b7e2cfaad6.tar.bz2
hercules-82bfe67b47a6f51242dec643334fb6b7e2cfaad6.tar.xz
hercules-82bfe67b47a6f51242dec643334fb6b7e2cfaad6.zip
Fixed a compilation issue with r12446 (C can't handle non-constant initializers for static variables).
Switched trunk's VS9 project files back to "Compile as C code" (topic:183217). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12448 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/login/login.c4
-rw-r--r--src/login_sql/login.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/login/login.c b/src/login/login.c
index 1fefb5831..d6b7eeb2e 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -45,6 +45,7 @@ int gm_account_filename_check_timer = 15; // Timer to check if GM_account file h
//Account registration flood protection [Kevin]
int allowed_regs = 1;
int time_allowed = 10; //in seconds
+unsigned int new_reg_tick = 0;
// data handling (TXT)
@@ -895,7 +896,6 @@ int mmo_auth_new(struct mmo_account* account, char sex, char* email)
int mmo_auth(struct mmo_account* account, int fd)
{
static int num_regs = 0; // registration counter
- static unsigned int new_reg_tick = gettick();
unsigned int i;
time_t raw_time;
@@ -2361,6 +2361,8 @@ int do_init(int argc, char** argv)
//##TODO invoke a CONSOLE_START plugin event
}
+ new_reg_tick = gettick();
+
// server port open & binding
login_fd = make_listen_bind(login_config.login_ip, login_config.login_port);
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index 281d2a09b..311e47e9b 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -42,6 +42,7 @@ unsigned int GM_num = 0; // number of gm accounts
//Account registration flood protection [Kevin]
int allowed_regs = 1;
int time_allowed = 10; //in seconds
+unsigned int new_reg_tick = 0;
// data handling (SQL)
@@ -391,7 +392,6 @@ bool check_password(struct login_session_data* ld, int passwdenc, const char* pa
int mmo_auth_new(struct mmo_account* account, char sex)
{
static int num_regs = 0; // registration counter
- static unsigned int new_reg_tick = gettick();
unsigned int tick = gettick();
char md5buf[32+1];
@@ -1978,6 +1978,8 @@ int do_init(int argc, char** argv)
//##TODO invoke a CONSOLE_START plugin event
}
+ new_reg_tick = gettick();
+
// server port open & binding
login_fd = make_listen_bind(login_config.login_ip, login_config.login_port);