# HG changeset patch # User rubidium # Date 1216307682 0 # Node ID 40194ddf21936332d2d06d649cfdee230f5cc68d # Parent c79160082c0ff1dd63ce48aa0f51a5375c948cd5 (svn r13716) -Fix [FS#2144]: any player could construct new companies. diff -r c79160082c0f -r 40194ddf2193 src/network/network_server.cpp --- a/src/network/network_server.cpp Thu Jul 17 13:47:04 2008 +0000 +++ b/src/network/network_server.cpp Thu Jul 17 15:14:42 2008 +0000 @@ -901,7 +901,7 @@ * 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);