diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-25 05:28:29 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-25 05:28:29 +0000 |
commit | 89ed514db4619f1d0a20a90c7f6db64e22fdfdb9 (patch) | |
tree | a1f3351a76016e3b08e9ef9ec2f45f9dcb87514a /src/map/clif.c | |
parent | 7ab61eb4bd3e948f57cd0439d81e4b29464623fa (diff) | |
download | hercules-89ed514db4619f1d0a20a90c7f6db64e22fdfdb9.tar.gz hercules-89ed514db4619f1d0a20a90c7f6db64e22fdfdb9.tar.bz2 hercules-89ed514db4619f1d0a20a90c7f6db64e22fdfdb9.tar.xz hercules-89ed514db4619f1d0a20a90c7f6db64e22fdfdb9.zip |
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@785 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 75f791589..386cceb44 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7104,6 +7104,25 @@ int clif_GM_kick(struct map_session_data *sd,struct map_session_data *tsd,int ty return 0; } + +/*========================================== + * + *------------------------------------------ + */ + +int clif_timedout(struct map_session_data *sd) +{ + nullpo_retr(0, sd); + + sprintf(tmp_output,"%sCharacter with Account ID '"CL_WHITE"%d"CL_RESET"' timed out.\n", (pc_isGM(sd))?"GM ":"", sd->bl.id); + ShowInfo(tmp_output); + map_quit(sd); + clif_authfail_fd(sd->fd,3); // Even if player is not on we still send anyway + clif_setwaitclose(sd->fd); // Set session to EOF + + return 0; +} + /*========================================== * WisΫΒ *------------------------------------------ @@ -7251,8 +7270,9 @@ void clif_parse_WantToConnection(int fd, struct map_session_data *sd) // if same account already connected, we disconnect the 2 sessions if ((old_sd = map_id2sd(account_id)) != NULL) { - clif_authfail_fd(fd, 2); // same id + clif_authfail_fd(fd, 8); // still recognizes last connection clif_authfail_fd(old_sd->fd, 2); // same id + clif_setwaitclose(sd->fd); // Set session to EOF } else { sd = session[fd]->session_data = (struct map_session_data*)aCalloc(1, sizeof(struct map_session_data)); sd->fd = fd; @@ -10234,7 +10254,7 @@ static int clif_parse(int fd) { if (RFIFOREST(fd) < 2) return 0; - //printf("clif_parse: connection #%d, packet: 0x%x (with being read: %d bytes).\n", fd, RFIFOW(fd,0), RFIFOREST(fd)); +// printf("clif_parse: connection #%d, packet: 0x%x (with being read: %d bytes).\n", fd, RFIFOW(fd,0), RFIFOREST(fd)); cmd = RFIFOW(fd,0); |