(svn r14897) -Codechange: don't allow a few command flags to be sent over the network as it's bogus information anyway; e.g. the "do not send over network" flag as it will be set whenever the command is received from the server/client.

-Codechange: test earlier whether the command (send from the server) is actually valid.
This commit is contained in:
rubidium
2009-01-07 15:27:19 +00:00
parent f5b23103d7
commit 8d017f0ea1
4 changed files with 26 additions and 1 deletions

View File

@@ -839,6 +839,11 @@ static bool CheckCommandFlags(const CommandPacket *cp, const NetworkClientInfo *
return false;
}
if ((cp->cmd & CMD_FLAGS_MASK) != 0) {
IConsolePrintF(CC_ERROR, "WARNING: invalid command flag from client %d (IP: %s), kicking...", ci->client_id, GetClientIP(ci));
return false;
}
return true;
}