Changeset - r7495:b5ff67381008
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2007-08-30 19:20:15
rubidium@openttd.org
(svn r11006) -Fix: spectators are not allowed to issue commands. Issue spotted by SmatZ.
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/network/network_server.cpp
Show inline comments
 
@@ -822,6 +822,11 @@ static bool CheckCommandFlags(const Comm
 
		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;
 
}
 

	
0 comments (0 inline, 0 general)