]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/cmd.qc
GetIndexedEntity(argc, start_index) -- allows for players to be described
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / cmd.qc
index 27cc226bf588e871248220487b357dc5d8ed51d6..5c8d801abee2c51b9c36c35700232f83c039a7bb 100644 (file)
@@ -461,14 +461,14 @@ void ClientCommand_tell(float request, float argc, string command)
                {
                        if(argc >= 3)
                        {
-                               entity tell_to = GetFilteredEntity(argv(1));
+                               entity tell_to = GetIndexedEntity(argc, 1);
                                float tell_accepted = VerifyClientEntity(tell_to, TRUE, FALSE);
                                
                                if(tell_accepted > 0) // the target is a real client
                                {
                                        if(tell_to != self) // and we're allowed to send to them :D
                                        {
-                                               Say(self, FALSE, tell_to, substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)), TRUE);
+                                               Say(self, FALSE, tell_to, substring(command, argv_start_index(next_token), argv_end_index(-1) - argv_start_index(next_token)), TRUE);
                                                return;
                                        }
                                        else { print_to(self, "You can't ^2tell^7 a message to yourself."); return; }
@@ -568,7 +568,7 @@ void ClientCommand_(float request)
 void ClientCommand_macro_help()
 {
        #define CLIENT_COMMAND(name,function,description) \
-               { print("  ^2", name, "^7: ", description, "\n"); }
+               { sprint(self, "  ^2", name, "^7: ", description, "\n"); }
                
        CLIENT_COMMANDS(0, 0, "")
        #undef CLIENT_COMMAND
@@ -652,13 +652,13 @@ void SV_ParseClientCommand(string command)
                        ClientCommand_macro_help();
                        
                        print("\nCommon networked commands:\n");
-                       CommonCommand_macro_help();
+                       CommonCommand_macro_help(self);
                        
                        sprint(self, "\nUsage:^3 cmd COMMAND...^7, where possible commands are listed above.\n");
                        sprint(self, "For help about a specific command, type cmd help COMMAND\n");
                        return;
                } 
-               else if(CommonCommand_macro_usage(argc)) // Instead of trying to call a command, we're going to see detailed information about it
+               else if(CommonCommand_macro_usage(argc, self)) // Instead of trying to call a command, we're going to see detailed information about it
                {
                        return;
                }
@@ -675,7 +675,7 @@ void SV_ParseClientCommand(string command)
        {
                return; // handled by server/cheats.qc
        }
-       else if(CommonCommand_macro_command(argc, command))
+       else if(CommonCommand_macro_command(argc, self, command))
        {
                return; // handled by server/command/common.qc
        }