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 --- src/map/chrif.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/map') 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