From d4db7786bb9270c7007ba3e427a6f8bc99ff7551 Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Fri, 3 Oct 2008 22:23:31 +0000 Subject: * Delete ST_LOGIN auth in chrif_disconnectplayer (followup to r13256, bugreport:2292) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13257 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 2 ++ src/map/chrif.c | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 03d0b9461..8078c7009 100644 --- a/Changelog-Trunk.txt +++ b/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 diff --git a/src/map/chrif.c b/src/map/chrif.c index 7ff0c12e6..0f5221994 100644 --- a/src/map/chrif.c +++ b/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 -- cgit v1.2.3-70-g09d2