Browse Source

Login server will now correctly keep online account information and properly disconnect double login attempts.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12547 54d463be-8e91-2dee-dedb-b68131a5f0ec
Kevin 17 years ago
parent
commit
d4dd257fb6
2 changed files with 18 additions and 0 deletions
  1. 9 0
      src/login/login.c
  2. 9 0
      src/login_sql/login.c

+ 9 - 0
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);
 

+ 9 - 0
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);