A showalias command, just like up2 requested.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@671 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-12-21 04:38:02 +00:00
parent 122dfc2338
commit c58a179f87

View file

@ -537,6 +537,26 @@ char *CopyString (char *in)
return out;
}
void Cmd_ShowAlias_f (void)
{
cmdalias_t *a;
char *s;
s = Cmd_Argv(1);
//find it, print it
for (a = cmd_alias ; a ; a=a->next)
{
if (!strcmp(s, a->name))
{
Con_Printf ("alias %s %s\n", a->name, a->value);
return;
}
}
Con_Printf("Alias doesn't exist\n");
}
/*
===============
Cmd_Alias_f
@ -2616,6 +2636,7 @@ void Cmd_Init (void)
Cmd_AddCommand ("restrict", Cmd_RestrictCommand_f);
Cmd_AddCommand ("aliaslevel", Cmd_AliasLevel_f);
#endif
Cmd_AddCommand ("showalias", Cmd_ShowAlias_f);
// Cmd_AddCommand ("msg_trigger", Cmd_Msg_Trigger_f);
// Cmd_AddCommand ("filter", Cmd_Msg_Filter_f);