]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Get rid of some funny console spam on some invalid clientcommands.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 27 Feb 2015 20:21:27 +0000 (20:21 +0000)
committerRudolf Polzer <divVerent@xonotic.org>
Fri, 27 Feb 2015 20:26:14 +0000 (21:26 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12163 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=f2423fcb678bccc4b18bbec6c6840fe5d89eb6dc

host_cmd.c

index 2d3d4dd06c051694940a635c7d51244ef5154e3f..e2b8123ecba76b18a32d70d94bb9b06431702aa1 100644 (file)
@@ -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 <bytespersecond>\n");
+               if (cmd_source == src_command)
+               {
+                       Con_Printf("\"rate\" is \"%i\"\n", cl_rate.integer);
+                       Con_Print("rate <bytespersecond>\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));