mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-16 11:09:11 +00:00
(svn r11007) [0.5] -Backport from trunk (r11006)
- Fix: spectators are not allowed to issue commands (r11006)
This commit is contained in:
@@ -823,6 +823,11 @@ static bool CheckCommandFlags(const CommandPacket *cp, const NetworkClientInfo *
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((cp->cmd != CMD_PLAYER_CTRL && !IsValidPlayer(cp->player) && ci->client_index != NETWORK_SERVER_INDEX) {
|
||||
IConsolePrintF(_icolour_err, "WARNING: spectator issueing command from client %d (IP: %s), kicking...", ci->client_index, GetPlayerIP(ci));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user