summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-03-08 09:46:44 +0000
committerrubidium <rubidium@openttd.org>2007-03-08 09:46:44 +0000
commitc89379f7ebbb6099f0132cccafb9e71b746cc673 (patch)
tree25c6d19f45bb545c7fefb5f24e09ff08e399ab0e /src
parent2536a14abd95098fa752835dce90db679a557721 (diff)
downloadopenttd-c89379f7ebbb6099f0132cccafb9e71b746cc673.tar.xz
(svn r9061) -Fix [r9038, FS#668]: passwords are send when the server is in the 'authorizing' state, not 'inactive'.
Diffstat (limited to 'src')
-rw-r--r--src/network/network_server.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index 91856ff52..84a86e14c 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -697,7 +697,7 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_PASSWORD)
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 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_PASSWORD)
// 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) {