mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-03 12:59:33 +00:00
(svn r11006) -Fix: spectators are not allowed to issue commands. Issue spotted by SmatZ.
This commit is contained in:
parent
b284b5fa92
commit
9833639b00
@ -822,6 +822,11 @@ static bool CheckCommandFlags(const CommandPacket *cp, const NetworkClientInfo *
|
|||||||
return false;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user