]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/common.qc
fix CommonCommand_time prints, and make autoscreenshots go to their own directly...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / common.qc
index affad72a6e540b6321512a7e3c31c9042a00bfb6..f7982a1588a62ba7de80812bdaef4e2ea4ad87be 100644 (file)
@@ -22,14 +22,14 @@ string GetCallerName(entity caller)
 }
 
 // verify that the client provided is acceptable for use
-float VerifyClientEntity(entity client, float must_be_real, float allow_bots)
+float VerifyClientEntity(entity client, float must_be_real, float must_be_bots)
 {
        if not(client.flags & FL_CLIENT)
                return CLIENT_DOESNT_EXIST;
        else if(must_be_real && (clienttype(client) != CLIENTTYPE_REAL))
                return CLIENT_NOT_REAL;
-       else if(!allow_bots && (clienttype(client) == CLIENTTYPE_BOT))
-               return CLIENT_IS_BOT;
+       else if(must_be_bots && (clienttype(client) != CLIENTTYPE_BOT))
+               return CLIENT_NOT_BOT;
                
        return CLIENT_ACCEPTABLE;
 }
@@ -41,7 +41,7 @@ string GetClientErrorString(float clienterror, string original_input)
        {
                case CLIENT_DOESNT_EXIST: { return strcat("Client '", original_input, "' doesn't exist"); }
                case CLIENT_NOT_REAL: { return strcat("Client '", original_input, "' is not real"); }
-               case CLIENT_IS_BOT: { return strcat("Client '", original_input, "' is a bot"); }
+               case CLIENT_NOT_BOT: { return strcat("Client '", original_input, "' is not a bot"); }
                default: { return "Incorrect usage of GetClientErrorString"; }
        }
 }
@@ -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;
                }