Add option for console commands to be unlisted.

This commit is contained in:
Jonathan G Rennison
2017-02-21 20:47:38 +00:00
parent 102405e082
commit 3884ea5da1
3 changed files with 5 additions and 3 deletions

View File

@@ -1500,7 +1500,7 @@ DEF_CONSOLE_CMD(ConListCommands)
for (const IConsoleCmd *cmd = _iconsole_cmds; cmd != NULL; cmd = cmd->next) {
if (argv[1] == NULL || strstr(cmd->name, argv[1]) != NULL) {
if (cmd->hook == NULL || cmd->hook(false) != CHR_HIDE) IConsolePrintF(CC_DEFAULT, "%s", cmd->name);
if (cmd->unlisted == false && (cmd->hook == NULL || cmd->hook(false) != CHR_HIDE)) IConsolePrintF(CC_DEFAULT, "%s", cmd->name);
}
}