]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/cmd.qc
properly report 0 free slots to server browser on restricted servers
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / cmd.qc
index 06262e109c9754c9e7bdea44dca601bf21ada875..8a086fcd5aaa43c9e82c8de7d7b562b85fb40f07 100644 (file)
@@ -142,7 +142,7 @@ void ClientCommand_mv_getpicture(float request, float argc) // internal command,
        }
 }
 
-void ClientCommand_join(float request) // legacy
+void ClientCommand_join(float request) 
 {
        switch(request)
        {
@@ -152,7 +152,7 @@ void ClientCommand_join(float request) // legacy
                        {
                                if(self.classname != "player" && !lockteams && !g_arena)
                                {
-                                       if(nJoinAllowed(1)) 
+                                       if(nJoinAllowed(self)) 
                                        {
                                                if(g_ca) { self.caplayer = 1; }
                                                if(autocvar_g_campaign) { campaign_bots_may_start = 1; }
@@ -418,7 +418,7 @@ void ClientCommand_sentcvar(float request, float argc, string command)
        }
 }
 
-void ClientCommand_spectate(float request) // legacy
+void ClientCommand_spectate(float request) 
 {
        switch(request)
        {
@@ -510,7 +510,7 @@ void ClientCommand_tell(float request, float argc, string command)
                                        }
                                        else { print_to(self, "You can't ^2tell^7 a message to yourself."); return; }
                                }
-                               else if(strtolower(argv(1)) == "world") 
+                               else if(argv(1) == "#0") 
                                { 
                                        trigger_magicear_processmessage_forallears(self, -1, world, substring(command, argv_start_index(next_token), argv_end_index(-1) - argv_start_index(next_token)));
                                        return;
@@ -530,7 +530,7 @@ void ClientCommand_tell(float request, float argc, string command)
        }
 }
 
-void ClientCommand_voice(float request, float argc, string command) // legacy
+void ClientCommand_voice(float request, float argc, string command) 
 {
        switch(request)
        {
@@ -660,6 +660,11 @@ void SV_ParseClientCommand(string command)
 {
        float argc = tokenize_console(command);
        
+       // for the mutator hook system
+       cmd_name = strtolower(argv(0));
+       cmd_argc = argc;
+       cmd_string = command;
+       
        // Guide for working with argc arguments by example:
        // argc:   1    - 2      - 3     - 4
        // argv:   0    - 1      - 2     - 3 
@@ -682,7 +687,7 @@ void SV_ParseClientCommand(string command)
                        if(SV_ParseClientCommand_floodcheck())
                                break; // "TRUE": continue, as we're not flooding yet
                        else
-                               return print("^1ERROR: ^7ANTISPAM CAUGHT: ", command, ".\n"); // "FALSE": not allowed to continue, halt TODO
+                               return; // "FALSE": not allowed to continue, halt // print("^1ERROR: ^7ANTISPAM CAUGHT: ", command, ".\n");
        }
        
        /* NOTE: should this be disabled? It can be spammy perhaps, but hopefully it's okay for now */
@@ -727,4 +732,4 @@ void SV_ParseClientCommand(string command)
        }
        else
                clientcommand(self, command);
-}
\ No newline at end of file
+}