Commit e7a0999b authored by Andrew Price's avatar Andrew Price

Add prefixes to commands in the help listings

parent 03091bbd
......@@ -291,7 +291,7 @@ int command_compare(const char *input, const char *comm)
return(c);
}
void help_list(CommandList *c, unsigned int hidestuff)
void help_list(CommandList *c, unsigned int hidestuff, const char * const prefix)
{
char buff[10];
int count;
......@@ -306,12 +306,12 @@ void help_list(CommandList *c, unsigned int hidestuff)
{
if (!hidestuff)
{
printf("%20s - %s\n",c->Command,c->Desc);
printf("%8s%-12s - %s\n", prefix, c->Command, c->Desc);
count++;
}
else if (c->Show == 1)
{
printf("%20s - %s\n",c->Command,c->Desc);
printf("%8s%-12s - %s\n", prefix, c->Command, c->Desc);
count++;
}
}
......
......@@ -90,7 +90,7 @@ extern void c_version(CommandList *cm, int argc, const char **argv, char *args);
extern void c_alias(CommandList *cm, int argc, const char **argv, char *args);
extern void c_unalias(CommandList *cm, int argc, const char **argv, char *args);
void help_list(CommandList *c, unsigned int hidestuff);
void help_list(CommandList *c, unsigned int hidestuff, const char * const prefix);
char *remove_first_word(char *args);
#endif
......@@ -45,7 +45,6 @@ extern int busy; /* if true dont display messages i.e. during new/write */
extern unsigned long rights;
extern struct user * const user;
extern CommandList table[];
extern void help_list(CommandList *cm, unsigned int hidestuff);
static void help(const char *topic, int wiz)
{
......@@ -123,7 +122,7 @@ void c_help(CommandList *cm, int argc, const char **argv, char *args)
if (argc>1)
help(argv[1], u_god(user));
else
help_list(table, 1);
help_list(table, 1, CMD_BOARD_STR);
}
void c_cd(CommandList *cm, int argc, const char **argv, char *args)
......
......@@ -1264,7 +1264,7 @@ void t_help(CommandList *cm, int argc, const char **argv, char *args)
if (argc < 2)
{
help_list(chattable, 1);
help_list(chattable, 1, CMD_TALK_STR);
return;
}
......@@ -1411,4 +1411,4 @@ int ChangeRoom(char *room, int quiet)
}
return(0);
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment