From df0e00d81b399b7a8d9c597e82ead0f0ac56c43e Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 17 Nov 2006 13:57:15 +0000 Subject: - Updated map_quit to handle removing of players who are not even authenticated yet. - New connection requests are now also blocked when there's a player already online but hasn't finished loading yet. - Because of these changes, the friendlist notification when people join has been moved to LoadEndAck from pc_authok git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9241 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index a79cbf0fd..63c334492 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8202,8 +8202,9 @@ void clif_parse_WantToConnection(int fd, struct map_session_data *sd) if ((old_sd = map_id2sd(account_id)) != NULL) { // if same account already connected, we disconnect the 2 sessions //Check for characters with no connection (includes those that are using autotrade) [durf],[Skotlex] - if (old_sd->state.finalsave) - ; //Ack has not arrived yet from char-server, be patient! + if (old_sd->state.finalsave || !old_sd->state.auth) + ; //Previous player is not done loading. + //Or he has quit, but is not done saving on the charserver. else if (old_sd->fd) clif_authfail_fd(old_sd->fd, 2); // same id else @@ -8387,6 +8388,9 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) if (night_flag && map[sd->bl.m].flag.nightenabled) add_timer(gettick()+1000,clif_nighttimer,sd->bl.id,0); + // Notify everyone that this char logged in [Skotlex]. + clif_foreachclient(clif_friendslist_toggle_sub, sd->status.account_id, sd->status.char_id, 1); + //Login Event npc_script_event(sd, NPCE_LOGIN); } else { -- cgit v1.2.3-70-g09d2