#define COMMON_COMMAND(id, description) \
CLASS(commoncommand_##id, Command) \
ATTRIB(commoncommand_##id, m_name, string, #id); \
- ATTRIB(commoncommand_##id, m_description, string, description); \
+ ATTRIB(commoncommand_##id, m_description, string, description); \
ENDCLASS(commoncommand_##id) \
- REGISTER(COMMON_COMMANDS, CMD_SV, id, m_id, NEW(commoncommand_##id)); \
+ REGISTER(COMMON_COMMANDS, CMD_SV, id, m_id, NEW(commoncommand_##id)); \
METHOD(commoncommand_##id, m_invokecmd, void(commoncommand_##id this, int request, entity caller, int arguments, string command))
-STATIC_INIT(COMMON_COMMANDS_aliases) {
- FOREACH(COMMON_COMMANDS, true, { localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_svcmd")); });
+STATIC_INIT(COMMON_COMMANDS_aliases)
+{
+ FOREACH(COMMON_COMMANDS, true, { localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_svcmd"));
+ });
}
#include "vote.qh"
// ==================================
// Do not hard code aliases for these, instead create them in commands.cfg... also: keep in alphabetical order, please ;)
-COMMON_COMMAND(cvar_changes, "Prints a list of all changed server cvars") { CommonCommand_cvar_changes(request, caller); }
-COMMON_COMMAND(cvar_purechanges, "Prints a list of all changed gameplay cvars") { CommonCommand_cvar_purechanges(request, caller); }
-COMMON_COMMAND(editmob, "Modifies a monster or all monsters") { CommonCommand_editmob(request, caller, arguments); }
-COMMON_COMMAND(info, "Request for unique server information set up by admin") { CommonCommand_info(request, caller, arguments); }
-COMMON_COMMAND(ladder, "Get information about top players if supported") { CommonCommand_ladder(request, caller); }
-COMMON_COMMAND(lsmaps, "List maps which can be used with the current game mode") { CommonCommand_lsmaps(request, caller); }
-COMMON_COMMAND(printmaplist, "Display full server maplist reply") { CommonCommand_printmaplist(request, caller); }
-COMMON_COMMAND(rankings, "Print information about rankings") { CommonCommand_rankings(request, caller); }
-COMMON_COMMAND(records, "List top 10 records for the current map") { CommonCommand_records(request, caller); }
-COMMON_COMMAND(teamstatus, "Show information about player and team scores") { CommonCommand_teamstatus(request, caller); }
-COMMON_COMMAND(time, "Print different formats/readouts of time") { CommonCommand_time(request, caller); }
-COMMON_COMMAND(timein, "Resume the game from being paused with a timeout") { CommonCommand_timein(request, caller); }
-COMMON_COMMAND(timeout, "Call a timeout which pauses the game for certain amount of time unless unpaused") { CommonCommand_timeout(request, caller); }
-COMMON_COMMAND(vote, "Request an action to be voted upon by players") { VoteCommand(request, caller, arguments, command); }
-COMMON_COMMAND(who, "Display detailed client information about all players") { CommonCommand_who(request, caller, arguments);}
+COMMON_COMMAND(cvar_changes, "Prints a list of all changed server cvars")
+{
+ CommonCommand_cvar_changes(request, caller);
+}
+COMMON_COMMAND(cvar_purechanges, "Prints a list of all changed gameplay cvars")
+{
+ CommonCommand_cvar_purechanges(request, caller);
+}
+COMMON_COMMAND(editmob, "Modifies a monster or all monsters")
+{
+ CommonCommand_editmob(request, caller, arguments);
+}
+COMMON_COMMAND(info, "Request for unique server information set up by admin")
+{
+ CommonCommand_info(request, caller, arguments);
+}
+COMMON_COMMAND(ladder, "Get information about top players if supported")
+{
+ CommonCommand_ladder(request, caller);
+}
+COMMON_COMMAND(lsmaps, "List maps which can be used with the current game mode")
+{
+ CommonCommand_lsmaps(request, caller);
+}
+COMMON_COMMAND(printmaplist, "Display full server maplist reply")
+{
+ CommonCommand_printmaplist(request, caller);
+}
+COMMON_COMMAND(rankings, "Print information about rankings")
+{
+ CommonCommand_rankings(request, caller);
+}
+COMMON_COMMAND(records, "List top 10 records for the current map")
+{
+ CommonCommand_records(request, caller);
+}
+COMMON_COMMAND(teamstatus, "Show information about player and team scores")
+{
+ CommonCommand_teamstatus(request, caller);
+}
+COMMON_COMMAND(time, "Print different formats/readouts of time")
+{
+ CommonCommand_time(request, caller);
+}
+COMMON_COMMAND(timein, "Resume the game from being paused with a timeout")
+{
+ CommonCommand_timein(request, caller);
+}
+COMMON_COMMAND(timeout, "Call a timeout which pauses the game for certain amount of time unless unpaused")
+{
+ CommonCommand_timeout(request, caller);
+}
+COMMON_COMMAND(vote, "Request an action to be voted upon by players")
+{
+ VoteCommand(request, caller, arguments, command);
+}
+COMMON_COMMAND(who, "Display detailed client information about all players")
+{
+ CommonCommand_who(request, caller, arguments);
+}
void CommonCommand_macro_help(entity caller)
{
- FOREACH(COMMON_COMMANDS, true, { print_to(caller, sprintf(" ^2%s^7: %s", it.m_name, it.m_description)); });
+ FOREACH(COMMON_COMMANDS, true, { print_to(caller, sprintf(" ^2%s^7: %s", it.m_name, it.m_description));
+ });
}
float CommonCommand_macro_command(float argc, entity caller, string command)
void CommonCommand_macro_write_aliases(float fh)
{
- FOREACH(COMMON_COMMANDS, true, { CMD_Write_Alias("qc_cmd_svcmd", it.m_name, it.m_description); });
+ FOREACH(COMMON_COMMANDS, true, { CMD_Write_Alias("qc_cmd_svcmd", it.m_name, it.m_description);
+ });
}