From b1eb5e56a02b3abda682e9101366b34023465ef9 Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 27 Feb 2015 20:21:27 +0000 Subject: [PATCH] Get rid of some funny console spam on some invalid clientcommands. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12163 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=f2423fcb678bccc4b18bbec6c6840fe5d89eb6dc --- host_cmd.c | 48 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/host_cmd.c b/host_cmd.c index 2d3d4dd0..e2b8123e 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -1122,7 +1122,10 @@ static void Host_Name_f (void) if (Cmd_Argc () == 1) { - Con_Printf("name: %s\n", cl_name.string); + if (cmd_source == src_command) + { + Con_Printf("name: %s\n", cl_name.string); + } return; } @@ -1249,7 +1252,10 @@ static void Host_Playermodel_f (void) if (Cmd_Argc () == 1) { - Con_Printf("\"playermodel\" is \"%s\"\n", cl_playermodel.string); + if (cmd_source == src_command) + { + Con_Printf("\"playermodel\" is \"%s\"\n", cl_playermodel.string); + } return; } @@ -1306,7 +1312,10 @@ static void Host_Playerskin_f (void) if (Cmd_Argc () == 1) { - Con_Printf("\"playerskin\" is \"%s\"\n", cl_playerskin.string); + if (cmd_source == src_command) + { + Con_Printf("\"playerskin\" is \"%s\"\n", cl_playerskin.string); + } return; } @@ -1634,8 +1643,11 @@ static void Host_Color_f(void) if (Cmd_Argc() == 1) { - Con_Printf("\"color\" is \"%i %i\"\n", cl_color.integer >> 4, cl_color.integer & 15); - Con_Print("color <0-15> [0-15]\n"); + if (cmd_source == src_command) + { + Con_Printf("\"color\" is \"%i %i\"\n", cl_color.integer >> 4, cl_color.integer & 15); + Con_Print("color <0-15> [0-15]\n"); + } return; } @@ -1653,8 +1665,11 @@ static void Host_TopColor_f(void) { if (Cmd_Argc() == 1) { - Con_Printf("\"topcolor\" is \"%i\"\n", (cl_color.integer >> 4) & 15); - Con_Print("topcolor <0-15>\n"); + if (cmd_source == src_command) + { + Con_Printf("\"topcolor\" is \"%i\"\n", (cl_color.integer >> 4) & 15); + Con_Print("topcolor <0-15>\n"); + } return; } @@ -1665,8 +1680,11 @@ static void Host_BottomColor_f(void) { if (Cmd_Argc() == 1) { - Con_Printf("\"bottomcolor\" is \"%i\"\n", cl_color.integer & 15); - Con_Print("bottomcolor <0-15>\n"); + if (cmd_source == src_command) + { + Con_Printf("\"bottomcolor\" is \"%i\"\n", cl_color.integer & 15); + Con_Print("bottomcolor <0-15>\n"); + } return; } @@ -1681,8 +1699,11 @@ static void Host_Rate_f(void) if (Cmd_Argc() != 2) { - Con_Printf("\"rate\" is \"%i\"\n", cl_rate.integer); - Con_Print("rate \n"); + if (cmd_source == src_command) + { + Con_Printf("\"rate\" is \"%i\"\n", cl_rate.integer); + Con_Print("rate \n"); + } return; } @@ -1793,7 +1814,10 @@ static void Host_PModel_f (void) if (Cmd_Argc () == 1) { - Con_Printf("\"pmodel\" is \"%s\"\n", cl_pmodel.string); + if (cmd_source == src_command) + { + Con_Printf("\"pmodel\" is \"%s\"\n", cl_pmodel.string); + } return; } i = atoi(Cmd_Argv(1)); -- 2.39.2