]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Antispam fixes for cmd's
authorSamual <samual@xonotic.org>
Tue, 20 Dec 2011 15:57:35 +0000 (10:57 -0500)
committerSamual <samual@xonotic.org>
Tue, 20 Dec 2011 15:57:35 +0000 (10:57 -0500)
commands.cfg
qcsrc/server/command/cmd.qc

index 9b0d00753dd0e72d78c2b7be1e29564fabe7e0dd..fd602081fd9b82958d804bda4f6924315b710507 100644 (file)
@@ -107,7 +107,7 @@ alias setreport "set \"$1\" \"$2\" ; sendcvar \"$1\""
 //  cmd (client-to-server command) - server/command/cmd.qc
 // ========================================================
 set sv_clientcommand_antispam_time 1 "Amount of seconds after a command before another command can be called again without being considered spam. (Use -1 for no antispam limit)"
-set sv_clientcommand_antispam_count 5 "Amount of commands considered spam before commands are rejected.
+set sv_clientcommand_antispam_count 8 "Amount of commands considered spam before commands are rejected."
 seta sv_status_privacy 1 "hide IP addresses from \"status\" and \"who\" replies shown to clients"
 seta cl_autoswitch 1 "automatically switch to newly picked up weapons if they are better than what you are carrying"
 
index ac3d7a93aaf8e2456cb0d8e692e8c872f3c63f0c..83bb50b4efb0ba96d0a7e4f2cd5b15b2f1517250 100644 (file)
@@ -616,13 +616,12 @@ 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)))
        {
                // exempt commands which are not subject to floodcheck
                case "begin": break; // handled by engine in host_cmd.c
+               case "download": break; // handled by engine in cl_parse.c
                case "getmapvotepic": break; // handled by server in this file
                case "pause": break; // handled by engine in host_cmd.c
                case "prespawn": break; // handled by engine in host_cmd.c
@@ -634,7 +633,7 @@ void SV_ParseClientCommand(string command)
                        if(SV_ParseClientCommand_floodcheck())
                                break; // "TRUE": continue, as we're not flooding yet
                        else
-                               return print("ANTISPAM CAUGHT: ", command, ".\n"); // "FALSE": not allowed to continue, halt
+                               return print("^1ERROR: ^7ANTISPAM 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.
@@ -662,11 +661,8 @@ void SV_ParseClientCommand(string command)
        }
        else if(ClientCommand_macro_command(argc, command)) // continue as usual and scan for normal commands
        {
-               return; // handled by one of the above GameCommand_* functions
+               return; // handled by one of the above ClientCommand_* functions
        }
        else
-       {
-               print("sent command to engine: ", command, ".\n");
                clientcommand(self, command);
-       }
 }
\ No newline at end of file