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)); });
171 FOREACH(COMMON_COMMANDS, it.m_name == c, {
172 it.m_invokecmd(it, CMD_REQUEST_COMMAND, caller, argc, command);
181 FOREACH(COMMON_COMMANDS, it.m_name == c, {
182 it.m_invokecmd(it, CMD_REQUEST_USAGE, caller, argc,
"");
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
string strtolower(string s)
#define CMD_Write_Alias(execute, command, description)
#define FOREACH(list, cond, body)
#define REGISTRY_SORT(...)
#define REGISTER_REGISTRY(id)
#define REGISTRY(id, max)
Declare a new registry.
#define REGISTRY_DEFINE_GET(id, null)
float CommonCommand_macro_usage(int argc, entity caller)
void CommonCommand_cvar_purechanges(int request, entity caller)
void CommonCommand_macro_help(entity caller)
void CommonCommand_printmaplist(int request, entity caller)
const float TIMEOUT_INACTIVE
void CommonCommand_lsmaps(int request, entity caller)
const float TIMEOUT_SLOWMO_VALUE
void CommonCommand_editmob(int request, entity caller, int argc)
void print_to(entity to, string input)
string autocvar_sv_adminnick
void timeout_handler_reset(entity this)
string GetCommandPrefix(entity caller)
void CommonCommand_records(int request, entity caller)
float CommonCommand_macro_command(int argc, entity caller, string command)
const float CLIENT_ACCEPTABLE
const float CLIENT_NOT_BOT
entity GetIndexedEntity(int argc, int start_index)
const float CLIENT_DOESNT_EXIST
bool autocvar_sv_status_privacy
int autocvar_sv_timeout_number
int VerifyClientEntity(entity client, bool must_be_real, bool must_be_bots)
string GetClientErrorString_color(int clienterror, string original_input, string col)
#define COMMON_COMMAND(id, description)
void CommonCommand_ladder(int request, entity caller)
const float TIMEOUT_ACTIVE
const float CLIENT_NOT_REAL
float autocvar_sv_timeout_leadtime
void CommonCommand_teamstatus(int request, entity caller)
void CommonCommand_timeout(int request, entity caller)
void CommonCommand_who(int request, entity caller, int argc)
float autocvar_sv_timeout_length
void timeout_handler_think(entity this)
const float TIMEOUT_LEADTIME
float autocvar_sv_timeout_resumetime
void CommonCommand_info(int request, entity caller, int argc)
bool VerifyClientNumber(int num)
void CommonCommand_timein(int request, entity caller)
void CommonCommand_macro_write_aliases(int fh)
void CommonCommand_rankings(int request, entity caller)
string GetCallerName(entity caller)
void CommonCommand_cvar_changes(int request, entity caller)
void CommonCommand_time(int request, entity caller)
int VerifyKickableEntity(entity client)
entity GetFilteredEntity(string input)
void VoteCommand(int request, entity caller, int argc, string vote_command)
#define STATIC_INIT(func)
during worldspawn