diff options
author | flaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-06-16 10:22:35 +0000 |
---|---|---|
committer | flaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-06-16 10:22:35 +0000 |
commit | e054cbbdb28a9b555faafd689282140c01d55b3e (patch) | |
tree | a0a637c944d902df0086900009a644c5b84d39e2 /src/map/clif.c | |
parent | 83c890478d5588179ffd81b29a95d4bafd0fb118 (diff) | |
download | hercules-e054cbbdb28a9b555faafd689282140c01d55b3e.tar.gz hercules-e054cbbdb28a9b555faafd689282140c01d55b3e.tar.bz2 hercules-e054cbbdb28a9b555faafd689282140c01d55b3e.tar.xz hercules-e054cbbdb28a9b555faafd689282140c01d55b3e.zip |
* Merges from charmerge:
- Added DBMap::exists. (r14090)
- Added sv_parse_next, a stepped version of sv_parse (delim-separated parser). (r14100 r14104)
- Added missing fd check to do_close. (r14145)
- Normalized, refactored and restructured some code (in preparation for shutdown/reconnect code). (r14145 r14150)
- Changed the char select request code to allow the char-server to reject it. (player in map-server trying to go to char select) (r14150)
- Added shutdown support to the servers. (incomplete) (r14152)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14851 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 16 |
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) { |