Cbuf_Lock(cbuf);
if (cbuf->maxsize - cbuf->size <= l)
- Con_Print("Cbuf_AddText: overflow\n");
+ Con_Print(CON_WARN "Cbuf_AddText: overflow\n");
else
{
// If the string terminates but the (last) line doesn't, the node will be left in the pending state (to be continued).
Cbuf_Lock(cbuf);
if (cbuf->size + l >= cbuf->maxsize)
- Con_Print("Cbuf_InsertText: overflow\n");
+ Con_Print(CON_WARN "Cbuf_InsertText: overflow\n");
else
{
// bones_was_here assertion: when prepending to the buffer it never makes sense to leave node(s) in the `pending` state,
f = (char *)FS_LoadFile (filename, tempmempool, false, NULL);
if (!f)
{
- Con_Printf("couldn't exec %s\n",filename);
+ Con_Printf(CON_WARN "couldn't exec %s\n",filename);
return;
}
Con_Printf("execing %s\n",filename);
s = FS_Search(Cmd_Argv(cmd, 1), true, true, NULL);
if(!s || !s->numfilenames)
{
- Con_Printf("couldn't exec %s\n",Cmd_Argv(cmd, 1));
+ Con_Printf(CON_WARN "couldn't exec %s\n",Cmd_Argv(cmd, 1));
return;
}
}
else
{ // Invalid CVar
- Con_Printf("ERROR : CVar '%s' not found\n", Cmd_Argv(cmd, 1) );
+ Con_Printf(CON_WARN "ERROR : CVar '%s' not found\n", Cmd_Argv(cmd, 1) );
}
}
}
s = Cmd_Argv(cmd, 1);
if (strlen(s) >= MAX_ALIAS_NAME)
{
- Con_Print("Alias name is too long\n");
+ Con_Print(CON_WARN "Alias name is too long\n");
return;
}
l = (int)strlen(com_token) + 1;
if (cmd->cbuf->tokenizebufferpos + l > CMD_TOKENIZELENGTH)
{
- Con_Printf("Cmd_TokenizeString: ran out of %i character buffer space for command arguments\n", CMD_TOKENIZELENGTH);
+ Con_Printf(CON_WARN "Cmd_TokenizeString: ran out of %i character buffer space for command arguments\n", CMD_TOKENIZELENGTH);
break;
}
memcpy (cmd->cbuf->tokenizebuffer + cmd->cbuf->tokenizebufferpos, com_token, l);
// fail if the command is a variable name
if (Cvar_FindVar(cmd->cvars, cmd_name, ~0))
{
- Con_Printf("Cmd_AddCommand: %s already defined as a var\n", cmd_name);
+ Con_Printf(CON_WARN "Cmd_AddCommand: %s already defined as a var\n", cmd_name);
return;
}
{
if (!strcmp(cmd_name, func->name))
{
- Con_Printf("Cmd_AddCommand: %s already defined\n", cmd_name);
+ Con_Printf(CON_WARN "Cmd_AddCommand: %s already defined\n", cmd_name);
continue;
}
}
if (func->function)
func->function(cmd);
else
- Con_Printf("Command \"%s\" can not be executed\n", Cmd_Argv(cmd, 0));
+ Con_Printf(CON_WARN "Command \"%s\" can not be executed\n", Cmd_Argv(cmd, 0));
return true;
}
}
else if(!(func->flags & CF_SERVER))
{
- Con_Printf("Cannot execute client commands from a dedicated server console.\n");
+ Con_Printf(CON_WARN "Cannot execute client commands from a dedicated server console.\n");
return true;
}
}
else if (src == src_client)
{
if((func->flags & CF_CHEAT) && !sv_cheats.integer)
- SV_ClientPrintf("No cheats allowed. The server must have sv_cheats set to 1\n");
+ SV_ClientPrintf(CON_WARN "No cheats allowed. The server must have sv_cheats set to 1\n");
else
func->function(cmd);
return true;
// check cvars
if (!Cvar_Command(cmd) && host.framecount > 0)
- Con_Printf("Unknown command \"%s\"\n", Cmd_Argv(cmd, 0));
+ Con_Printf(CON_WARN "Unknown command \"%s\"\n", Cmd_Argv(cmd, 0));
done:
cmd->cbuf->tokenizebufferpos = oldpos;
if (lockmutex)
if (!parm)
{
- Con_Printf ("Cmd_CheckParm: NULL");
+ Con_Printf(CON_WARN "Cmd_CheckParm: NULL");
return 0;
}
{
if (var == NULL)
{
- Con_Print("Cvar_Callback: var == NULL\n");
+ Con_Print(CON_WARN "Cvar_Callback: var == NULL\n");
return;
}
{
if (var == NULL)
{
- Con_Print("Cvar_SetQuick: var == NULL\n");
+ Con_Print(CON_WARN "Cvar_SetQuick: var == NULL\n");
return;
}
var = Cvar_FindVar(cvars, var_name, ~0);
if (var == NULL)
{
- Con_Printf("Cvar_Set: variable %s not found\n", var_name);
+ Con_Printf(CON_WARN "Cvar_Set: variable %s not found\n", var_name);
return;
}
Cvar_SetQuick(var, value);
{
if (variable == NULL)
{
- Con_Print("Cvar_RegisterCallback: var == NULL\n");
+ Con_Print(CON_WARN "Cvar_RegisterCallback: var == NULL\n");
return;
}
variable->callback = callback;
// check for overlap with a command
if (Cmd_Exists(cmd_local, variable->name))
{
- Con_Printf("Cvar_RegisterVariable: %s is a command\n", variable->name);
+ Con_Printf(CON_WARN "Cvar_RegisterVariable: %s is a command\n", variable->name);
return;
}
// check for pure evil
if (!*name)
{
- Con_Printf("Cvar_Get: invalid variable name\n");
+ Con_Printf(CON_WARN "Cvar_Get: invalid variable name\n");
return NULL;
}
// check for overlap with a command
if (Cmd_Exists(cmd_local, name))
{
- Con_Printf("Cvar_Get: %s is a command\n", name);
+ Con_Printf(CON_WARN "Cvar_Get: %s is a command\n", name);
return NULL;
}
{
if (var->flags & CF_READONLY)
{
+ Con_Print(CON_WARN);
if(cmd_name)
Con_Printf("%s: ",cmd_name);
- Con_Printf("%s", var->name);
- Con_Printf(" is read-only\n");
+ Con_Printf("%s is read-only\n", var->name);
return true;
}
return false;