]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
More usage fixes and comments
authorSamual <samual@xonotic.org>
Mon, 26 Dec 2011 22:31:13 +0000 (17:31 -0500)
committerSamual <samual@xonotic.org>
Mon, 26 Dec 2011 22:31:13 +0000 (17:31 -0500)
qcsrc/server/command/cmd.qc
qcsrc/server/command/cmd.qh
qcsrc/server/command/vote.qc

index 4e535f28d393327e9877ab703a861f65605cd6ad..f218a4e6705fa9eafc27f19ef1b8cc4157eb0054 100644 (file)
@@ -1,6 +1,6 @@
 // =========================================================
 //  Server side networked commands code, reworked by Samual
-//  Last updated: December 25th, 2011
+//  Last updated: December 26th, 2011
 // =========================================================
 
 float SV_ParseClientCommand_floodcheck()
@@ -61,7 +61,7 @@ void ClientCommand_checkfail(float request, string command) // internal command,
                default:
                case CMD_REQUEST_USAGE:
                {
-                       sprint(self, "\nUsage:^3 cmd checkfail message\n");
+                       sprint(self, "\nUsage:^3 cmd checkfail <message>\n");
                        sprint(self, "  Where 'message' is the message reported by client about the fail.\n");
                        return;
                }
@@ -350,7 +350,7 @@ void ClientCommand_selfstuff(float request, string command)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       sprint(self, "\nUsage:^3 cmd selfstuff command\n");
+                       sprint(self, "\nUsage:^3 cmd selfstuff <command>\n");
                        sprint(self, "  Where 'command' is the string to be stuffed to your client.\n");
                        return;
                }
@@ -464,9 +464,9 @@ void ClientCommand_tell(float request, float argc, string command)
                                entity tell_to = GetFilteredEntity(argv(1));
                                float tell_accepted = VerifyClientEntity(tell_to, TRUE, FALSE);
                                
-                               if(tell_accepted > 0)
+                               if(tell_accepted > 0) // the target is a real client
                                {
-                                       if(tell_to != self)
+                                       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);
                                                return;
@@ -509,7 +509,7 @@ void ClientCommand_voice(float request, float argc, string command) // legacy
                default:
                case CMD_REQUEST_USAGE:
                {
-                       sprint(self, "\nUsage:^3 cmd voice messagetype soundname\n");
+                       sprint(self, "\nUsage:^3 cmd voice messagetype <soundname>\n");
                        sprint(self, "  'messagetype' is the type of broadcast to do, like team only or such,\n");
                        sprint(self, "  and 'soundname' is the string/filename of the sound/voice message to play.\n");
                        return;
index f7693a33b139765deb9320aef80fbb1b59ae877e..4a0d771e19de3a28fd540be141e461f979319059 100644 (file)
@@ -1,12 +1,11 @@
 // =================================================
 //  Declarations for server side networked commands
-//  Last updated: December 14th, 2011
+//  Last updated: December 26th, 2011
 // =================================================
 
 .float cmd_floodtime;
 .float cmd_floodcount;
-.float checkfail;
 .float lms_spectate_warning;
+.float checkfail;
 
 string MapVote_Suggest(string m);
-//void MapVote_SendPicture(float id)
index 0f0d431d10f0db132ce39ec9343e1c4d8c153c3d..675aa5fc75ec4fb7735bbc044681181e06d04b26 100644 (file)
@@ -600,7 +600,7 @@ void VoteCommand_abstain(float request, entity caller) // CLIENT ONLY
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(caller, "\nUsage:^3 vote abstain");
+                       print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " vote abstain");
                        print_to(caller, "  No arguments required.");
                        return;
                }
@@ -660,10 +660,10 @@ void VoteCommand_call(float request, entity caller, float argc, string vote_comm
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(caller, "\nUsage:^3 vote call command");
+                       print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " 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");
+                       print_to(caller, strcat("Examples: ", GetCommandPrefix(caller), " vote call gotomap dance"));
+                       print_to(caller, strcat("          ", GetCommandPrefix(caller), " vote call endmatch"));
                        return;
                }
        }
@@ -749,7 +749,7 @@ void VoteCommand_master(float request, entity caller, float argc, string vote_co
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(caller, "\nUsage:^3 vote master [action [command | password]]");
+                       print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " 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;
@@ -781,7 +781,7 @@ void VoteCommand_no(float request, entity caller) // CLIENT ONLY
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(caller, "\nUsage:^3 vote no");
+                       print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " vote no");
                        print_to(caller, "  No arguments required.");
                        return;
                }
@@ -805,7 +805,7 @@ void VoteCommand_status(float request, entity caller) // BOTH
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(caller, "\nUsage:^3 vote status");
+                       print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " vote status");
                        print_to(caller, "  No arguments required.");
                        return;
                }
@@ -828,7 +828,7 @@ void VoteCommand_stop(float request, entity caller) // BOTH
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(caller, "\nUsage:^3 vote stop");
+                       print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " vote stop");
                        print_to(caller, "  No arguments required.");
                        return;
                }
@@ -858,7 +858,7 @@ void VoteCommand_yes(float request, entity caller) // CLIENT ONLY
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(caller, "\nUsage:^3 vote yes");
+                       print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " vote yes");
                        print_to(caller, "  No arguments required.");
                        return;
                }
@@ -880,7 +880,7 @@ void VoteCommand_(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print_to(caller, "\nUsage:^3 vote ");
+                       print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " vote ");
                        print_to(caller, "  No arguments required.");
                        return;
                }