From: Samual Date: Sun, 18 Dec 2011 21:35:09 +0000 (-0500) Subject: Improve handling of "unknown commands" X-Git-Tag: xonotic-v0.6.0~188^2~28^2~108 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=e7cffdf4a9aacd7b7e0b3d9920bb00552383e733 Improve handling of "unknown commands" --- diff --git a/qcsrc/client/command/cl_cmd.qc b/qcsrc/client/command/cl_cmd.qc index 97896137c..40ccfa781 100644 --- a/qcsrc/client/command/cl_cmd.qc +++ b/qcsrc/client/command/cl_cmd.qc @@ -438,7 +438,7 @@ void GameCommand(string command) } // nothing above caught the command, must be invalid - print("Unknown client command", ((command != "") ? strcat(" \"", command, "\"") : ""), ". For a list of supported commands, try cl_cmd help.\n"); + print(((command != "") ? strcat("Unknown client command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try cl_cmd help.\n"); return; } diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index 6b43308db..a13dd555f 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -1843,7 +1843,7 @@ void GameCommand(string command) } // nothing above caught the command, must be invalid - print("Unknown server command", ((command != "") ? strcat(" \"", command, "\"") : ""), ". For a list of supported commands, try sv_cmd help.\n"); + print(((command != "") ? strcat("Unknown server command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try sv_cmd help.\n"); return; } \ No newline at end of file diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 66fd049f0..30d22886a 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -963,7 +963,7 @@ void VoteCommand(float request, entity caller, float argc, string vote_command) } default: - print_to(caller, strcat("Unknown vote command", ((argv(1) != "") ? strcat(" \"", argv(1), "\"") : ""), ". For a list of supported commands, try ", GetCommandPrefix(caller), " vote help.\n")); + print_to(caller, strcat(((argv(1) != "") ? strcat("Unknown vote command \"", argv(1), "\"") : "No command provided"), ". For a list of supported commands, try ", GetCommandPrefix(caller), " vote help.\n")); case CMD_REQUEST_USAGE: { VoteCommand_macro_help(caller, argc);