X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcommand%2Fcmd.qc;h=a8a8747e1822558f0b3c572b58a5d105b7d4c773;hb=6a55d211df2ff47536a2a61af70e1050ee5d83fd;hp=dd96a9c90930a36a7d4304ecbe6c49e71c60488b;hpb=579b98f2d87d5d2753618322ade31af1422d91ec;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index dd96a9c90..a8a8747e1 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -560,22 +560,22 @@ void ClientCommand_selfstuff(entity caller, int request, string command) } } -void ClientCommand_sentcvar(entity caller, int request, int argc, string command) +void ClientCommand_sentcvar(entity caller, int request, int argc) { switch (request) { case CMD_REQUEST_COMMAND: { - if (argv(1) != "") + if (argc >= 3) { - // float tokens; - string s; - + // NOTE: client-side settings do not exist on the server, this functionality has been deprecated + #if 0 if (argc == 2) // 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)), "\""); + string s = strcat(substring(command, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\""); tokenize_console(s); } + #endif GetCvars(caller, CS_CVAR(caller), 1); @@ -587,7 +587,7 @@ void ClientCommand_sentcvar(entity caller, int request, int argc, string command sprint(caller, sprintf("Incorrect parameters for ^2%s^7\n", argv(0))); case CMD_REQUEST_USAGE: { - sprint(caller, "\nUsage:^3 cmd sentcvar \n"); + sprint(caller, "\nUsage:^3 cmd sentcvar \n"); sprint(caller, " Where is the cvar plus arguments to send to the server.\n"); return; } @@ -815,7 +815,7 @@ void ClientCommand_(entity caller, int request) CLIENT_COMMAND("say_team", ClientCommand_say_team(ent, request, arguments, command), "Print a message to chat to all team mates") \ CLIENT_COMMAND("selectteam", ClientCommand_selectteam(ent, request, arguments), "Attempt to choose a team to join into") \ CLIENT_COMMAND("selfstuff", ClientCommand_selfstuff(ent, request, command), "Stuffcmd a command to your own client") \ - CLIENT_COMMAND("sentcvar", ClientCommand_sentcvar(ent, request, arguments, command), "New system for sending a client cvar to the server") \ + CLIENT_COMMAND("sentcvar", ClientCommand_sentcvar(ent, request, arguments), "New system for sending a client cvar to the server") \ CLIENT_COMMAND("spectate", ClientCommand_spectate(ent, request), "Become an observer") \ CLIENT_COMMAND("suggestmap", ClientCommand_suggestmap(ent, request, arguments), "Suggest a map to the mapvote at match end") \ CLIENT_COMMAND("tell", ClientCommand_tell(ent, request, arguments, command), "Send a message directly to a player") \