From 75d933b9020f991f01bc73d0041d12dc8733d952 Mon Sep 17 00:00:00 2001 From: Samual Date: Mon, 26 Dec 2011 17:31:13 -0500 Subject: [PATCH] More usage fixes and comments --- qcsrc/server/command/cmd.qc | 12 ++++++------ qcsrc/server/command/cmd.qh | 5 ++--- qcsrc/server/command/vote.qc | 20 ++++++++++---------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 4e535f28d..f218a4e67 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -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 \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 \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 \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; diff --git a/qcsrc/server/command/cmd.qh b/qcsrc/server/command/cmd.qh index f7693a33b..4a0d771e1 100644 --- a/qcsrc/server/command/cmd.qh +++ b/qcsrc/server/command/cmd.qh @@ -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) diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 0f0d431d1..675aa5fc7 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -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; } -- 2.39.2