From e7cffdf4a9aacd7b7e0b3d9920bb00552383e733 Mon Sep 17 00:00:00 2001 From: Samual Date: Sun, 18 Dec 2011 16:35:09 -0500 Subject: [PATCH] Improve handling of "unknown commands" --- qcsrc/client/command/cl_cmd.qc | 2 +- qcsrc/server/command/sv_cmd.qc | 2 +- qcsrc/server/command/vote.qc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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); -- 2.39.2