Mercurial > hg > openttd
changeset 6252:6abe9b12ddaf draft
(svn r9061) -Fix [r9038, FS#668]: passwords are send when the server is in the 'authorizing' state, not 'inactive'.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Thu, 08 Mar 2007 09:46:44 +0000 |
parents | 9953c75f16bc |
children | 28e00ab69663 |
files | src/network/network_server.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -697,7 +697,7 @@ type = (NetworkPasswordType)p->Recv_uint8(); p->Recv_string(password, sizeof(password)); - if (cs->status == STATUS_INACTIVE && type == NETWORK_GAME_PASSWORD) { + if (cs->status == STATUS_AUTHORIZING && type == NETWORK_GAME_PASSWORD) { // Check game-password if (strcmp(password, _network_game_info.server_password) != 0) { // Password is invalid @@ -715,7 +715,7 @@ // Valid password, allow user SEND_COMMAND(PACKET_SERVER_WELCOME)(cs); return; - } else if (cs->status == STATUS_INACTIVE && type == NETWORK_COMPANY_PASSWORD) { + } else if (cs->status == STATUS_AUTHORIZING && type == NETWORK_COMPANY_PASSWORD) { ci = DEREF_CLIENT_INFO(cs); if (strcmp(password, _network_player_info[ci->client_playas].password) != 0) {