mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-29 15:12:19 +00:00
cmdlist now accepts wildcards. qqshaka was the first to notice it previously sucked.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6195 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
01c498d136
commit
1f707225e3
1 changed files with 6 additions and 0 deletions
|
@ -2622,10 +2622,16 @@ static void Cmd_List_f (void)
|
|||
{
|
||||
cmd_function_t *cmd;
|
||||
int num=0;
|
||||
const char *search = (Cmd_Argc()>1)?Cmd_Argv(1):NULL;
|
||||
for (cmd=cmd_functions ; cmd ; cmd=cmd->next)
|
||||
{
|
||||
if ((cmd->restriction?cmd->restriction:rcon_level.ival) > Cmd_ExecLevel)
|
||||
continue;
|
||||
|
||||
if (search)
|
||||
if (!wildcmp(search, cmd->name))
|
||||
continue; //nope, no match
|
||||
|
||||
if (!num)
|
||||
Con_TPrintf("Command list:\n");
|
||||
Con_Printf("(%2i) %s\n", (int)(cmd->restriction?cmd->restriction:rcon_level.ival), cmd->name);
|
||||
|
|
Loading…
Reference in a new issue