68 string original_cvar =
argv(1);
69 string tmp_string =
argv(2);
92 LOG_HELP(
"Usage:^3 ", GetProgramCommandPrefix(),
" addtolist <cvar> <value>");
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"));
166 LOG_HELP(
"Usage:^3 ", GetProgramCommandPrefix(),
" qc_curl [--key <n>] [--cvar] [--exec] <url> [<postargs>]");
172 GENERIC_COMMAND(dumpcommands,
"Dump all commands on the program to <program>_cmd_dump.txt",
false)
179 string filename =
strcat(GetProgramCommandPrefix(),
"_dump.txt");
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");
211 LOG_INFO(
"Completed dump of aliases in ^2data/data/", GetProgramCommandPrefix(),
"_dump.txt^7.");
217 LOG_INFO(
"^1Error: ^7Could not dump to file!");
225 LOG_HELP(
"Usage:^3 ", GetProgramCommandPrefix(),
" dumpcommands");
226 LOG_HELP(
" No arguments required.");
249 LOG_INFO(
"maplist: ERROR: ",
argv(2),
" does not exist!");
267 string filtered =
"";
280 for(i = 0; i < argc; ++i)
282 tmp_string =
strcat(tmp_string,
" ",
argv(i));
306 LOG_HELP(
"Usage:^3 ", GetProgramCommandPrefix(),
" maplist <action> [<map>]");
307 LOG_HELP(
" Where <action> is the command to complete,");
308 LOG_HELP(
" and <map> is what it acts upon (for the 'add' and 'remove' actions).");
309 LOG_HELP(
" Full list of commands here: add, cleanup, remove, shuffle.");
328 LOG_HELP(
"Usage:^3 ", GetProgramCommandPrefix(),
" nextframe <command>");
329 LOG_HELP(
" Where <command> will be executed next frame of this VM");
343 string original_cvar =
argv(1);
344 string removal =
argv(2);
346 string tmp_string =
"";
349 tmp_string =
cons(tmp_string, it);
352 cvar_set(original_cvar, tmp_string);
362 LOG_HELP(
"Usage:^3 ", GetProgramCommandPrefix(),
" removefromlist <cvar> <value>");
363 LOG_HELP(
" Where <cvar> is the cvar to remove <value> from.");
364 LOG_HELP(
"See also: ^2addtolist^7");
377 int NOTIF_ANNCE_COUNT = 0;
378 int NOTIF_INFO_COUNT = 0;
379 int NOTIF_CENTER_COUNT = 0;
380 int NOTIF_MULTI_COUNT = 0;
381 int NOTIF_CHOICE_COUNT = 0;
383 switch (it.nent_type)
385 case MSG_ANNCE: ++NOTIF_ANNCE_COUNT; break;
386 case MSG_INFO: ++NOTIF_INFO_COUNT; break;
387 case MSG_CENTER: ++NOTIF_CENTER_COUNT; break;
388 case MSG_MULTI: ++NOTIF_MULTI_COUNT; break;
389 case MSG_CHOICE: ++NOTIF_CHOICE_COUNT; break;
394 "Restart_Notifications(): Restarting %d notifications... " 395 "Counts: MSG_ANNCE = %d, MSG_INFO = %d, MSG_CENTER = %d, MSG_MULTI = %d, MSG_CHOICE = %d",
412 LOG_INFO(
"Notification restart command only works with cl_cmd and sv_cmd.");
420 LOG_HELP(
"Usage:^3 ", GetProgramCommandPrefix(),
" restartnotifs");
421 LOG_HELP(
" No arguments required.");
437 LOG_TRACE(
"Creating new settemp tracker for ",
argv(1),
" and setting it to \"",
argv(2),
"\" temporarily.");
439 LOG_TRACE(
"Already had a tracker for ",
argv(1),
", updating it to \"",
argv(2),
"\".");
450 LOG_HELP(
"Usage:^3 ", GetProgramCommandPrefix(),
" settemp <cvar> \"<arguments>\"");
451 LOG_HELP(
" Where <cvar> is the cvar you want to temporarily set with <arguments>.");
452 LOG_HELP(
"See also: ^2settemp_restore^7");
467 LOG_TRACE(
"Restored ",
ftos(i),
" temporary cvar settings to their original values.");
477 LOG_HELP(
"Usage:^3 ", GetProgramCommandPrefix(),
" settemp_restore");
478 LOG_HELP(
" No arguments required.");
494 for(i = 1; i < argc; ++i)
505 LOG_HELP(
"Usage:^3 ", GetProgramCommandPrefix(),
" <function>");
548 FOREACH(GENERIC_COMMANDS,
true,
LOG_HELPF(
" ^2%s^7: %s", it.m_name, it.m_description));
553 string c = strtolower(
argv(0));
554 FOREACH(GENERIC_COMMANDS, it.m_name == c, {
555 it.m_invokecmd(it, CMD_REQUEST_COMMAND, NULL, argc, command);
563 string c = strtolower(
argv(1));
564 FOREACH(GENERIC_COMMANDS, it.m_name == c, {
565 it.m_invokecmd(it, CMD_REQUEST_USAGE, NULL, argc,
"");
598 else if(argc >= 3 &&
argv(0) ==
"red")
612 for(i = 0; i < n; ++i)
629 if(s2 ==
"AH" || s2 ==
"AY")
638 s = strconv(1, 0, 0, s);
654 for(i = 0; i < n; ++i)
669 rgb =
hsl_to_rgb(
'1 0 0' * (j * i + f) +
'0 1 .5');
void GenericCommand_rpn(int request, int argc, string command)
ERASEABLE vector hsl_to_rgb(vector hsl)
void GameCommand_macro_write_aliases(float fh)
int MapInfo_RequiredFlags()
void GenericCommand_runtest(int request, int argc)
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 s2loc s1 s2 f1 f1points s1 s2
void GenericCommand_addtolist(int request, int argc)
float cvar_settemp(string tmp_cvar, string tmp_value)
const int CMD_REQUEST_USAGE
void Curl_URI_Get_Callback(int id, float status, string data)
GENERIC_COMMAND(dumpcommands, "Dump all commands on the program to <program>_cmd_dump.txt", false)
float GenericCommand(string command)
void BanCommand_macro_write_aliases(float fh)
void GenericCommand_macro_write_aliases(float fh)
int MapInfo_ForbiddenFlags()
ERASEABLE string shufflewords(string str)
void ClientCommand_macro_write_aliases(float fh)
void GenericCommand_nextframe(int request, string command)
#define FOREACH_WORD(words, cond, body)
void GenericCommand_macro_help()
void GenericCommand_removefromlist(int request, int argc)
Gametype MapInfo_CurrentGametype()
void GenericCommand_qc_curl(int request, int argc)
int MapInfo_CurrentFeatures()
string GenericCommand_markup(string s2)
float GenericCommand_macro_usage(int argc)
void GenericCommand_settemp(int request, int argc)
float GenericCommand_macro_command(int argc, string command)
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
void Destroy_All_Notifications()
const int CMD_REQUEST_COMMAND
#define CMD_Write_Alias(execute, command, description)
float MapInfo_CheckMap(string s)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
void GenericCommand_restartnotifs(int request)
const int URI_GET_CURL_END
#define tokenizebyseparator
void GenericCommand_settemp_restore(int request)
ERASEABLE string rgb_to_hexcolor(vector rgb)
void GenericCommand_maplist(int request, int argc)
ERASEABLE string cons(string a, string b)
#define CALL_ACCUMULATED_FUNCTION(func)
int cvar_settemp_restore()
float curl_uri_get_exec[URI_GET_CURL_END - URI_GET_CURL+1]
float MapInfo_FilterGametype(Gametype pGametype, int pFeatures, int pFlagsRequired, int pFlagsForbidden, bool pAbortOnGenerate)
void CommonCommand_macro_write_aliases(float fh)
ERASEABLE bool fexists(string f)
#define FOREACH(list, cond, body)
void queue_to_execute_next_frame(string s)
string curl_uri_get_cvar[URI_GET_CURL_END - URI_GET_CURL+1]
void LocalCommand_macro_write_aliases(int fh)