-void ClientCommand_reportcvar(float request, float argc, string command)
-{
- switch(request)
- {
- case CMD_REQUEST_COMMAND:
- {
- if(argv(1) != "")
- {
- float tokens;
- string s;
-
- if(substring(argv(2), 0, 1) == "$") // undefined cvar: use the default value on the server then
- {
- s = strcat(substring(command, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\"");
- tokens = tokenize_console(s);
- }
-
- GetCvars(1);
-
- return;
- }
- }
-
- default:
- sprint(self, "Incorrect parameters for ^2reportcvar^7\n");
- case CMD_REQUEST_USAGE:
- {
- sprint(self, "\nUsage:^3 cmd reportcvar <cvar>\n");
- sprint(self, " Where 'cvar' is the cvar plus arguments to send to the server.\n");
- return;
- }
- }
-}
-