68 string original_cvar =
argv(1);
69 string tmp_string =
argv(2);
93 LOG_HELP(
" Where <cvar> is the cvar to add <value> to.");
94 LOG_HELP(
"See also: ^2removefromlist^7");
106 bool do_exec =
false;
110 for(i = 1; i+1 < argc; ++i)
112 if(
argv(i) ==
"--cvar" && i+2 < argc)
118 if(
argv(i) ==
"--exec")
123 if(
argv(i) ==
"--key" && i+2 < argc)
134 string url =
argv(i);
138 for(j = 0; i+1 < argc; i += 2)
139 bufstr_set(buf, ++j, sprintf(
"%s=%s", uri_escape(
argv(i)), uri_escape(
argv(i+1))));
141 bufstr_set(buf, ++j, sprintf(
"submit=%s", uri_escape(
argv(i))));
156 LOG_INFO(_(
"error creating curl handle"));
172GENERIC_COMMAND(dumpcommands,
"Dump all commands on the program to <program>_cmd_dump.txt",
false)
185 CMD_Write(
"dump of server console commands:\n");
189 CMD_Write(
"dump of networked client only commands:\n");
208 CMD_Write(
"dump of generic commands:\n");
217 LOG_INFO(
"^1Error: ^7Could not dump to file!");
226 LOG_HELP(
" No arguments required.");
241 bufstr_set(buf, _cnt, bufstr_get(buf, _j));
242 bufstr_set(buf, _j, it);
246 string output = buf_implode(buf,
" ");
268 LOG_INFO(
"maplist: ERROR: ",
argv(2),
" does not exist!");
286 string filtered =
"";
297 string del_map_name =
argv(2);
301 for(i = 0; i < argc; ++i)
302 if(
argv(i) != del_map_name)
303 tmp_string =
strcat(tmp_string,
" ",
argv(i));
328 LOG_HELP(
" Where <action> is the command to complete,");
329 LOG_HELP(
" and <map> is what it acts upon (for the 'add' and 'remove' actions).");
330 LOG_HELP(
" Full list of commands here: add, cleanup, remove, shuffle.");
350 LOG_HELP(
" Where <command> will be executed next frame of this VM");
364 string original_cvar =
argv(1);
365 string removal =
argv(2);
367 string tmp_string =
"";
370 tmp_string =
cons(tmp_string, it);
373 cvar_set(original_cvar, tmp_string);
384 LOG_HELP(
" Where <cvar> is the cvar to remove <value> from.");
385 LOG_HELP(
"See also: ^2addtolist^7");
398 int NOTIF_ANNCE_COUNT = 0;
399 int NOTIF_INFO_COUNT = 0;
400 int NOTIF_CENTER_COUNT = 0;
401 int NOTIF_MULTI_COUNT = 0;
402 int NOTIF_CHOICE_COUNT = 0;
404 switch (it.nent_type)
406 case MSG_ANNCE: ++NOTIF_ANNCE_COUNT;
break;
407 case MSG_INFO: ++NOTIF_INFO_COUNT;
break;
408 case MSG_CENTER: ++NOTIF_CENTER_COUNT;
break;
409 case MSG_MULTI: ++NOTIF_MULTI_COUNT;
break;
410 case MSG_CHOICE: ++NOTIF_CHOICE_COUNT;
break;
415 "Restart_Notifications(): Restarting %d notifications... "
416 "Counts: MSG_ANNCE = %d, MSG_INFO = %d, MSG_CENTER = %d, MSG_MULTI = %d, MSG_CHOICE = %d",
433 LOG_INFO(
"Notification restart command only works with cl_cmd and sv_cmd.");
442 LOG_HELP(
" No arguments required.");
458 LOG_TRACE(
"Creating new settemp tracker for ",
argv(1),
" and setting it to \"",
argv(2),
"\" temporarily.");
460 LOG_TRACE(
"Already had a tracker for ",
argv(1),
", updating it to \"",
argv(2),
"\".");
472 LOG_HELP(
" Where <cvar> is the cvar you want to temporarily set with <arguments>.");
473 LOG_HELP(
"See also: ^2settemp_restore^7");
488 LOG_TRACE(
"Restored ",
ftos(i),
" temporary cvar settings to their original values.");
499 LOG_HELP(
" No arguments required.");
515 for(i = 1; i < argc; ++i)
569 FOREACH(GENERIC_COMMANDS,
true,
LOG_HELPF(
" ^2%s^7: %s", it.m_name, it.m_description));
575 FOREACH(GENERIC_COMMANDS, it.m_name == c, {
576 it.m_invokecmd(it, CMD_REQUEST_COMMAND, NULL, argc, command);
585 FOREACH(GENERIC_COMMANDS, it.m_name == c, {
586 it.m_invokecmd(it, CMD_REQUEST_USAGE, NULL, argc,
"");
619 else if(argc >= 3 &&
argv(0) ==
"red")
633 for(i = 0; i < n; ++i)
650 if(
s2 ==
"AH" ||
s2 ==
"AY")
659 s = strconv(1, 0, 0, s);
675 for(i = 0; i < n; ++i)
690 rgb =
hsl_to_rgb(
'1 0 0' * (j * i + f) +
'0 1 .5');
#define CALL_ACCUMULATED_FUNCTION(func)
void BanCommand_macro_write_aliases(float fh)
void LocalCommand_macro_write_aliases(int fh)
void ClientCommand_macro_write_aliases(float fh)
ERASEABLE string rgb_to_hexcolor(vector rgb)
ERASEABLE vector hsl_to_rgb(vector hsl)
const int CMD_REQUEST_COMMAND
const int CMD_REQUEST_USAGE
#define GENERIC_COMMAND(id, description, menubased)
void queue_to_execute_next_frame(string s)
int cvar_settemp_restore()
float cvar_settemp(string tmp_cvar, string tmp_value)
string strtolower(string s)
#define tokenizebyseparator
ERASEABLE bool fexists(string f)
void GenericCommand_restartnotifs(int request)
void GenericCommand_addtolist(int request, int argc)
void GenericCommand_removefromlist(int request, int argc)
void GenericCommand_macro_write_aliases(float fh)
void GenericCommand_nextframe(int request, string command)
void GenericCommand_runtest(int request, int argc)
string maplist_shuffle(string input)
void GenericCommand_qc_curl(int request, int argc)
float GenericCommand_macro_usage(int argc)
float GenericCommand_macro_command(int argc, string command)
void Curl_URI_Get_Callback(int id, float status, string data)
void GenericCommand_settemp(int request, int argc)
void GenericCommand_settemp_restore(int request)
void GenericCommand_maplist(int request, int argc)
void GenericCommand_macro_help()
float GenericCommand(string command)
string curl_uri_get_cvar[URI_GET_CURL_END - URI_GET_CURL+1]
#define CMD_Write_Alias(execute, command, description)
#define GetProgramCommandPrefix()
float curl_uri_get_exec[URI_GET_CURL_END - URI_GET_CURL+1]
#define FOREACH_WORD(words, cond, body)
#define FOREACH(list, cond, body)
float MapInfo_CheckMap(string s)
float MapInfo_FilterGametype(Gametype pGametype, int pFeatures, int pFlagsRequired, int pFlagsForbidden, bool pAbortOnGenerate)
int MapInfo_RequiredFlags()
Gametype MapInfo_CurrentGametype()
int MapInfo_ForbiddenFlags()
int MapInfo_CurrentFeatures()
string GenericCommand_markup(string s2)
spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2 f1points s1 s2
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
void Destroy_All_Notifications()
void GenericCommand_rpn(int request, int argc, string command)
void CommonCommand_macro_write_aliases(int fh)
ERASEABLE string cons(string a, string b)
void GameCommand_macro_write_aliases(float fh)
const int URI_GET_CURL_END