Browse Source

* Delete ST_LOGIN auth in chrif_disconnectplayer (followup to r13256, bugreport:2292)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13257 54d463be-8e91-2dee-dedb-b68131a5f0ec
FlavioJS 16 years ago
parent
commit
12b9def7a8
2 changed files with 10 additions and 2 deletions
  1. 2 0
      Changelog-Trunk.txt
  2. 8 2
      src/map/chrif.c

+ 2 - 0
Changelog-Trunk.txt

@@ -3,6 +3,8 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
+2008/10/04
+	* Delete ST_LOGIN auth in chrif_disconnectplayer (followup to r13256, bugreport:2292) [FlavioJS]
 2008/10/03
 	* Fix for "yet another online check bypass technique". (bugreport:2292) [FlavioJS]
 2008/10/01

+ 8 - 2
src/map/chrif.c

@@ -1016,10 +1016,16 @@ int chrif_accountban(int fd)
 int chrif_disconnectplayer(int fd)
 {
 	struct map_session_data* sd;
+	int account_id = RFIFOL(fd, 2);
 
-	sd = map_id2sd(RFIFOL(fd, 2));
-	if(sd == NULL)
+	sd = map_id2sd(account_id);
+	if( sd == NULL )
+	{
+		struct auth_node* auth = chrif_search(account_id);
+		if( auth != NULL && chrif_auth_delete(account_id, auth->char_id, ST_LOGIN) )
+			return 0;
 		return -1;
+	}
 
 	if (!sd->fd)
 	{	//No connection