diff options
author | rubidium <rubidium@openttd.org> | 2008-07-17 15:14:42 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-07-17 15:14:42 +0000 |
commit | a1ca1da1b3a68bc63059a7925bca175649494258 (patch) | |
tree | 1dca13213f7a8d54b267ee52493c54afbe042c93 /src/network | |
parent | 5a94972c2db660c9cc5fe5d79ea095af04456a21 (diff) | |
download | openttd-a1ca1da1b3a68bc63059a7925bca175649494258.tar.xz |
(svn r13716) -Fix [FS#2144]: any player could construct new companies.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_server.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 2e0de667a..3905d0bae 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -901,7 +901,7 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND) * to match the player in the packet. If it doesn't, the client has done * something pretty naughty (or a bug), and will be kicked */ - if (!(cp->cmd == CMD_PLAYER_CTRL && cp->p1 == 0) && ci->client_playas != cp->player) { + if (!(cp->cmd == CMD_PLAYER_CTRL && cp->p1 == 0 && ci->client_playas == PLAYER_NEW_COMPANY) && ci->client_playas != cp->player) { IConsolePrintF(CC_ERROR, "WARNING: player %d (IP: %s) tried to execute a command as player %d, kicking...", ci->client_playas + 1, GetPlayerIP(ci), cp->player + 1); SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_PLAYER_MISMATCH); |