summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 8f2ce5654..adc2d68da 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -720,8 +720,14 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
sd = map_id2sd(id);
nullpo_retr(1, sd);
+ // check if double login occured
+ if(sd->new_fd){
+ // 2重login状態だったので、両方落す
+ clif_authfail_fd(sd->fd,2); // same id
+ clif_authfail_fd(sd->new_fd,8); // same id
+ return 1;
+ }
sd->login_id2 = login_id2;
-
memcpy(&sd->status, st, sizeof(*st));
if (sd->status.sex != sd->sex) {
@@ -945,6 +951,13 @@ int pc_authfail(int id) {
if (sd == NULL)
return 1;
+ if(sd->new_fd){
+ // 2重login状態だったので、新しい接続のみ落す
+ clif_authfail_fd(sd->new_fd,0);
+ sd->new_fd=0;
+ return 0;
+ }
+
clif_authfail_fd(sd->fd, 0);
return 0;