equal
deleted
inserted
replaced
820 |
820 |
821 ci = DEREF_CLIENT_INFO(cs); |
821 ci = DEREF_CLIENT_INFO(cs); |
822 // Only CMD_PLAYER_CTRL is always allowed, for the rest, playas needs |
822 // Only CMD_PLAYER_CTRL is always allowed, for the rest, playas needs |
823 // to match the player in the packet |
823 // to match the player in the packet |
824 if (!(cp->cmd == CMD_PLAYER_CTRL && cp->p1 == 0) && ci->client_playas-1 != cp->player) { |
824 if (!(cp->cmd == CMD_PLAYER_CTRL && cp->p1 == 0) && ci->client_playas-1 != cp->player) { |
|
825 IConsolePrintF(_iconsole_color_error, "WARNING: player %d (IP: %s) tried to execute a command as player %d, kicking...", |
|
826 ci->client_playas - 1, inet_ntoa(*(struct in_addr *)&ci->client_ip), cp->player); |
825 // The player did a command with the wrong player_id.. bad!! |
827 // The player did a command with the wrong player_id.. bad!! |
826 SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_PLAYER_MISMATCH); |
828 SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_PLAYER_MISMATCH); |
827 return; |
829 return; |
828 } |
830 } |
829 switch (cp->cmd) { |
831 switch (cp->cmd) { |