summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-25 10:13:52 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-25 10:13:52 +0000
commit56c38376f23bf7b942247ef42b36ab7401397f0b (patch)
tree3a1a67bce5c331481cdd2931da5160b86bed735d /src/map/pc.c
parent3f59201b9eafb42da8364672d6fe0c6b155b2812 (diff)
downloadhercules-56c38376f23bf7b942247ef42b36ab7401397f0b.tar.gz
hercules-56c38376f23bf7b942247ef42b36ab7401397f0b.tar.bz2
hercules-56c38376f23bf7b942247ef42b36ab7401397f0b.tar.xz
hercules-56c38376f23bf7b942247ef42b36ab7401397f0b.zip
- You are allowed to expel guild mates that are not online now.
- Corrected damage of BloodDrain - Moved the "already connected" checks to pc_authok, since a dual login doesn't needs to be checked until the new connection is accepted. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9916 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 1dd9fa7f3..558f0f0be 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -556,6 +556,7 @@ int pc_isequip(struct map_session_data *sd,int n)
*/
int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_time, struct mmo_charstatus *st)
{
+ TBL_PC* old_sd;
int i;
unsigned long tick = gettick();
@@ -572,6 +573,17 @@ int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_t
return 1;
}
+ if( (old_sd=map_id2sd(sd->status.account_id)) != NULL ){
+ if (old_sd->state.finalsave || !old_sd->state.auth)
+ ; //Previous player is not done loading, No need to kick.
+ else if (old_sd->fd)
+ clif_authfail_fd(old_sd->fd, 2); // same id
+ else
+ map_quit(old_sd);
+ clif_authfail_fd(sd->fd, 8); // still recognizes last connection
+ return 1;
+ }
+
if (map_id2sd(st->account_id) != NULL)
{ //Somehow a second connection has managed to go through the double-connection
//check in clif_parse_WantToConnection! [Skotlex]