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

@@ -253,13 +253,14 @@ char *RemoveUnderscores(char *name)
* @param name name of the command that will be used
* @param proc function that will be called upon execution of command
*/
void IConsoleCmdRegister(const char *name, IConsoleCmdProc *proc, IConsoleHook *hook)
void IConsoleCmdRegister(const char *name, IConsoleCmdProc *proc, IConsoleHook *hook, bool unlisted)
{
IConsoleCmd *item_new = MallocT<IConsoleCmd>(1);
item_new->name = RemoveUnderscores(stredup(name));
item_new->next = NULL;
item_new->proc = proc;
item_new->hook = hook;
item_new->unlisted = unlisted;
IConsoleAddSorted(&_iconsole_cmds, item_new);
}