diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-12-31 16:57:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-01-14 20:18:11 +0300 |
commit | 868b2f75fc40e29d285c08d103203b337ad5fbef (patch) | |
tree | 01e0da9f85dd92491d3ad61fb81f01bcb757140d /src/char | |
parent | 0c387234ed9f7075b4d4b14ab4de9395e8493c9c (diff) | |
download | hercules-868b2f75fc40e29d285c08d103203b337ad5fbef.tar.gz hercules-868b2f75fc40e29d285c08d103203b337ad5fbef.tar.bz2 hercules-868b2f75fc40e29d285c08d103203b337ad5fbef.tar.xz hercules-868b2f75fc40e29d285c08d103203b337ad5fbef.zip |
Disconnect from char server if auth error happend.
Diffstat (limited to 'src/char')
-rw-r--r-- | src/char/char.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/char/char.c b/src/char/char.c index b7e1d8435..330b0639f 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -4444,6 +4444,7 @@ static void char_parse_char_connect(int fd, struct char_session_data *sd, uint32 if( core->runflag != CHARSERVER_ST_RUNNING ) { chr->auth_error(fd, 0); + sockt->eof(fd); return; } @@ -4458,11 +4459,13 @@ static void char_parse_char_connect(int fd, struct char_session_data *sd, uint32 /* restrictions apply */ if( chr->server_type == CST_MAINTENANCE && node->group_id < char_maintenance_min_group_id ) { chr->auth_error(fd, 0); + sockt->eof(fd); return; } /* the client will already deny this request, this check is to avoid someone bypassing. */ if( chr->server_type == CST_PAYING && (time_t)node->expiration_time < time(NULL) ) { chr->auth_error(fd, 0); + sockt->eof(fd); return; } idb_remove(auth_db, account_id); @@ -4474,6 +4477,7 @@ static void char_parse_char_connect(int fd, struct char_session_data *sd, uint32 loginif->auth(fd, sd, ipl); } else { // if no login-server, we must refuse connection chr->auth_error(fd, 0); + sockt->eof(fd); } } } @@ -4995,6 +4999,7 @@ static void char_parse_char_login_map_server(int fd, uint32 ipl) !sockt->allowed_ip_check(ipl)) { chr->login_map_server_ack(fd, 3); // Failure + sockt->eof(fd); } else { chr->login_map_server_ack(fd, 0); // Success |