]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Improve handling of "unknown commands"
authorSamual <samual@xonotic.org>
Sun, 18 Dec 2011 21:35:09 +0000 (16:35 -0500)
committerSamual <samual@xonotic.org>
Sun, 18 Dec 2011 21:35:09 +0000 (16:35 -0500)
qcsrc/client/command/cl_cmd.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc

index 97896137ccf3c1834b3eddbe25cebbe03eb17fb8..40ccfa7811b50840fcd4ecf626d97f7076bdde36 100644 (file)
@@ -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;
 }
index 6b43308db273a05dc1602c3a2536309f6ba42e52..a13dd555f4ef2ce1cd45c22eb8e9bcf84e362526 100644 (file)
@@ -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
index 66fd049f08fca1ad7e8dbbc700cd47e9e3632dc5..30d22886afadc5e3e616591fb1a50f4aa0385a44 100644 (file)
@@ -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);