]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix CommonCommand_time prints, and make autoscreenshots go to their own directly...
authorSamual <samual@xonotic.org>
Tue, 20 Dec 2011 00:03:49 +0000 (19:03 -0500)
committerSamual <samual@xonotic.org>
Tue, 20 Dec 2011 00:03:49 +0000 (19:03 -0500)
commands.cfg
qcsrc/server/command/common.qc
qcsrc/server/g_world.qc

index 647425fa0cbd0a1e8708159ddea336e9706e2fd7..9b0d00753dd0e72d78c2b7be1e29564fabe7e0dd 100644 (file)
@@ -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.\""
+
index 93672bc0d3a9f170731e4af10b4aeb01e9bff8af..f7982a1588a62ba7de80812bdaef4e2ea4ad87be 100644 (file)
@@ -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;
                }
                        
index 9f4cc194836c71438d22674c1195644e34c110c8..01cbc54ab4fadc55f04f1725a7fc1b20a6366622 100644 (file)
@@ -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;
        }