]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/clientcommands.qc
Weapon glowmod initiative, code part. Aimed at making weapons glow-modded, just like...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / clientcommands.qc
index adaf36f16415dc860c2b746dfc5d42074e98a856..40e0fcd469723d9bcae56b594a7cb8b3c6ca863f 100644 (file)
@@ -120,6 +120,7 @@ float cmd_floodcheck()
        return FALSE;
 }
 
+.float checkfail;
 void SV_ParseClientCommand(string s) {
        string cmd;
        float tokens;
@@ -128,7 +129,7 @@ void SV_ParseClientCommand(string s) {
 
        tokens = tokenize_console(s);
 
-       cmd = argv(0);
+       cmd = strtolower(argv(0));
        if(cmd != "reportcvar")
        if(cmd != "sentcvar")
        if(cmd != "pause")
@@ -144,6 +145,9 @@ void SV_ParseClientCommand(string s) {
                return;
        } else if(GameCommand_MapVote(argv(0))) {
                return;
+       } else if(cmd == "checkfail") {
+               print(sprintf("CHECKFAIL: %s (%s) epically failed check %s\n", self.netname, self.netaddress, substring(s, argv_start_index(1), argv_end_index(-1) - argv_start_index(1))));
+               self.checkfail = 1;
        } else if(cmd == "autoswitch") {
                // be backwards compatible with older clients (enabled)
                self.autoswitch = ("0" != argv(1));
@@ -218,7 +222,7 @@ void SV_ParseClientCommand(string s) {
                if(!g_arena)
                if (self.classname != "player" && !lockteams)
                {
-                       if(isJoinAllowed()) {
+                       if(nJoinAllowed(1)) {
                                self.classname = "player";
                                if(g_ca)
                                        self.caplayer = 1;
@@ -261,7 +265,7 @@ void SV_ParseClientCommand(string s) {
                if not(self.flags & FL_CLIENT)
                        return;
 
-               if((inWarmupStage && 0 >= g_warmup_limit) // with unlimited warmup players have to be able to restart
+               if((inWarmupStage)
                   || autocvar_sv_ready_restart || g_race_qualifying == 2)
                {
                        if(!readyrestart_happened || autocvar_sv_ready_restart_repeatable)
@@ -358,6 +362,7 @@ void SV_ParseClientCommand(string s) {
                sprint(self, cvar_purechanges);
        } else if(CheatCommand(tokens)) {
        } else {
+#if 0
                //if(ctf_clientcommand())
                //      return;
                // grep for Cmd_AddCommand_WithClientCommand to find them all
@@ -383,6 +388,7 @@ void SV_ParseClientCommand(string s) {
                        print("WARNING: Invalid clientcommand by ", self.netname, ": ", s, "\n");
                        return;
                }
+#endif
 
                if(self.jointime > 0 && time > self.jointime + 10 && time > self.nickspamtime) // allow any changes in the first 10 seconds since joining
                if(cmd == "name" || cmd == "playermodel") // TODO also playerskin and color?