}
// 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;
}
{
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"; }
}
}
{
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;
}