summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin <Kevin@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-10 07:43:48 +0000
committerKevin <Kevin@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-10 07:43:48 +0000
commitb0d96463ad4f1af4aefa2562187ecdb539ece6ba (patch)
tree9f34690563e63f7c5984d47d1d019f3a4a727482
parentee246f6d2b72845aaa2272aa8435f762a0d8599c (diff)
downloadhercules-b0d96463ad4f1af4aefa2562187ecdb539ece6ba.tar.gz
hercules-b0d96463ad4f1af4aefa2562187ecdb539ece6ba.tar.bz2
hercules-b0d96463ad4f1af4aefa2562187ecdb539ece6ba.tar.xz
hercules-b0d96463ad4f1af4aefa2562187ecdb539ece6ba.zip
Login server will now correctly keep online account information and properly disconnect double login attempts.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12547 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/login/login.c9
-rw-r--r--src/login_sql/login.c9
2 files changed, 18 insertions, 0 deletions
diff --git a/src/login/login.c b/src/login/login.c
index 9bb77e093..7e0e68b3f 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -1152,6 +1152,15 @@ int parse_fromchar(int fd)
//ShowStatus("Char-server '%s': authentication of the account %d accepted (ip: %s).\n", server[id].name, account_id, ip);
+ struct online_login_data* od = (struct online_login_data*)idb_get(online_db, account_id);
+
+ //Leave info in online data DB [Kevin]
+ if(od->waiting_disconnect != -1)
+ {
+ delete_timer(od->waiting_disconnect, waiting_disconnect_timer);
+ od->waiting_disconnect = -1;
+ }
+
// each auth entry can only be used once
idb_remove(auth_db, account_id);
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index 81733f213..66987b06a 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -685,6 +685,15 @@ int parse_fromchar(int fd)
uint32 expiration_time;
char email[40];
+ struct online_login_data* od = (struct online_login_data*)idb_get(online_db, account_id);
+
+ //Leave info in online data DB [Kevin]
+ if(od->waiting_disconnect != -1)
+ {
+ delete_timer(od->waiting_disconnect, waiting_disconnect_timer);
+ od->waiting_disconnect = -1;
+ }
+
// each auth entry can only be used once
idb_remove(auth_db, account_id);