18 #define COMMON_COMMAND(id, description) \ 19 CLASS(commoncommand_##id, Command) \ 20 ATTRIB(commoncommand_##id, m_name, string, #id); \ 21 ATTRIB(commoncommand_##id, m_description, string, description); \ 22 ENDCLASS(commoncommand_##id) \ 23 REGISTER(COMMON_COMMANDS, CMD_SV, id, m_id, NEW(commoncommand_##id)); \ 24 METHOD(commoncommand_##id, m_invokecmd, void(commoncommand_##id this, int request, entity caller, int arguments, string command)) 27 FOREACH(COMMON_COMMANDS,
true, {
localcmd(sprintf(
"alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name,
"qc_cmd_svcmd")); });
87 #define GetClientErrorString(clienterror, original_input) GetClientErrorString_color(clienterror, original_input, "^7") 165 FOREACH(COMMON_COMMANDS,
true, {
print_to(caller, sprintf(
" ^2%s^7: %s", it.m_name, it.m_description)); });
170 string c = strtolower(
argv(0));
171 FOREACH(COMMON_COMMANDS, it.m_name == c, {
172 it.m_invokecmd(it, CMD_REQUEST_COMMAND, caller, argc, command);
180 string c = strtolower(
argv(1));
181 FOREACH(COMMON_COMMANDS, it.m_name == c, {
182 it.m_invokecmd(it, CMD_REQUEST_USAGE, caller, argc,
"");
void CommonCommand_info(int request, entity caller, int argc)
float VerifyClientEntity(entity client, float must_be_real, float must_be_bots)
void CommonCommand_timein(int request, entity caller)
void CommonCommand_lsmaps(int request, entity caller)
const float CLIENT_NOT_BOT
float CommonCommand_macro_usage(int argc, entity caller)
void timeout_handler_reset(entity this)
float autocvar_sv_timeout_length
void CommonCommand_ladder(int request, entity caller)
void CommonCommand_cvar_purechanges(int request, entity caller)
float autocvar_sv_timeout_leadtime
bool autocvar_sv_status_privacy
void CommonCommand_macro_help(entity caller)
float VerifyKickableEntity(entity client)
string GetCallerName(entity caller)
void CommonCommand_time(int request, entity caller)
void CommonCommand_printmaplist(int request, entity caller)
entity GetIndexedEntity(int argc, float start_index)
string autocvar_sv_adminnick
const float TIMEOUT_ACTIVE
string GetCommandPrefix(entity caller)
const float CLIENT_ACCEPTABLE
#define REGISTRY_SORT(...)
const float TIMEOUT_SLOWMO_VALUE
const float CLIENT_DOESNT_EXIST
void CommonCommand_teamstatus(int request, entity caller)
#define REGISTER_REGISTRY(id)
#define REGISTRY_DEFINE_GET(id, null)
const float TIMEOUT_INACTIVE
void CommonCommand_who(int request, entity caller, int argc)
float autocvar_sv_timeout_resumetime
int autocvar_sv_timeout_number
#define REGISTRY(id, max)
Declare a new registry.
void CommonCommand_records(int request, entity caller)
void CommonCommand_timeout(int request, entity caller)
void CommonCommand_editmob(int request, entity caller, int argc)
#define CMD_Write_Alias(execute, command, description)
string GetClientErrorString_color(float clienterror, string original_input, string col)
entity GetFilteredEntity(string input)
#define COMMON_COMMAND(id, description)
void CommonCommand_cvar_changes(int request, entity caller)
const float CLIENT_NOT_REAL
const float TIMEOUT_LEADTIME
float VerifyClientNumber(float tmp_number)
void VoteCommand(int request, entity caller, int argc, string vote_command)
void print_to(entity to, string input)
void CommonCommand_rankings(int request, entity caller)
void CommonCommand_macro_write_aliases(float fh)
#define FOREACH(list, cond, body)
void timeout_handler_think(entity this)
float CommonCommand_macro_command(int argc, entity caller, string command)