From 3981d04edeb44609c738d08276403daf2760a0f4 Mon Sep 17 00:00:00 2001 From: Samual Date: Sun, 25 Dec 2011 23:01:00 -0500 Subject: [PATCH] Much more work towards finishing the commands (taking care of todos, etc etc) --- qcsrc/server/command/cmd.qc | 24 ++++++++++++------------ qcsrc/server/command/common.qc | 9 +++++---- qcsrc/server/command/sv_cmd.qc | 26 +++++++++++++------------- qcsrc/server/command/sv_cmd.qh | 4 +--- 4 files changed, 31 insertions(+), 32 deletions(-) diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index d5181ae41..eae5deaa6 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -1,6 +1,6 @@ // ========================================================= // Server side networked commands code, reworked by Samual -// Last updated: December 13th, 2011 +// Last updated: December 25th, 2011 // ========================================================= float SV_ParseClientCommand_floodcheck() @@ -47,7 +47,7 @@ void ClientCommand_autoswitch(float request, float argc) } } -void ClientCommand_checkfail(float request, string command) // used only by client side code +void ClientCommand_checkfail(float request, string command) // internal command, used only by code { switch(request) { @@ -68,7 +68,7 @@ void ClientCommand_checkfail(float request, string command) // used only by clie } } -void ClientCommand_clientversion(float request, float argc) // used only by client side code +void ClientCommand_clientversion(float request, float argc) // internal command, used only by code { switch(request) { @@ -106,7 +106,7 @@ void ClientCommand_clientversion(float request, float argc) // used only by clie } } -void ClientCommand_getmapvotepic(float request, float argc) +void ClientCommand_getmapvotepic(float request, float argc) // internal command, used only by code { switch(request) { @@ -128,7 +128,7 @@ void ClientCommand_getmapvotepic(float request, float argc) } } -void ClientCommand_join(float request) +void ClientCommand_join(float request) // legacy { switch(request) { @@ -168,7 +168,7 @@ void ClientCommand_join(float request) } } -void ClientCommand_ready(float request) +void ClientCommand_ready(float request) // todo: anti-spam for toggling readyness { switch(request) { @@ -212,7 +212,7 @@ void ClientCommand_ready(float request) } } -void ClientCommand_reportcvar(float request, float argc, string command) // TODO: confirm this works +void ClientCommand_reportcvar(float request, float argc, string command) { switch(request) { @@ -280,7 +280,7 @@ void ClientCommand_say_team(float request, float argc, string command) } } -void ClientCommand_selectteam(float request, float argc) // TODO: Update the messages for this command +void ClientCommand_selectteam(float request, float argc) { switch(request) { @@ -385,7 +385,7 @@ void ClientCommand_sentcvar(float request, float argc, string command) } } -void ClientCommand_spectate(float request) +void ClientCommand_spectate(float request) // legacy { switch(request) { @@ -493,7 +493,7 @@ void ClientCommand_tell(float request, float argc, string command) } } -void ClientCommand_voice(float request, float argc, string command) +void ClientCommand_voice(float request, float argc, string command) // legacy { switch(request) { @@ -510,7 +510,7 @@ void ClientCommand_voice(float request, float argc, string command) case CMD_REQUEST_USAGE: { sprint(self, "\nUsage:^3 cmd voice\n"); - sprint(self, " FIXME ARGUMENTS UNKNOWN.\n"); + sprint(self, " TODO ARGUMENTS UNKNOWN.\n"); return; } } @@ -646,7 +646,7 @@ void SV_ParseClientCommand(string command) return print("^1ERROR: ^7ANTISPAM CAUGHT: ", command, ".\n"); // "FALSE": not allowed to continue, halt } - /* NOTE: totally disabled for now, however the functionality and descriptions are there if we ever want it. + /* NOTE: totally disabled for now for bandwidth/security reasons, however the functionality and descriptions are there if we ever want it. if(argv(0) == "help") { if(argc == 1) diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index 6d9980630..8c13dc58a 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -1,6 +1,6 @@ // ==================================================== // Shared code for server commands, written by Samual -// Last updated: December 19th, 2011 +// Last updated: December 25th, 2011 // ==================================================== // select the proper prefix for usage and other messages @@ -88,7 +88,6 @@ float GetFilteredNumber(string input) if(selection) { output = num_for_edict(selection); } - print(strcat("input: ", input, ", output: ", ftos(output), ",\n")); // todo remove after done debugging return output; } @@ -148,7 +147,7 @@ void CommonCommand_cvar_purechanges(float request, entity caller) } } -void CommonCommand_info(float request, entity caller, float argc) +void CommonCommand_info(float request, entity caller, float argc) // legacy { switch(request) { @@ -254,6 +253,7 @@ void CommonCommand_maplist(float request, entity caller) } } +/* void GameCommand_rankings(float request) // this is OLD.... jeez. { switch(request) @@ -275,6 +275,7 @@ void GameCommand_rankings(float request) // this is OLD.... jeez. } } } +*/ void CommonCommand_rankings(float request, entity caller) { @@ -351,7 +352,7 @@ void CommonCommand_time(float request, entity caller) print_to(caller, strcat("realtime = ", ftos(gettime(GETTIME_REALTIME)))); print_to(caller, strcat("hires = ", ftos(gettime(GETTIME_HIRES)))); print_to(caller, strcat("uptime = ", ftos(gettime(GETTIME_UPTIME)))); - print_to(caller, strcat("localtime = ", strftime(TRUE, "%a %b %e %H:%M:%S %Z %Y"))); // todo: Why is strftime broken? is engine problem, I think. + print_to(caller, strcat("localtime = ", strftime(TRUE, "%a %b %e %H:%M:%S %Z %Y"))); print_to(caller, strcat("gmtime = ", strftime(FALSE, "%a %b %e %H:%M:%S %Z %Y"))); return; } diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index 7960004ae..68a8e9f10 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -1,6 +1,6 @@ // ===================================================== // Server side game commands code, reworked by Samual -// Last updated: December 6th, 2011 +// Last updated: December 25th, 2011 // ===================================================== // used by GameCommand_make_mapinfo() @@ -250,7 +250,7 @@ void GameCommand_anticheat(float request, float argc) } } -void GameCommand_bbox(float request) +void GameCommand_bbox(float request) // legacy { switch(request) { @@ -687,7 +687,7 @@ void GameCommand_effectindexdump(float request) // legacy } } -void GameCommand_extendmatchtime(float request) +void GameCommand_extendmatchtime(float request) // legacy { switch(request) { @@ -708,7 +708,7 @@ void GameCommand_extendmatchtime(float request) } } -void GameCommand_find(float request, float argc) +void GameCommand_find(float request, float argc) // legacy // is this even needed? We have prvm_edicts command and such ANYWAY { switch(request) { @@ -733,7 +733,7 @@ void GameCommand_find(float request, float argc) } } -void GameCommand_gametype(float request, float argc) +void GameCommand_gametype(float request, float argc) // legacy { switch(request) { @@ -772,7 +772,7 @@ void GameCommand_gametype(float request, float argc) } } -void GameCommand_gettaginfo(float request, float argc) // UNTESTED +void GameCommand_gettaginfo(float request, float argc) // legacy { switch(request) { @@ -886,7 +886,7 @@ void GameCommand_lockteams(float request) } } -void GameCommand_make_mapinfo(float request) // UNTESTED +void GameCommand_make_mapinfo(float request) // legacy { switch(request) { @@ -912,7 +912,7 @@ void GameCommand_make_mapinfo(float request) // UNTESTED } } -void GameCommand_modelbug(float request) // UNTESTED // is this even needed anymore? +void GameCommand_modelbug(float request) // legacy { switch(request) { @@ -1070,7 +1070,7 @@ void GameCommand_moveplayer(float request, float argc) } } -void GameCommand_nospectators(float request) +void GameCommand_nospectators(float request) // legacy { switch(request) { @@ -1100,7 +1100,7 @@ void GameCommand_nospectators(float request) } } -void GameCommand_onslaught_updatelinks(float request) // UNTESTED // should this be here? Perhaps some mutatorhook call instead.... +void GameCommand_onslaught_updatelinks(float request) // legacy // todo: should this be here? Perhaps some mutatorhook call instead.... { switch(request) { @@ -1121,7 +1121,7 @@ void GameCommand_onslaught_updatelinks(float request) // UNTESTED // should this } } -void GameCommand_playerdemo(float request, float argc) // UNTESTED +void GameCommand_playerdemo(float request, float argc) // legacy { switch(request) { @@ -1202,7 +1202,7 @@ void GameCommand_playerdemo(float request, float argc) // UNTESTED } } -void GameCommand_printstats(float request) +void GameCommand_printstats(float request) // legacy { switch(request) { @@ -1245,7 +1245,7 @@ void GameCommand_radarmap(float request, float argc) } } -void GameCommand_reducematchtime(float request) +void GameCommand_reducematchtime(float request) // legacy { switch(request) { diff --git a/qcsrc/server/command/sv_cmd.qh b/qcsrc/server/command/sv_cmd.qh index 633f40680..6ccfb1c7b 100644 --- a/qcsrc/server/command/sv_cmd.qh +++ b/qcsrc/server/command/sv_cmd.qh @@ -1,10 +1,8 @@ // ================================================= // Declarations for server side game commands -// Last updated: December 14th, 2011 +// Last updated: December 25th, 2011 // ================================================= -float RadarMap_Make(float argc); - string GotoMap(string m); void race_deleteTime(string map, float pos); -- 2.39.2