// =========================================================
// Server side networked commands code, reworked by Samual
-// Last updated: December 11th, 2011
+// Last updated: December 13th, 2011
// =========================================================
-// move any necessary sprint statements to "print_to"
+// declarations in cmd.qh
-// ============================
-// Misc. Supporting Functions
-// ============================
+// move any necessary sprint statements to "print_to"
float SV_ParseClientCommand_floodcheck()
{
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
self.autoswitch = ("0" != argv(1));
sprint(self, strcat("^1autoswitch is currently turned ", (self.autoswitch ? "on" : "off"), ".\n"));
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd autoswitch selection\n");
sprint(self, " Where 'selection' is 1 or 0 for on or off.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
print(sprintf("CHECKFAIL: %s (%s) epically failed check %s\n", self.netname, self.netaddress, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1))));
self.checkfail = 1;
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd checkfail message\n");
sprint(self, " Where 'message' is the message reported by client about the fail.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(self.flags & FL_CLIENT)
{
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd clientversion version\n");
sprint(self, " Where 'version' is the game version reported by self.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
sprint(self, cvar_changes);
return; // never fall through to usage
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 sv_cmd cvar_changes\n");
sprint(self, " No arguments required.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
sprint(self, cvar_purechanges);
return; // never fall through to usage
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 sv_cmd cvar_purechanges\n");
sprint(self, " No arguments required.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(intermission_running)
MapVote_SendPicture(stof(argv(1)));
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd getmapvotepic mapid\n");
sprint(self, " Where 'mapid' is the id number of the map to request an image of on the map vote selection menu.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
string command;
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd info request\n");
sprint(self, " Where 'request' is the suffixed string appended onto the request for cvar.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(self.flags & FL_CLIENT)
{
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd join\n");
sprint(self, " No arguments required.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
sprint(self, ladder_reply);
return; // never fall through to usage
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd ladder\n");
sprint(self, " No arguments required.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
sprint(self, lsmaps_reply);
return; // never fall through to usage
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd lsmaps\n");
sprint(self, " No arguments required.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
sprint(self, lsnewmaps_reply);
return; // never fall through to usage
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd lsnewmaps\n");
sprint(self, " No arguments required.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
sprint(self, maplist_reply);
return; // never fall through to usage
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd maplist\n");
sprint(self, " No arguments required.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
sprint(self, rankings_reply);
return; // never fall through to usage
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd rankings\n");
sprint(self, " No arguments required.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(self.flags & FL_CLIENT)
{
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd ready\n");
sprint(self, " No arguments required.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
float i;
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd records\n");
sprint(self, " No arguments required.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
float tokens;
string s;
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd reportcvar <cvar>\n");
sprint(self, " Where 'cvar' is the cvar plus arguments to send to the server.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(argc >= 2) { Say(self, FALSE, world, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1); }
return; // never fall through to usage
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd say <message>\n");
sprint(self, " Where 'message' is the string of text to say.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(argc >= 2) { Say(self, TRUE, world, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1); }
return; // never fall through to usage
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd say_team <message>\n");
sprint(self, " Where 'message' is the string of text to say.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
float selection;
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
//sprint(self, strcat( "selectteam none/red/blue/yellow/pink/auto - \"", argv(1), "\" not recognised\n" ) );
sprint(self, "\nUsage:^3 cmd selectteam team\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
stuffcmd(self, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)));
return; // never fall through to usage
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd selfstuff command\n");
sprint(self, " Where 'command' is the string to be stuffed to your client.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
float tokens;
string s;
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd sentcvar <cvar>\n");
sprint(self, " Where 'cvar' is the cvar plus arguments to send to the server.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(self.flags & FL_CLIENT)
{
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd spectate\n");
sprint(self, " No arguments required.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
sprint(self, strcat(MapVote_Suggest(argv(1)), "\n"));
return; // never fall through to usage
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd suggestmap map\n");
sprint(self, " Where 'map' is the name of the map to suggest.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
Score_NicePrint(self);
return; // never fall through to usage
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd teamstatus\n");
sprint(self, " No arguments required.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
entity e = GetCommandPlayerSlotTargetFromTokenizedCommand(argc, 1);
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd tell playerid <message>\n");
sprint(self, " Where 'playerid' is the entity number of the player to send the 'message' to.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(self.flags & FL_CLIENT)
{
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd timein\n");
sprint(self, " No arguments required.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(self.flags & FL_CLIENT)
{
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd timeout\n");
sprint(self, " No arguments required.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(argc >= 3)
VoiceMessage(argv(1), substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)));
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd voice\n");
sprint(self, " FIXME ARGUMENTS UNKNOWN.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
float total_listed_players, tmp_hours, tmp_minutes, tmp_seconds;
entity tmp_player;
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd who\n");
sprint(self, " No arguments required.\n");
{
switch(request)
{
- case CC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
return; // never fall through to usage
}
default:
- case CC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd \n");
sprint(self, " No arguments required.\n");
#define CLIENT_COMMAND(name,function,description) \
{ if(name == strtolower(argv(0))) { function; return TRUE; } }
- CLIENT_COMMANDS(CC_REQUEST_COMMAND, argc, command)
+ CLIENT_COMMANDS(CMD_REQUEST_COMMAND, argc, command)
#undef CLIENT_COMMAND
return FALSE;
#define CLIENT_COMMAND(name,function,description) \
{ if(name == strtolower(argv(1))) { function; return TRUE; } }
- CLIENT_COMMANDS(CC_REQUEST_USAGE, argc, command)
+ CLIENT_COMMANDS(CMD_REQUEST_USAGE, argc, command)
#undef CLIENT_COMMAND
return FALSE;
// Last updated: December 11th, 2011
// =========================================================
-#define CC_REQUEST_COMMAND 1
-#define CC_REQUEST_USAGE 2
-
.float cmd_floodtime;
.float cmd_floodcount;
.float checkfail;
// Last updated: December 6th, 2011
// =====================================================
+// declarations in sv_cmd.qh
+
// ============================
// Misc. Supporting Functions
// ============================
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
entity client;
float entno = stof(argv(1));
default:
print("Incorrect parameters for ^2adminmsg^7\n");
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd adminmsg clientnumber \"message\" [infobartime]\n");
print(" If infobartime is provided, the message will be sent to infobar.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
ReadyRestart();
return;
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd allready\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
entity client;
string reason = argv(1);
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd allspec [reason]\n");
print(" Where 'reason' is an optional argument for explanation of allspec command.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
entity client;
float entno = stof(argv(1));
default:
print("Incorrect parameters for ^2anticheat^7\n");
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd anticheat clientnumber\n");
print(" where 'clientnumber' is player entity number.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
print("Original size: ", ftos(world.absmin_x), " ", ftos(world.absmin_y), " ", ftos(world.absmin_z));
print(" ", ftos(world.absmax_x), " ", ftos(world.absmax_y), " ", ftos(world.absmax_z), "\n");
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd bbox\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
entity bot;
default:
print("Incorrect parameters for ^2bot_cmd^7\n");
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd bot_cmd client command [argument]\n");
print(" 'client' can be either the name or entity id of the bot\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
entity client;
string result1 = (argv(2) ? strcat("^7", argv(1), "^3!\n") : "^1HEADS^3!\n");
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd cointoss [result1 result2]\n");
print(" Where 'result1' and 'result2' are user created options.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
print(cvar_changes);
return;
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd cvar_changes\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
print(cvar_purechanges);
return;
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd cvar_purechanges\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(argc == 3)
{
default:
print("Incorrect parameters for ^2database^7\n");
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd database action filename\n");
print(" Where 'action' is the command to complete,\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
entity client;
float entno = stof(argv(1));
default:
print("Incorrect parameters for ^2defer_clear^7\n");
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd defer_clear clientnumber\n");
print(" where 'clientnumber' is player entity number.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
entity client;
float i;
FOR_EACH_CLIENT(client)
{
argc = tokenize_console(strcat("defer_clear ", ftos(num_for_edict(client))));
- GameCommand_defer_clear(GC_REQUEST_COMMAND, argc);
+ GameCommand_defer_clear(CMD_REQUEST_COMMAND, argc);
++i;
}
if(i) { print(strcat("Successfully stuffed defer clear to all clients (", ftos(i), ")\n")); } // should a message be added if no players were found?
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd defer_clear_all\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(argv(1))
{
default:
print("Incorrect parameters for ^2delrec^7\n");
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd delrec ranking [map]\n");
print(" 'ranking' is which ranking level to clear up to, \n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
float fh, d;
string s;
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd effectindexdump\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
changematchtime(autocvar_timelimit_increment* 60, autocvar_timelimit_min*60, autocvar_timelimit_max*60);
return;
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd extendmatchtime\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
entity client;
default:
print("Incorrect parameters for ^2find^7\n");
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd find classname\n");
print(" Where 'classname' is the classname to search for.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
string s = argv(1);
float t = MapInfo_Type_FromString(s), tsave = MapInfo_CurrentGametype();
default:
print("Incorrect parameters for ^2gametype^7\n");
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd gametype mode\n");
print(" Where 'mode' is the gametype mode to switch to.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
entity tmp_entity;
float i;
default:
print("Incorrect parameters for ^2gettaginfo^7\n");
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd gettaginfo\n");
print(" FIXME: Arguments currently unknown\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(argc == 2)
{
default:
print("Incorrect parameters for ^2gotomap^7\n");
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd gotomap map\n");
print(" Where 'map' is the *.bsp file to change to.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
print(ladder_reply);
return;
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd ladder\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(teamplay)
{
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd lockteams\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
entity tmp_entity;
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd make_mapinfo\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
modelbug();
return;
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd modelbug\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
entity client;
default:
print("Incorrect parameters for ^2moveplayer^7\n");
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd moveplayer clientnumbers destination [notify]\n");
print(" 'clientnumbers' is a list (separated by commas) of player entity ID's\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
blockSpectators = 1;
entity plr;
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd nospectators\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
onslaught_updatelinks();
print("ONS links updated\n");
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd onslaught_updatelinks\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
entity client;
float i, n, entno;
default:
print("Incorrect parameters for ^2radarmap^7\n");
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd \n");
print(" FIXME: Arguments currently unknown\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
DumpStats(FALSE);
print("stats dumped.\n");
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd printstats\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(RadarMap_Make(argc))
return;
default:
print("Incorrect parameters for ^2radarmap^7\n");
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd radarmap [--force] [--loop] [--quit] [--block | --trace | --sample | --lineblock] [--sharpen N] [--res W H] [--qual Q]\n");
print(" The quality factor Q is roughly proportional to the time taken.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
strunzone(rankings_reply);
rankings_reply = strzone(getrankings());
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd rankings\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
float i;
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd records\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
changematchtime(autocvar_timelimit_decrement*-60, autocvar_timelimit_min*60, autocvar_timelimit_max*60);
return;
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd reducematchtime\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(argc >= 2)
{
default:
print("Incorrect parameters for ^2setbots^7\n");
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd setbots botnumber\n");
print(" Where 'botnumber' is the amount of bots to set bot_number cvar to.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(teamplay)
{
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd shuffleteams\n");
print(" No arguments required.\n");
#ifdef STUFFTO_ENABLED
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
entity client;
float entno;
default:
print("Incorrect parameters for ^2stuffto^7\n");
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd stuffto clientnumber command\n");
print(" FIXME: Arguments currently unknown\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
Score_NicePrint(world);
return;
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd teamstatus\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
print("time = ", ftos(time), "\n");
print("frame start = ", ftos(gettime(GETTIME_FRAMESTART)), "\n");
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd time\n");
print(" No arguments required.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
// TODO: Clean up all of these variables and merge the code below to use only a few
entity e;
default:
print("Incorrect parameters for ^2trace^7\n");
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd trace command [arguments]\n");
print(" FIXME: Arguments currently unknown\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(teamplay)
{
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd unlockteams\n");
print(" No arguments required.\n");
{
switch (request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(autocvar_g_campaign)
{
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd level\n");
print(" 'level' is the level to change campaign mode to.\n");
{
switch(request)
{
- case GC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
return;
}
default:
- case GC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 sv_cmd \n");
print(" No arguments required.\n");
#define SERVER_COMMAND(name,function,description) \
{ if(name == strtolower(argv(0))) { function; return TRUE; } }
- SERVER_COMMANDS(GC_REQUEST_COMMAND, argc, command)
+ SERVER_COMMANDS(CMD_REQUEST_COMMAND, argc, command)
#undef SERVER_COMMAND
return FALSE;
#define SERVER_COMMAND(name,function,description) \
{ if(name == strtolower(argv(1))) { function; return TRUE; } }
- SERVER_COMMANDS(GC_REQUEST_USAGE, argc, "")
+ SERVER_COMMANDS(CMD_REQUEST_USAGE, argc, "")
#undef SERVER_COMMAND
return FALSE;
// Last updated: December 6th, 2011
// =====================================================
-#define GC_REQUEST_COMMAND 1
-#define GC_REQUEST_USAGE 2
-
float RadarMap_Make(float argc);
string GotoMap(string m);
// Last updated: December 10th, 2011
// =============================================
+// declarations in vote.qh
+
// =============================================
// Nagger for players to know status of voting
// =============================================
{
switch(request)
{
- case VC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if not(votecalled) { print_to(caller, "^1No vote called."); }
else if not(caller.vote_selection == VOTE_SELECT_NULL || autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
}
default:
- case VC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 vote abstain\n");
print(" No arguments required.\n");
{
switch(request)
{
- case VC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
float spectators_allowed = ((autocvar_sv_vote_nospectators != 2)
|| ((autocvar_sv_vote_nospectators == 1) && inWarmupStage)
}
default:
- case VC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 vote call\n");
print(" TODO.\n");
{
switch(request)
{
- case VC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(autocvar_sv_vote_master)
{
}
default:
- case VC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 vote master action [arguments]\n");
print(" TODO.\n");
{
switch(request)
{
- case VC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if not(votecalled) { print_to(caller, "^1No vote called."); }
else if not(caller.vote_selection == VOTE_SELECT_NULL || autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
}
default:
- case VC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 vote no\n");
print(" No arguments required.\n");
{
switch(request)
{
- case VC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(votecalled)
print_to(caller, strcat("^7Vote for ", votecalledvote_display, "^7 called by ^7", VoteCommand_getname(votecaller), "^7."));
}
default:
- case VC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 vote status\n");
print(" No arguments required.\n");
{
switch(request)
{
- case VC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if not(votecalled) { print_to(caller, "^1No vote called."); }
else if((caller == votecaller) || !caller || caller.vote_master) { VoteStop(caller); }
}
default:
- case VC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 vote stop\n");
print(" No arguments required.\n");
{
switch(request)
{
- case VC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if not(votecalled) { print_to(caller, "^1No vote called."); }
if not(caller.vote_selection == VOTE_SELECT_NULL || autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
}
default:
- case VC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 vote yes\n");
print(" No arguments required.\n");
{
switch(request)
{
- case VC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
return;
}
default:
- case VC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
print("\nUsage:^3 vote \n");
print(" No arguments required.\n");
#define VOTE_COMMAND(name,function,description,assignment) \
{ if(Votecommand_check_assignment(caller, assignment)) { if(name == strtolower(argv(2))) { function; return; } } }
- VOTE_COMMANDS(VC_REQUEST_USAGE, caller, argc, "")
+ VOTE_COMMANDS(CMD_REQUEST_USAGE, caller, argc, "")
#undef VOTE_COMMAND
}
#define VOTE_COMMAND(name,function,description,assignment) \
{ if(Votecommand_check_assignment(caller, assignment)) { if(name == strtolower(argv(1))) { function; return TRUE; } } }
- VOTE_COMMANDS(VC_REQUEST_COMMAND, caller, argc, vote_command)
+ VOTE_COMMANDS(CMD_REQUEST_COMMAND, caller, argc, vote_command)
#undef VOTE_COMMAND
return FALSE;
switch(request)
{
- case VC_REQUEST_COMMAND:
+ case CMD_REQUEST_COMMAND:
{
if(VoteCommand_macro_command(caller, argc, vote_command))
return;
default:
print_to(caller, strcat("Unknown vote command", ((argv(1) != "") ? strcat(" \"", argv(1), "\"") : ""), ". For a list of supported commands, try ", VoteCommand_getprefix(caller), " help.\n"));
- case VC_REQUEST_USAGE:
+ case CMD_REQUEST_USAGE:
{
VoteCommand_macro_help(caller, argc);
return;
-#define VC_REQUEST_COMMAND 1
-#define VC_REQUEST_USAGE 2
-
#define VC_ASGNMNT_BOTH 1
#define VC_ASGNMNT_CLIENTONLY 2
#define VC_ASGNMNT_SERVERONLY 3
../common/mapinfo.qc
-
-
-
t_quake3.qc
t_halflife.qc
t_quake.qc