From 61c5451451521f4ec644a741b55c2321dbe30c03 Mon Sep 17 00:00:00 2001 From: Samual Date: Mon, 19 Dec 2011 19:03:49 -0500 Subject: [PATCH] fix CommonCommand_time prints, and make autoscreenshots go to their own directly (and with an alias on the client) --- commands.cfg | 6 ++++++ qcsrc/server/command/common.qc | 14 +++++++------- qcsrc/server/g_world.qc | 3 +-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/commands.cfg b/commands.cfg index 647425fa0..9b0d00753 100644 --- a/commands.cfg +++ b/commands.cfg @@ -266,3 +266,9 @@ alias vdoend "vdo endmatch" // ====================== rcon_secure 1 set rcon_restricted_commands "restart fraglimit chmap gotomap endmatch reducematchtime extendmatchtime allready kick kickban \"sv_cmd bans\" \"sv_cmd unban *\" status \"sv_cmd teamstatus\" movetoauto movetored movetoblue movetoyellow movetopink" + +// ============================= +// other miscellaneous aliases +// ============================= +alias autoscreenshot "screenshot screenshots/autoscreenshot/${1 !}-${2 !}.jpg; echo \"^5A screenshot has been taken at request of the server.\"" + diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index 93672bc0d..f7982a158 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -347,13 +347,13 @@ void CommonCommand_time(float request, entity caller) { case CMD_REQUEST_COMMAND: { - print_to(caller, strcat("time = ", ftos(time), "\n")); - print_to(caller, strcat("frame start = ", ftos(gettime(GETTIME_FRAMESTART)), "\n")); - print_to(caller, strcat("realtime = ", ftos(gettime(GETTIME_REALTIME)), "\n")); - print_to(caller, strcat("hires = ", ftos(gettime(GETTIME_HIRES)), "\n")); - print_to(caller, strcat("uptime = ", ftos(gettime(GETTIME_UPTIME)), "\n")); - print_to(caller, strcat("localtime = ", strftime(TRUE, "%a %b %e %H:%M:%S %Z %Y"), "\n")); // todo: Why is strftime broken? is engine problem, I think. - print_to(caller, strcat("gmtime = ", strftime(FALSE, "%a %b %e %H:%M:%S %Z %Y"), "\n")); + print_to(caller, strcat("time = ", ftos(time))); + print_to(caller, strcat("frame start = ", ftos(gettime(GETTIME_FRAMESTART)))); + 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("gmtime = ", strftime(FALSE, "%a %b %e %H:%M:%S %Z %Y"))); return; } diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 9f4cc1948..01cbc54ab 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -1381,8 +1381,7 @@ void IntermissionThink() && ((self.autoscreenshot > 0) && (time > self.autoscreenshot)) ) { self.autoscreenshot = -1; - if(clienttype(self) == CLIENTTYPE_REAL) - stuffcmd(self, "\nscreenshot\necho \"^5A screenshot has been taken at request of the server.\"\n"); + if(clienttype(self) == CLIENTTYPE_REAL) { stuffcmd(self, sprintf("\nautoscreenshot \"%s\" \"%s\"\n", GetMapname(), strftime(FALSE, "%s"))); } return; } -- 2.39.2