From 591704de6447879b4a305393bf64586eba84ff05 Mon Sep 17 00:00:00 2001 From: Samual Date: Wed, 13 Jul 2011 13:28:58 -0400 Subject: [PATCH] printstats added --- qcsrc/server/gamecommand.qc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/qcsrc/server/gamecommand.qc b/qcsrc/server/gamecommand.qc index 5d99e0df8..4c9312527 100644 --- a/qcsrc/server/gamecommand.qc +++ b/qcsrc/server/gamecommand.qc @@ -1723,6 +1723,27 @@ void GameCommand_playerdemo(float request, string command) // UNTESTED } } +void GameCommand_printstats(float request) +{ + switch(request) + { + case GC_REQUEST_HELP: + print(" ^2printstats^7: foobar\n"); + return; + + case GC_REQUEST_COMMAND: + DumpStats(FALSE); + print("stats dumped.\n"); + return; + + default: + case GC_REQUEST_USAGE: + print("\nUsage:^3 sv_cmd printstats\n"); + print(" No arguments required.\n"); + return; + } +} + void GameCommand(string command) { // ===== TODO list ===== @@ -1767,6 +1788,7 @@ void GameCommand(string command) GameCommand_nospectators(GC_REQUEST_HELP); GameCommand_onslaught_updatelinks(GC_REQUEST_HELP); GameCommand_playerdemo(GC_REQUEST_HELP, ""); + GameCommand_printstats(GC_REQUEST_HELP); GameCommand_Vote("help", world); GameCommand_Ban("help"); GameCommand_Generic("help"); @@ -1820,6 +1842,7 @@ void GameCommand(string command) case "nospectators": GameCommand_nospectators(search_request_type); break; case "onslaught_updatelinks": GameCommand_onslaught_updatelinks(search_request_type); break; case "playerdemo": GameCommand_playerdemo(search_request_type, command); break; + case "printstats": GameCommand_printstats(search_request_type); break; default: print("Invalid command. For a list of supported commands, try sv_cmd help.\n"); -- 2.39.2