summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index bffb708d5..ac8382a63 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -581,10 +581,10 @@ int clif_authfail_fd(int fd, int type)
return 0;
}
-/*==========================================
- *
- *------------------------------------------*/
-int clif_charselectok(int id)
+/// Reply from char-server.
+/// Tells the player if it can connect to the char-server to select a character.
+/// ok=1 : client disconnects and tries to connect to the char-server
+int clif_charselectok(int id, uint8 ok)
{
struct map_session_data* sd;
int fd;
@@ -595,7 +595,7 @@ int clif_charselectok(int id)
fd = sd->fd;
WFIFOHEAD(fd,packet_len(0xb3));
WFIFOW(fd,0) = 0xb3;
- WFIFOB(fd,2) = 1;
+ WFIFOB(fd,2) = ok;
WFIFOSET(fd,packet_len(0xb3));
return 0;
@@ -8392,6 +8392,12 @@ void clif_parse_WantToConnection(int fd, TBL_PC* sd)
return;
}
+ if( runflag != MAPSERVER_ST_RUNNING )
+ {// not allowed
+ clif_authfail_fd(fd,1);// server closed
+ return;
+ }
+
//Check for double login.
bl = map_id2bl(account_id);
if(bl && bl->type != BL_PC) {