- print warning if server tries to set cvars it shouldn't set

- make warnings yellow
This commit is contained in:
Ludwig Nussel 2006-07-05 20:30:53 +00:00
parent 7d51d75b05
commit a24ffc0dd5

View file

@ -380,7 +380,7 @@ void CL_SystemInfoChanged( void ) {
{ {
if(FS_CheckDirTraversal(value)) if(FS_CheckDirTraversal(value))
{ {
Com_Printf("WARNING: Server sent invalid fs_game value %s\n", value); Com_Printf(S_COLOR_YELLOW "WARNING: Server sent invalid fs_game value %s\n", value);
continue; continue;
} }
@ -393,7 +393,10 @@ void CL_SystemInfoChanged( void ) {
{ {
// If this cvar may not be modified by a server discard the value. // If this cvar may not be modified by a server discard the value.
if(!(cvar_flags & (CVAR_SYSTEMINFO | CVAR_SERVER_CREATED))) if(!(cvar_flags & (CVAR_SYSTEMINFO | CVAR_SERVER_CREATED)))
{
Com_Printf(S_COLOR_YELLOW "WARNING: server is not allowed to set %s=%s\n", key, value);
continue; continue;
}
Cvar_Set(key, value); Cvar_Set(key, value);
} }