+*/
+
+
+// ==================================
+// Macro system for common commands
+// ==================================
+
+// Do not hard code aliases for these, instead create them in commands.cfg... also: keep in alphabetical order, please ;)
+#define COMMON_COMMANDS(request,arguments,command) \
+ COMMON_COMMAND("cvar_changes", CommonCommand_cvar_changes(request, world), "Prints a list of all changed server cvars") \
+ COMMON_COMMAND("cvar_purechanges", CommonCommand_cvar_purechanges(request, world), "Prints a list of all changed gameplay cvars") \
+ COMMON_COMMAND("info", CommonCommand_info(request, world, arguments), "Request for unique server information set up by admin") \
+ COMMON_COMMAND("ladder", CommonCommand_ladder(request, world), "Get information about top players if supported") \
+ COMMON_COMMAND("lsmaps", CommonCommand_lsmaps(request, world), "List maps which can be used with the current game mode") \
+ COMMON_COMMAND("lsnewmaps", CommonCommand_lsnewmaps(request, world), "List maps which have no records or are seemingly unplayed yet") \
+ COMMON_COMMAND("maplist", CommonCommand_maplist(request, world), "Display full server maplist reply") \
+ COMMON_COMMAND("rankings", CommonCommand_rankings(request, world), "Print information about rankings") \
+ COMMON_COMMAND("records", CommonCommand_records(request, world), "List top 10 records for the current map") \
+ COMMON_COMMAND("teamstatus", CommonCommand_teamstatus(request, world), "Show information about player and team scores") \
+ COMMON_COMMAND("time", CommonCommand_time(request, world), "Print different formats/readouts of time") \
+ COMMON_COMMAND("timein", CommonCommand_timein(request, world), "Resume the game from being paused with a timeout") \
+ COMMON_COMMAND("timeout", CommonCommand_timeout(request, world), "Call a timeout which pauses the game for certain amount of time unless unpaused") \
+ COMMON_COMMAND("vote", VoteCommand(request, world, arguments, command), "Request an action to be voted upon by players") \
+ COMMON_COMMAND("who", CommonCommand_who(request, world, arguments), "Display detailed client information about all players") \
+ /* nothing */
+
+void CommonCommand_macro_help()
+{
+ #define COMMON_COMMAND(name,function,description) \
+ { print(" ^2", name, "^7: ", description, "\n"); }
+
+ COMMON_COMMANDS(0, 0, "")
+ #undef COMMON_COMMAND
+
+ return;
+}
+
+float CommonCommand_macro_command(float argc, string command)
+{
+ #define COMMON_COMMAND(name,function,description) \
+ { if(name == strtolower(argv(0))) { function; return TRUE; } }
+
+ COMMON_COMMANDS(CMD_REQUEST_COMMAND, argc, command)
+ #undef COMMON_COMMAND
+
+ return FALSE;
+}
+
+float CommonCommand_macro_usage(float argc)
+{
+ #define COMMON_COMMAND(name,function,description) \
+ { if(name == strtolower(argv(1))) { function; return TRUE; } }
+
+ COMMON_COMMANDS(CMD_REQUEST_USAGE, argc, "")
+ #undef COMMON_COMMAND
+
+ return FALSE;
+}