diff options
author | Darkvater <darkvater@openttd.org> | 2005-05-12 00:20:16 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2005-05-12 00:20:16 +0000 |
commit | 56e7e4cf25929feefc4586dc3ffe1f4471bbdef1 (patch) | |
tree | 8dab83be2a7ec98ec259f529fb1b986bf3f899fe | |
parent | c626555f6848d71ead5b64ddbfddd483a29b1b7f (diff) | |
download | openttd-56e7e4cf25929feefc4586dc3ffe1f4471bbdef1.tar.xz |
(svn r2299) - Fix: add more verbose output to possible hack-attempt.
- Btw, only 14 more commands are remaining, 88% done \o/
-rw-r--r-- | network_server.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/network_server.c b/network_server.c index 6aa8209b3..35a5f81a9 100644 --- a/network_server.c +++ b/network_server.c @@ -822,6 +822,8 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND) // 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; |