1 // =========================================================
2 // Server side networked commands code, reworked by Samual
3 // Last updated: November 8th, 2011
4 // =========================================================
6 #define CC_REQUEST_COMMAND 1
7 #define CC_REQUEST_USAGE 2
10 .float cmd_floodcount;
12 .float lms_spectate_warning;
14 string MapVote_Suggest(string m);
17 // ============================
18 // Misc. Supporting Functions
19 // ============================
21 float SV_ParseClientCommand_floodcheck()
23 if (timeoutStatus != 2) // if the game is not paused... but wait, doesn't that mean it could be dos'd by pausing it? eh? (old code)
25 if(time == self.cmd_floodtime) // todo: add buffer time as well, ONLY one second is a short amount of time for someone to be spamming.
27 self.cmd_floodcount += 1;
28 if(self.cmd_floodcount > 8) // todo: replace constant 8 with a cvar for the server to control
29 return FALSE; // too much spam, halt
33 self.cmd_floodtime = time;
34 self.cmd_floodcount = 1;
37 return TRUE; // continue, as we're not flooding yet
41 // =======================
42 // Command Sub-Functions
43 // =======================
45 void ClientCommand_autoswitch(float request, float argc)
49 case CC_REQUEST_COMMAND:
51 self.autoswitch = ("0" != argv(1));
52 sprint(self, strcat("^1autoswitch is currently turned ", (self.autoswitch ? "on" : "off"), ".\n"));
53 return; // never fall through to usage
57 case CC_REQUEST_USAGE:
59 sprint(self, "\nUsage:^3 cmd autoswitch selection\n");
60 sprint(self, " Where 'selection' is 1 or 0 for on or off.\n");
66 void ClientCommand_checkfail(float request, string command) // used only by client side code
70 case CC_REQUEST_COMMAND:
72 print(sprintf("CHECKFAIL: %s (%s) epically failed check %s\n", self.netname, self.netaddress, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1))));
74 return; // never fall through to usage
78 case CC_REQUEST_USAGE:
80 sprint(self, "\nUsage:^3 cmd checkfail message\n");
81 sprint(self, " Where 'message' is the message reported by client about the fail.\n");
87 void ClientCommand_clientversion(float request, float argc) // used only by client side code
91 case CC_REQUEST_COMMAND:
93 if(self.flags & FL_CLIENT)
95 self.version = ((argv(1) == "$gameversion") ? 1 : stof(argv(1)));
97 if(self.version < autocvar_gameversion_min || self.version > autocvar_gameversion_max)
99 self.version_mismatch = 1;
100 ClientKill_TeamChange(-2); // observe
102 else if(autocvar_g_campaign || autocvar_g_balance_teams || autocvar_g_balance_teams_force)
104 //JoinBestTeam(self, FALSE, TRUE);
106 else if(teamplay && !autocvar_sv_spectate && !(self.team_forced > 0))
108 self.classname = "observer"; // really?
109 stuffcmd(self, "menu_showteamselect\n");
112 return; // never fall through to usage
116 case CC_REQUEST_USAGE:
118 sprint(self, "\nUsage:^3 cmd clientversion version\n");
119 sprint(self, " Where 'version' is the game version reported by self.\n");
125 void ClientCommand_cvar_changes(float request)
129 case CC_REQUEST_COMMAND:
131 sprint(self, cvar_changes);
132 return; // never fall through to usage
136 case CC_REQUEST_USAGE:
138 sprint(self, "\nUsage:^3 sv_cmd cvar_changes\n");
139 sprint(self, " No arguments required.\n");
140 //sprint(self, "See also: ^2cvar_purechanges^7\n");
146 void ClientCommand_cvar_purechanges(float request)
150 case CC_REQUEST_COMMAND:
152 sprint(self, cvar_purechanges);
153 return; // never fall through to usage
157 case CC_REQUEST_USAGE:
159 sprint(self, "\nUsage:^3 sv_cmd cvar_purechanges\n");
160 sprint(self, " No arguments required.\n");
161 //sprint(self, "See also: ^2cvar_changes^7\n");
167 void ClientCommand_info(float request, float argc)
171 case CC_REQUEST_COMMAND:
175 command = cvar_string_builtin(strcat("sv_info_", argv(1)));
177 wordwrap_sprint(command, 1111); // why 1111?
179 sprint(self, "ERROR: unsupported info command\n");
181 return; // never fall through to usage
185 case CC_REQUEST_USAGE:
187 sprint(self, "\nUsage:^3 cmd info request\n");
188 sprint(self, " Where 'request' is the suffixed string appended onto the request for cvar.\n");
194 void ClientCommand_join(float request)
198 case CC_REQUEST_COMMAND:
200 if(self.flags & FL_CLIENT)
202 if(self.classname != "player" && !lockteams && !g_arena)
206 if(g_ca) { self.caplayer = 1; }
207 if(autocvar_g_campaign) { campaign_bots_may_start = 1; }
209 self.classname = "player";
210 PlayerScore_Clear(self);
211 bprint ("^4", self.netname, "^4 is playing now\n");
216 //player may not join because of g_maxplayers is set
217 centerprint(self, PREVENT_JOIN_TEXT);
221 return; // never fall through to usage
225 case CC_REQUEST_USAGE:
227 sprint(self, "\nUsage:^3 cmd join\n");
228 sprint(self, " No arguments required.\n");
234 void ClientCommand_ladder(float request)
238 case CC_REQUEST_COMMAND:
240 sprint(self, ladder_reply);
241 return; // never fall through to usage
245 case CC_REQUEST_USAGE:
247 sprint(self, "\nUsage:^3 cmd ladder\n");
248 sprint(self, " No arguments required.\n");
254 void ClientCommand_lsmaps(float request)
258 case CC_REQUEST_COMMAND:
260 sprint(self, lsmaps_reply);
261 return; // never fall through to usage
265 case CC_REQUEST_USAGE:
267 sprint(self, "\nUsage:^3 cmd lsmaps\n");
268 sprint(self, " No arguments required.\n");
274 void ClientCommand_lsnewmaps(float request)
278 case CC_REQUEST_COMMAND:
280 sprint(self, lsnewmaps_reply);
281 return; // never fall through to usage
285 case CC_REQUEST_USAGE:
287 sprint(self, "\nUsage:^3 cmd lsnewmaps\n");
288 sprint(self, " No arguments required.\n");
294 void ClientCommand_maplist(float request)
298 case CC_REQUEST_COMMAND:
300 sprint(self, maplist_reply);
301 return; // never fall through to usage
305 case CC_REQUEST_USAGE:
307 sprint(self, "\nUsage:^3 cmd maplist\n");
308 sprint(self, " No arguments required.\n");
314 void ClientCommand_rankings(float request)
318 case CC_REQUEST_COMMAND:
320 sprint(self, rankings_reply);
321 return; // never fall through to usage
325 case CC_REQUEST_USAGE:
327 sprint(self, "\nUsage:^3 cmd rankings\n");
328 sprint(self, " No arguments required.\n");
334 void ClientCommand_ready(float request)
338 case CC_REQUEST_COMMAND:
340 if(self.flags & FL_CLIENT)
342 if(inWarmupStage || autocvar_sv_ready_restart || g_race_qualifying == 2)
344 if(!readyrestart_happened || autocvar_sv_ready_restart_repeatable)
346 if (self.ready) // toggle
349 bprint(self.netname, "^2 is ^1NOT^2 ready\n");
354 bprint(self.netname, "^2 is ready\n");
357 // cannot reset the game while a timeout is active!
361 sprint(self, "^1Game has already been restarted\n");
365 return; // never fall through to usage
369 case CC_REQUEST_USAGE:
371 sprint(self, "\nUsage:^3 cmd ready\n");
372 sprint(self, " No arguments required.\n");
378 void ClientCommand_records(float request) // TODO: Isn't this flooding with the sprint messages? Old code, but perhaps bad?
382 case CC_REQUEST_COMMAND:
386 for(i = 0; i < 10; ++i)
387 sprint(self, records_reply[i]);
389 return; // never fall through to usage
393 case CC_REQUEST_USAGE:
395 sprint(self, "\nUsage:^3 cmd records\n");
396 sprint(self, " No arguments required.\n");
402 void ClientCommand_reportcvar(float request, float argc, string command) // TODO: confirm this works
406 case CC_REQUEST_COMMAND:
411 if(substring(argv(2), 0, 1) == "$") // undefined cvar: use the default value on the server then
413 s = strcat(substring(command, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\"");
414 tokens = tokenize_console(s);
417 return; // never fall through to usage
421 case CC_REQUEST_USAGE:
423 sprint(self, "\nUsage:^3 cmd reportcvar <cvar>\n");
424 sprint(self, " Where 'cvar' is the cvar plus arguments to send to the server.\n");
430 void ClientCommand_say(float request, float argc, string command)
434 case CC_REQUEST_COMMAND:
436 if(argc >= 2) { Say(self, FALSE, world, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1); }
437 return; // never fall through to usage
441 case CC_REQUEST_USAGE:
443 sprint(self, "\nUsage:^3 cmd say <message>\n");
444 sprint(self, " Where 'message' is the string of text to say.\n");
450 void ClientCommand_say_team(float request, float argc, string command)
454 case CC_REQUEST_COMMAND:
456 if(argc >= 2) { Say(self, TRUE, world, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1); }
457 return; // never fall through to usage
461 case CC_REQUEST_USAGE:
463 sprint(self, "\nUsage:^3 cmd say_team <message>\n");
464 sprint(self, " Where 'message' is the string of text to say.\n");
470 void ClientCommand_selectteam(float request, float argc) // TODO: Update the messages for this command
474 case CC_REQUEST_COMMAND:
478 if (self.flags & FL_CLIENT)
481 if not(self.team_forced > 0)
486 case "red": selection = COLOR_TEAM1; break;
487 case "blue": selection = COLOR_TEAM2; break;
488 case "yellow": selection = COLOR_TEAM3; break;
489 case "pink": selection = COLOR_TEAM4; break;
490 case "auto": selection = (-1); break;
497 if(self.team != selection || self.deadflag != DEAD_NO)
498 ClientKill_TeamChange(selection);
500 sprint(self, "^7You already are on that team.\n");
504 sprint(self, "^7The game has already begun, you must wait until the next map to be able to join a team.\n");
506 sprint(self, "^7selectteam can not be used as your team is forced\n");
508 sprint(self, "^7selectteam can only be used in teamgames\n");
510 return; // never fall through to usage
514 case CC_REQUEST_USAGE:
516 //sprint(self, strcat( "selectteam none/red/blue/yellow/pink/auto - \"", argv(1), "\" not recognised\n" ) );
517 sprint(self, "\nUsage:^3 cmd selectteam team\n");
518 sprint(self, " Where 'team' is the prefered team to try and join.\n");
519 sprint(self, " Full list of options here: \"red, blue, yellow, pink, auto\"\n");
525 void ClientCommand_sentcvar(float request, float argc, string command)
529 case CC_REQUEST_COMMAND:
534 if(argc == 2) // undefined cvar: use the default value on the server then
536 s = strcat(substring(command, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\"");
537 tokens = tokenize_console(s);
540 return; // never fall through to usage
544 case CC_REQUEST_USAGE:
546 sprint(self, "\nUsage:^3 cmd sentcvar <cvar>\n");
547 sprint(self, " Where 'cvar' is the cvar plus arguments to send to the server.\n");
553 void ClientCommand_spectate(float request)
557 case CC_REQUEST_COMMAND:
559 if(self.flags & FL_CLIENT)
561 if(g_arena) { return; }
564 if(self.lms_spectate_warning)
566 // mark player as spectator
567 PlayerScore_Add(self, SP_LMS_RANK, 666 - PlayerScore_Add(self, SP_LMS_RANK, 0));
571 self.lms_spectate_warning = 1;
572 sprint(self, "WARNING: you won't be able to enter the game again after spectating in LMS. Use the same command again to spectate anyway.\n");
577 if(self.classname == "player" && autocvar_sv_spectate == 1)
578 ClientKill_TeamChange(-2); // observe
580 // in CA, allow a dead player to move to spectatators (without that, caplayer!=0 will be moved back to the player list)
581 // note: if arena game mode is ever done properly, this needs to be removed.
582 if(g_ca && self.caplayer && (self.classname == "spectator" || self.classname == "observer"))
584 sprint(self, "WARNING: you will spectate in the next round.\n");
588 return; // never fall through to usage
592 case CC_REQUEST_USAGE:
594 sprint(self, "\nUsage:^3 cmd spectate\n");
595 sprint(self, " No arguments required.\n");
601 void ClientCommand_suggestmap(float request, float argc)
605 case CC_REQUEST_COMMAND:
607 sprint(self, strcat(MapVote_Suggest(argv(1)), "\n"));
608 return; // never fall through to usage
612 case CC_REQUEST_USAGE:
614 sprint(self, "\nUsage:^3 cmd suggestmap map\n");
615 sprint(self, " Where 'map' is the name of the map to suggest.\n");
621 void ClientCommand_teamstatus(float request)
625 case CC_REQUEST_COMMAND:
627 Score_NicePrint(self);
628 return; // never fall through to usage
632 case CC_REQUEST_USAGE:
634 sprint(self, "\nUsage:^3 cmd teamstatus\n");
635 sprint(self, " No arguments required.\n");
641 void ClientCommand_tell(float request, float argc, string command)
645 case CC_REQUEST_COMMAND:
647 entity e = GetCommandPlayerSlotTargetFromTokenizedCommand(argc, 1);
649 if(e && argc > ParseCommandPlayerSlotTarget_firsttoken)
651 Say(self, FALSE, e, substring(command, argv_start_index(ParseCommandPlayerSlotTarget_firsttoken), argv_end_index(-1) - argv_start_index(ParseCommandPlayerSlotTarget_firsttoken)), TRUE);
655 if(argc > ParseCommandPlayerSlotTarget_firsttoken)
656 trigger_magicear_processmessage_forallears(self, -1, world, substring(command, argv_start_index(ParseCommandPlayerSlotTarget_firsttoken), argv_end_index(-1) - argv_start_index(ParseCommandPlayerSlotTarget_firsttoken)));
658 return; // never fall through to usage
662 case CC_REQUEST_USAGE:
664 sprint(self, "\nUsage:^3 cmd tell playerid <message>\n");
665 sprint(self, " Where 'playerid' is the entity number of the player to send the 'message' to.\n");
671 void ClientCommand_timein(float request)
675 case CC_REQUEST_COMMAND:
677 if(self.flags & FL_CLIENT)
679 if(autocvar_sv_timeout)
682 return sprint(self, "^7Error: There is no active timeout which could be aborted!\n");
683 if (self != timeoutInitiator)
684 return sprint(self, "^7Error: You may not abort the active timeout. Only the player who called it can do that!\n");
686 if (timeoutStatus == 1)
688 remainingTimeoutTime = timeoutStatus = 0;
689 timeoutHandler.nextthink = time; //timeoutHandler has to take care of it immediately
690 bprint(strcat("^7The timeout was aborted by ", self.netname, " !\n"));
692 else if (timeoutStatus == 2)
694 //only shorten the remainingTimeoutTime if it makes sense
695 if( remainingTimeoutTime > (autocvar_sv_timeout_resumetime + 1) )
697 bprint(strcat("^1Attention: ^7", self.netname, " resumed the game! Prepare for battle!\n"));
698 remainingTimeoutTime = autocvar_sv_timeout_resumetime;
699 timeoutHandler.nextthink = time; //timeoutHandler has to take care of it immediately
702 sprint(self, "^7Error: Your resumegame call was discarded!\n");
706 return; // never fall through to usage
710 case CC_REQUEST_USAGE:
712 sprint(self, "\nUsage:^3 cmd timein\n");
713 sprint(self, " No arguments required.\n");
719 void ClientCommand_timeout(float request) // DEAR GOD THIS COMMAND IS TERRIBLE.
723 case CC_REQUEST_COMMAND:
725 if(self.flags & FL_CLIENT)
727 if(autocvar_sv_timeout)
729 if(self.classname == "player")
732 sprint(self, "^7Error: you can not call a timeout while a vote is active!\n");
735 if (inWarmupStage && !g_warmup_allow_timeout)
736 return sprint(self, "^7Error: You can not call a timeout in warmup-stage!\n");
737 if (time < game_starttime )
738 return sprint(self, "^7Error: You can not call a timeout while the map is being restarted!\n");
740 if (timeoutStatus != 2) {
741 //if the map uses a timelimit make sure that timeout cannot be called right before the map ends
742 if (autocvar_timelimit) {
743 //a timelimit was used
745 myTl = autocvar_timelimit;
747 float lastPossibleTimeout;
748 lastPossibleTimeout = (myTl*60) - autocvar_sv_timeout_leadtime - 1;
750 if (lastPossibleTimeout < time - game_starttime)
751 return sprint(self, "^7Error: It is too late to call a timeout now!\n");
755 //player may not call a timeout if he has no calls left
756 if (self.allowedTimeouts < 1)
757 return sprint(self, "^7Error: You already used all your timeout calls for this map!\n");
760 //now all required checks are passed
761 self.allowedTimeouts -= 1;
762 bprint(self.netname, " ^7called a timeout (", ftos(self.allowedTimeouts), " timeouts left)!\n"); //write a bprint who started the timeout (and how many he has left)
763 remainingTimeoutTime = autocvar_sv_timeout_length;
764 remainingLeadTime = autocvar_sv_timeout_leadtime;
765 timeoutInitiator = self;
766 if (timeoutStatus == 0) { //if another timeout was already active, don't change its status (which was 1 or 2) to 1, only change it to 1 if no timeout was active yet
768 //create the timeout indicator which centerprints the information to all players and takes care of pausing/unpausing
769 timeoutHandler = spawn();
770 timeoutHandler.think = timeoutHandler_Think;
772 timeoutHandler.nextthink = time; //always let the entity think asap
774 //inform all connected clients about the timeout call
775 Announce("timeoutcalled");
779 sprint(self, "^7Error: only players can call a timeout!\n");
782 return; // never fall through to usage
786 case CC_REQUEST_USAGE:
788 sprint(self, "\nUsage:^3 cmd timeout\n");
789 sprint(self, " No arguments required.\n");
795 void ClientCommand_voice(float request, float argc, string command)
799 case CC_REQUEST_COMMAND:
802 VoiceMessage(argv(1), substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)));
804 VoiceMessage(argv(1), "");
805 return; // never fall through to usage
809 case CC_REQUEST_USAGE:
811 sprint(self, "\nUsage:^3 cmd voice\n");
812 sprint(self, " FIXME ARGUMENTS UNKNOWN.\n");
818 /* use this when creating a new command, making sure to place it in alphabetical order.
819 void ClientCommand_(float request)
823 case CC_REQUEST_COMMAND:
826 return; // never fall through to usage
830 case CC_REQUEST_USAGE:
832 sprint(self, "\nUsage:^3 cmd \n");
833 sprint(self, " No arguments required.\n");
841 // =====================================
842 // Macro system for networked commands
843 // =====================================
845 // Do not hard code aliases for these, instead create them in commands.cfg... also: keep in alphabetical order, please ;)
846 #define CLIENT_COMMANDS(request,arguments,command) \
847 CLIENT_COMMAND("autoswitch", ClientCommand_autoswitch(request, arguments), "Whether or not to switch automatically when getting a better weapon") \
848 CLIENT_COMMAND("checkfail", ClientCommand_checkfail(request, command), "Report if a client-side check failed") \
849 CLIENT_COMMAND("clientversion", ClientCommand_clientversion(request, arguments), "Release version of the game") \
850 CLIENT_COMMAND("cvar_changes", ClientCommand_cvar_changes(request), "Prints a list of all changed server cvars") \
851 CLIENT_COMMAND("cvar_purechanges", ClientCommand_cvar_purechanges(request), "Prints a list of all changed gameplay cvars") \
852 CLIENT_COMMAND("info", ClientCommand_info(request, arguments), "Request for unique server information set up by admin") \
853 CLIENT_COMMAND("join", ClientCommand_join(request), "Become a player in the game") \
854 CLIENT_COMMAND("ladder", ClientCommand_ladder(request), "Get information about top players if supported") \
855 CLIENT_COMMAND("lsmaps", ClientCommand_lsmaps(request), "List maps which can be used with the current game mode") \
856 CLIENT_COMMAND("lsnewmaps", ClientCommand_lsnewmaps(request), "List maps which TODO") \
857 CLIENT_COMMAND("maplist", ClientCommand_maplist(request), "Full server maplist reply") \
858 CLIENT_COMMAND("rankings", ClientCommand_rankings(request), "Print information about rankings") \
859 CLIENT_COMMAND("ready", ClientCommand_ready(request), "Qualify as ready to end warmup stage (or restart server if allowed)") \
860 CLIENT_COMMAND("records", ClientCommand_records(request), "List top 10 records for the current map") \
861 CLIENT_COMMAND("reportcvar", ClientCommand_reportcvar(request, arguments, command), "Old system for sending a client cvar to the server") \
862 CLIENT_COMMAND("say", ClientCommand_say(request, arguments, command), "Print a message to chat to all players") \
863 CLIENT_COMMAND("say_team", ClientCommand_say_team(request, arguments, command), "Print a message to chat to all team mates") \
864 CLIENT_COMMAND("selectteam", ClientCommand_selectteam(request, arguments), "Attempt to choose a team to join into") \
865 CLIENT_COMMAND("sentcvar", ClientCommand_sentcvar(request, arguments, command), "New system for sending a client cvar to the server") \
866 CLIENT_COMMAND("spectate", ClientCommand_spectate(request), "Become an observer") \
867 CLIENT_COMMAND("suggestmap", ClientCommand_suggestmap(request, arguments), "Suggest a map to the mapvote at match end") \
868 CLIENT_COMMAND("teamstatus", ClientCommand_teamstatus(request), "Print detailed score information for all players") \
869 CLIENT_COMMAND("tell", ClientCommand_tell(request, arguments, command), "Send a message directly to a player") \
870 CLIENT_COMMAND("timein", ClientCommand_timein(request), "Resume the game from being paused with a timeout") \
871 CLIENT_COMMAND("timeout", ClientCommand_timeout(request), "Call a timeout which pauses the game for certain amount of time unless unpaused") \
872 CLIENT_COMMAND("voice", ClientCommand_voice(request, arguments, command), "Send voice message via sound") \
875 void ClientCommand_macro_help()
877 #define CLIENT_COMMAND(name,function,description) \
878 { print(" ^2", name, "^7: ", description, "\n"); }
880 CLIENT_COMMANDS(0, 0, "")
881 #undef CLIENT_COMMAND
886 float ClientCommand_macro_command(float argc, string command)
888 #define CLIENT_COMMAND(name,function,description) \
889 { if(name == strtolower(argv(0))) { function; return TRUE; } }
891 CLIENT_COMMANDS(CC_REQUEST_COMMAND, argc, command)
892 #undef CLIENT_COMMAND
897 float ClientCommand_macro_usage(float argc, string command)
899 #define CLIENT_COMMAND(name,function,description) \
900 { if(name == strtolower(argv(1))) { function; return TRUE; } }
902 CLIENT_COMMANDS(CC_REQUEST_USAGE, argc, command)
903 #undef CLIENT_COMMAND
909 // ======================================
910 // Main Function Called By Engine (cmd)
911 // ======================================
912 // If this function exists, server game code parses clientcommand before the engine code gets it.
914 void SV_ParseClientCommand(string command)
916 float argc = tokenize_console(command);
919 switch(strtolower(argv(0)))
921 // exempt commands which are not subject to floodcheck
922 case "begin": break; // handled by engine in host_cmd.c
923 case "pause": break; // handled by engine in host_cmd.c
924 case "prespawn": break; // handled by engine in host_cmd.c
925 case "reportcvar": break; // handled by server in this file
926 case "sentcvar": break; // handled by server in this file
927 case "spawn": break; // handled by engine in host_cmd.c
930 if(SV_ParseClientCommand_floodcheck())
931 break; // "TRUE": continue, as we're not flooding yet
933 return; // "FALSE": not allowed to continue, halt
936 /* NOTE: totally disabled for now, however the functionality and descriptions are there if we ever want it.
937 if(argv(0) == "help")
941 sprint(self, "\nUsage:^3 cmd COMMAND...^7, where possible commands are:\n");
942 ClientCommand_macro_help;
943 sprint(self, "For help about specific commands, type cmd help COMMAND\n");
946 else if(ClientCommand_macro_usage(argc, command)) // Instead of trying to call a command, we're going to see detailed information about it
951 else*/ if(MUTATOR_CALLHOOK(SV_ParseClientCommand))
953 return; // handled by a mutator
955 else if(GameCommand_Vote(command, self))
957 return; // handled by server/vote.qc
959 else if(GameCommand_MapVote(argv(0)))
961 return; // handled by server/g_world.qc
963 else if(CheatCommand(argc))
965 return; // handled by server/cheats.qc
967 else if(ClientCommand_macro_command(argc, command)) // continue as usual and scan for normal commands
969 return; // handled by one of the above GameCommand_* functions
972 clientcommand(self, command);