Changeset - r1795:0736d50179cb
[Not reviewed]
master
0 1 0
Darkvater - 19 years ago 2005-05-12 00:20:16
darkvater@openttd.org
(svn r2299) - Fix: add more verbose output to possible hack-attempt.
- Btw, only 14 more commands are remaining, 88% done \o/
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
network_server.c
Show inline comments
 
@@ -822,6 +822,8 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT
 
	// Only CMD_PLAYER_CTRL is always allowed, for the rest, playas needs
 
	//  to match the player in the packet
 
	if (!(cp->cmd == CMD_PLAYER_CTRL && cp->p1 == 0) && ci->client_playas-1 != cp->player) {
 
		IConsolePrintF(_iconsole_color_error, "WARNING: player %d (IP: %s) tried to execute a command as player %d, kicking...",
 
									 ci->client_playas - 1, inet_ntoa(*(struct in_addr *)&ci->client_ip), cp->player);
 
		// The player did a command with the wrong player_id.. bad!!
 
		SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_PLAYER_MISMATCH);
 
		return;
0 comments (0 inline, 0 general)