summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParadox924X <Paradox924X@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-08-29 03:17:54 +0000
committerParadox924X <Paradox924X@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-08-29 03:17:54 +0000
commit36ea9e9c13d9f29203ba8c85a7f751f2433f5950 (patch)
tree3958363d7189219922b44ce52b64df9310ec9378
parent458fb6a34f3cb970c298c868f4f2cd40a85807fd (diff)
downloadhercules-36ea9e9c13d9f29203ba8c85a7f751f2433f5950.tar.gz
hercules-36ea9e9c13d9f29203ba8c85a7f751f2433f5950.tar.bz2
hercules-36ea9e9c13d9f29203ba8c85a7f751f2433f5950.tar.xz
hercules-36ea9e9c13d9f29203ba8c85a7f751f2433f5950.zip
Force a map_quit() call on the session data after a block/ban/changesex/acc deletion to remove leftovers of a player's session caused by when the fd has already been set to eof (player is not connected) but session data is kept (e.g. autotrading).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14398 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/chrif.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 2e33c0ef0..375539af0 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2010/08/28
+ * Force a map_quit() call on the session data after a block/ban/changesex/acc deletion to remove leftovers of a player's session
+ caused by when the fd has already been set to eof (player is not connected) but session data is kept (e.g. autotrading). [Paradox924X]
* Replaced a map_moveblock() call with a call to unit_movepos() to prevent an exploit. [Paradox924X]
2010/08/26
* Rev. 14395 instance_npcname will now error if the NPC being looked up is not found, care of ramsey. [L0ne_W0lf]
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 73549bf2b..40e7ca8d1 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -865,6 +865,7 @@ int chrif_changedsex(int fd)
// do same modify in login-server for the account, but no in char-server (it ask again login_id1 to login, and don't remember it)
clif_displaymessage(sd->fd, "Your sex has been changed (need disconnection by the server)...");
set_eof(sd->fd); // forced to disconnect for the change
+ map_quit(sd); // Remove leftovers (e.g. autotrading) [Paradox924X]
}
return 0;
}
@@ -958,6 +959,7 @@ int chrif_accountdeletion(int fd)
sd->login_id1++; // change identify, because if player come back in char within the 5 seconds, he can change its characters
clif_displaymessage(sd->fd, "Your account has been deleted (disconnection)...");
set_eof(sd->fd); // forced to disconnect for the change
+ map_quit(sd); // Remove leftovers (e.g. autotrading) [Paradox924X]
}
} else {
if (sd != NULL)
@@ -1013,6 +1015,7 @@ int chrif_accountban(int fd)
}
set_eof(sd->fd); // forced to disconnect for the change
+ map_quit(sd); // Remove leftovers (e.g. autotrading) [Paradox924X]
return 0;
}