]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Lots of "usage" updates all around
authorSamual <samual@xonotic.org>
Wed, 14 Dec 2011 19:14:27 +0000 (14:14 -0500)
committerSamual <samual@xonotic.org>
Wed, 14 Dec 2011 19:14:27 +0000 (14:14 -0500)
qcsrc/server/command/common.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc

index d48730b785c55efa4d948dd2fd75bc68805260f7..0a18d99d0b0be0806aaf786a4f492b6065da9f85 100644 (file)
@@ -72,9 +72,9 @@ void CommonCommand_cvar_changes(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(self, "\nUsage:^3 sv_cmd cvar_changes\n");
-                       print_to(self, "  No arguments required.\n");
-                       //print_to(self, "See also: ^2cvar_purechanges^7\n");
+                       print_to(self, "\nUsage:^3 sv_cmd cvar_changes");
+                       print_to(self, "  No arguments required.");
+                       //print_to(self, "See also: ^2cvar_purechanges^7");
                        return;
                }
        }
@@ -93,9 +93,9 @@ void CommonCommand_cvar_purechanges(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(self, "\nUsage:^3 sv_cmd cvar_purechanges\n");
-                       print_to(self, "  No arguments required.\n");
-                       //print_to(self, "See also: ^2cvar_changes^7\n");
+                       print_to(self, "\nUsage:^3 sv_cmd cvar_purechanges");
+                       print_to(self, "  No arguments required.");
+                       //print_to(self, "See also: ^2cvar_changes^7");
                        return;
                }
        }
@@ -113,7 +113,7 @@ void CommonCommand_info(float request, float argc)
                        if(command)
                                wordwrap_sprint(command, 1111); // why 1111?
                        else
-                               print_to(self, "ERROR: unsupported info command\n");
+                               print_to(self, "ERROR: unsupported info command");
                                
                        return; // never fall through to usage
                }
@@ -121,8 +121,8 @@ void CommonCommand_info(float request, float argc)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(self, "\nUsage:^3 cmd info request\n");
-                       print_to(self, "  Where 'request' is the suffixed string appended onto the request for cvar.\n");
+                       print_to(self, "\nUsage:^3 cmd info request");
+                       print_to(self, "  Where 'request' is the suffixed string appended onto the request for cvar.");
                        return;
                }
        }
@@ -141,8 +141,8 @@ void CommonCommand_ladder(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(self, "\nUsage:^3 cmd ladder\n");
-                       print_to(self, "  No arguments required.\n");
+                       print_to(self, "\nUsage:^3 cmd ladder");
+                       print_to(self, "  No arguments required.");
                        return;
                }
        }
@@ -161,8 +161,8 @@ void CommonCommand_lsmaps(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(self, "\nUsage:^3 cmd lsmaps\n");
-                       print_to(self, "  No arguments required.\n");
+                       print_to(self, "\nUsage:^3 cmd lsmaps");
+                       print_to(self, "  No arguments required.");
                        return;
                }
        }
@@ -181,8 +181,8 @@ void CommonCommand_lsnewmaps(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(self, "\nUsage:^3 cmd lsnewmaps\n");
-                       print_to(self, "  No arguments required.\n");
+                       print_to(self, "\nUsage:^3 cmd lsnewmaps");
+                       print_to(self, "  No arguments required.");
                        return;
                }
        }
@@ -201,8 +201,8 @@ void CommonCommand_maplist(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(self, "\nUsage:^3 cmd maplist\n");
-                       print_to(self, "  No arguments required.\n");
+                       print_to(self, "\nUsage:^3 cmd maplist");
+                       print_to(self, "  No arguments required.");
                        return;
                }
        }
@@ -223,8 +223,8 @@ void GameCommand_rankings(float request) // this is OLD.... jeez.
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd rankings\n");
-                       print("  No arguments required.\n");
+                       print("\nUsage:^3 sv_cmd rankings");
+                       print("  No arguments required.");
                        return;
                }
        }
@@ -243,8 +243,8 @@ void CommonCommand_rankings(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(self, "\nUsage:^3 cmd rankings\n");
-                       print_to(self, "  No arguments required.\n");
+                       print_to(self, "\nUsage:^3 cmd rankings");
+                       print_to(self, "  No arguments required.");
                        return;
                }
        }
@@ -267,8 +267,8 @@ void CommonCommand_records(float request) // TODO: Isn't this flooding with the
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(self, "\nUsage:^3 cmd records\n");
-                       print_to(self, "  No arguments required.\n");
+                       print_to(self, "\nUsage:^3 cmd records");
+                       print_to(self, "  No arguments required.");
                        return;
                }
        }
@@ -287,8 +287,8 @@ void CommonCommand_teamstatus(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(self, "\nUsage:^3 cmd teamstatus\n");
-                       print_to(self, "  No arguments required.\n");
+                       print_to(self, "\nUsage:^3 cmd teamstatus");
+                       print_to(self, "  No arguments required.");
                        return;
                }
        }
@@ -306,9 +306,9 @@ void CommonCommand_timein(float request)
                                if(autocvar_sv_timeout)
                                {
                                        if (!timeoutStatus)
-                                               return print_to(self, "^7Error: There is no active timeout which could be aborted!\n");
+                                               return print_to(self, "^7Error: There is no active timeout which could be aborted!");
                                        if (self != timeoutInitiator)
-                                               return print_to(self, "^7Error: You may not abort the active timeout. Only the player who called it can do that!\n");
+                                               return print_to(self, "^7Error: You may not abort the active timeout. Only the player who called it can do that!");
                                                
                                        if (timeoutStatus == 1) 
                                        {
@@ -326,7 +326,7 @@ void CommonCommand_timein(float request)
                                                        timeoutHandler.nextthink = time; //timeoutHandler has to take care of it immediately
                                                }
                                                else
-                                                       print_to(self, "^7Error: Your resumegame call was discarded!\n");
+                                                       print_to(self, "^7Error: Your resumegame call was discarded!");
                                        }
                                }
                        }
@@ -336,8 +336,8 @@ void CommonCommand_timein(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(self, "\nUsage:^3 cmd timein\n");
-                       print_to(self, "  No arguments required.\n");
+                       print_to(self, "\nUsage:^3 cmd timein");
+                       print_to(self, "  No arguments required.");
                        return;
                }
        }
@@ -356,13 +356,13 @@ void CommonCommand_timeout(float request) // DEAR GOD THIS COMMAND IS TERRIBLE.
                                        if(self.classname == "player") 
                                        {
                                                if(vote_called)
-                                                       print_to(self, "^7Error: you can not call a timeout while a vote is active!\n");
+                                                       print_to(self, "^7Error: you can not call a timeout while a vote is active!");
                                                else
                                                {
                                                        if (inWarmupStage && !g_warmup_allow_timeout)
-                                                               return print_to(self, "^7Error: You can not call a timeout in warmup-stage!\n");
+                                                               return print_to(self, "^7Error: You can not call a timeout in warmup-stage!");
                                                        if (time < game_starttime )
-                                                               return print_to(self, "^7Error: You can not call a timeout while the map is being restarted!\n");
+                                                               return print_to(self, "^7Error: You can not call a timeout while the map is being restarted!");
                                                                
                                                        if (timeoutStatus != 2) {
                                                                //if the map uses a timelimit make sure that timeout cannot be called right before the map ends
@@ -375,13 +375,13 @@ void CommonCommand_timeout(float request) // DEAR GOD THIS COMMAND IS TERRIBLE.
                                                                        lastPossibleTimeout = (myTl*60) - autocvar_sv_timeout_leadtime - 1;
 
                                                                        if (lastPossibleTimeout < time - game_starttime)
-                                                                               return print_to(self, "^7Error: It is too late to call a timeout now!\n");
+                                                                               return print_to(self, "^7Error: It is too late to call a timeout now!");
                                                                }
                                                        }
                                                        
                                                        //player may not call a timeout if he has no calls left
                                                        if (self.allowedTimeouts < 1)
-                                                               return print_to(self, "^7Error: You already used all your timeout calls for this map!\n");
+                                                               return print_to(self, "^7Error: You already used all your timeout calls for this map!");
                                                                
                                                                
                                                        //now all required checks are passed
@@ -403,7 +403,7 @@ void CommonCommand_timeout(float request) // DEAR GOD THIS COMMAND IS TERRIBLE.
                                                }
                                        }
                                        else
-                                               print_to(self, "^7Error: only players can call a timeout!\n");
+                                               print_to(self, "^7Error: only players can call a timeout!");
                                }
                        }
                        return; // never fall through to usage
@@ -412,8 +412,8 @@ void CommonCommand_timeout(float request) // DEAR GOD THIS COMMAND IS TERRIBLE.
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(self, "\nUsage:^3 cmd timeout\n");
-                       print_to(self, "  No arguments required.\n");
+                       print_to(self, "\nUsage:^3 cmd timeout");
+                       print_to(self, "  No arguments required.");
                        return;
                }
        }
@@ -468,8 +468,8 @@ void CommonCommand_who(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(self, "\nUsage:^3 cmd who\n");
-                       print_to(self, "  No arguments required.\n");
+                       print_to(self, "\nUsage:^3 cmd who");
+                       print_to(self, "  No arguments required.");
                        return;
                }
        }
@@ -489,8 +489,8 @@ void CommonCommand_(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(self, "\nUsage:^3 cmd \n");
-                       print_to(self, "  No arguments required.\n");
+                       print_to(self, "\nUsage:^3 cmd ");
+                       print_to(self, "  No arguments required.");
                        return;
                }
        }
index 6cb8b228b71c7ffc97afee7dcea3d5f15aebeb0a..3e18ff1d62bb452473830e70f7f023bd84c24118 100644 (file)
@@ -3,12 +3,6 @@
 //  Last updated: December 6th, 2011
 // =====================================================
 
-// declarations in sv_cmd.qh
-
-// ============================
-//  Misc. Supporting Functions
-// ============================
-
 //  used by GameCommand_make_mapinfo()
 void make_mapinfo_Think()
 {
index eae5338c31c4544587d891369b868c9d63e31016..158a8a4c98122d24e7b4c373d697126b421b3772 100644 (file)
@@ -599,8 +599,8 @@ void VoteCommand_abstain(float request, entity caller) // CLIENT ONLY
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 vote abstain\n");
-                       print("  No arguments required.\n");
+                       print_to(caller, "\nUsage:^3 vote abstain");
+                       print_to(caller, "  No arguments required.");
                        return;
                }
        }
@@ -659,8 +659,10 @@ void VoteCommand_call(float request, entity caller, float argc, string vote_comm
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 vote call\n");
-                       print("  TODO.\n");
+                       print_to(caller, "\nUsage:^3 vote call command");
+                       print_to(caller, "  Where 'command' is the command to request a vote upon.");
+                       print_to(caller, "Examples: call gotomap dance");
+                       print_to(caller, "          call endmatch");
                        return;
                }
        }
@@ -746,8 +748,9 @@ void VoteCommand_master(float request, entity caller, float argc, string vote_co
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 vote master action [arguments]\n");
-                       print("  TODO.\n");
+                       print_to(caller, "\nUsage:^3 vote master [action [command | password]]");
+                       print_to(caller, "  If action is left blank, it calls a vote for you to become master.");
+                       print_to(caller, "  Otherwise the actions are either 'do' a command or 'login' as master.");
                        return;
                }
        }
@@ -776,8 +779,8 @@ void VoteCommand_no(float request, entity caller) // CLIENT ONLY
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 vote no\n");
-                       print("  No arguments required.\n");
+                       print_to(caller, "\nUsage:^3 vote no");
+                       print_to(caller, "  No arguments required.");
                        return;
                }
        }
@@ -800,8 +803,8 @@ void VoteCommand_status(float request, entity caller) // BOTH
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 vote status\n");
-                       print("  No arguments required.\n");
+                       print_to(caller, "\nUsage:^3 vote status");
+                       print_to(caller, "  No arguments required.");
                        return;
                }
        }
@@ -823,8 +826,8 @@ void VoteCommand_stop(float request, entity caller) // BOTH
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 vote stop\n");
-                       print("  No arguments required.\n");
+                       print_to(caller, "\nUsage:^3 vote stop");
+                       print_to(caller, "  No arguments required.");
                        return;
                }
        }
@@ -853,8 +856,8 @@ void VoteCommand_yes(float request, entity caller) // CLIENT ONLY
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 vote yes\n");
-                       print("  No arguments required.\n");
+                       print_to(caller, "\nUsage:^3 vote yes");
+                       print_to(caller, "  No arguments required.");
                        return;
                }
        }
@@ -874,8 +877,8 @@ void VoteCommand_(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 vote \n");
-                       print("  No arguments required.\n");
+                       print_to(caller, "\nUsage:^3 vote ");
+                       print_to(caller, "  No arguments required.");
                        return;
                }
        }
@@ -905,15 +908,15 @@ void VoteCommand_macro_help(entity caller, float argc)
        
        if(argc == 2) // help display listing all commands
        {
-               print("\nUsage:^3 ", command_origin, " vote COMMAND...^7, where possible commands are:\n");
+               print_to(caller, strcat("\nUsage:^3 ", command_origin, " vote COMMAND...^7, where possible commands are:"));
                
                #define VOTE_COMMAND(name,function,description,assignment) \
-                       { if(Votecommand_check_assignment(caller, assignment)) { print("  ^2", name, "^7: ", description, "\n"); } }
+                       { if(Votecommand_check_assignment(caller, assignment)) { print_to(caller, strcat("  ^2", name, "^7: ", description)); } }
                        
                VOTE_COMMANDS(0, caller, 0, "")
                #undef VOTE_COMMAND
                
-               print("For help about specific commands, type ", command_origin, " vote help COMMAND\n");
+               print_to(caller, strcat("For help about specific commands, type ", command_origin, " vote help COMMAND"));
        }
        else // usage for individual command
        {