mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-24 21:01:17 +00:00
Added Cmd_CmdList_f()
This commit is contained in:
parent
895e900556
commit
68a2e7e74c
1 changed files with 16 additions and 2 deletions
18
common/cmd.c
18
common/cmd.c
|
@ -725,7 +725,7 @@ A complete command line has been parsed, so try to execute it
|
|||
FIXME: lookupnoadd the token to speed search?
|
||||
============
|
||||
*/
|
||||
void Cmd_ExecuteString (char *text, cmd_source_t src)
|
||||
void Cmd_ExecuteString (char *text, cmd_source_t src)
|
||||
{
|
||||
cmd_function_t *cmd;
|
||||
cmdalias_t *a;
|
||||
|
@ -793,6 +793,19 @@ int Cmd_CheckParm (char *parm)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void Cmd_CmdList_f (void)
|
||||
{
|
||||
cmd_function_t *cmd;
|
||||
int i;
|
||||
|
||||
for (cmd=cmd_functions, i=0 ; cmd ; cmd=cmd->next, i++)
|
||||
{
|
||||
Con_Printf("%s\n", cmd->name);
|
||||
}
|
||||
|
||||
Con_Printf ("%d commands\n", i);
|
||||
}
|
||||
|
||||
/*
|
||||
============
|
||||
Cmd_Init
|
||||
|
@ -807,8 +820,9 @@ void Cmd_Init (void)
|
|||
Cmd_AddCommand ("exec",Cmd_Exec_f);
|
||||
Cmd_AddCommand ("echo",Cmd_Echo_f);
|
||||
Cmd_AddCommand ("alias",Cmd_Alias_f);
|
||||
Cmd_AddCommand ("unalias",Cmd_UnAlias_f); // Tonik
|
||||
Cmd_AddCommand ("unalias",Cmd_UnAlias_f);
|
||||
Cmd_AddCommand ("wait", Cmd_Wait_f);
|
||||
Cmd_AddCommand ("cmdlist", Cmd_CmdList_f);
|
||||
#ifndef SERVERONLY
|
||||
Cmd_AddCommand ("cmd", Cmd_ForwardToServer_f);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue