]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/cmd.qc
Debug prints for cmd
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / cmd.qc
index 908d0190542d5852d9e2b67fc7ecc86c457149b3..ac3d7a93aaf8e2456cb0d8e692e8c872f3c63f0c 100644 (file)
@@ -32,7 +32,7 @@ void ClientCommand_autoswitch(float request, float argc)
        {
                case CMD_REQUEST_COMMAND:
                {
-                       self.autoswitch = ("0" != argv(1));
+                       self.autoswitch = InterpretBoolean(argv(1));
                        sprint(self, strcat("^1autoswitch is currently turned ", (self.autoswitch ? "on" : "off"), ".\n"));
                        return; // never fall through to usage
                }
@@ -41,7 +41,7 @@ void ClientCommand_autoswitch(float request, float argc)
                case CMD_REQUEST_USAGE:
                {
                        sprint(self, "\nUsage:^3 cmd autoswitch selection\n");
-                       sprint(self, "  Where 'selection' is 1 or 0 for on or off.\n"); 
+                       sprint(self, "  Where 'selection' controls if autoswitch is on or off.\n"); 
                        return;
                }
        }
@@ -616,6 +616,8 @@ void SV_ParseClientCommand(string command)
        // argv:   0    - 1      - 2     - 3 
        // cmd     vote - master - login - password
        
+       print("recieved normal command: ", command, ".\n");
+       
        // for floodcheck
        switch(strtolower(argv(0)))
        {
@@ -632,7 +634,7 @@ void SV_ParseClientCommand(string command)
                        if(SV_ParseClientCommand_floodcheck())
                                break; // "TRUE": continue, as we're not flooding yet
                        else
-                               return; // "FALSE": not allowed to continue, halt
+                               return print("ANTISPAM CAUGHT: ", command, ".\n"); // "FALSE": not allowed to continue, halt
        }
        
        /* NOTE: totally disabled for now, however the functionality and descriptions are there if we ever want it.
@@ -663,5 +665,8 @@ void SV_ParseClientCommand(string command)
                return; // handled by one of the above GameCommand_* functions
        }
        else
+       {
+               print("sent command to engine: ", command, ".\n");
                clientcommand(self, command);
+       }
 }
\ No newline at end of file