Added /about command

Useful for showing version
This commit is contained in:
James Booth
2012-10-23 00:18:28 +01:00
parent 907b5cf801
commit d19afc3507
3 changed files with 45 additions and 18 deletions

View File

@@ -61,6 +61,7 @@ static gboolean _cmd_set_boolean_preference(const char * const inp,
// command prototypes
static gboolean _cmd_quit(const char * const inp, struct cmd_help_t help);
static gboolean _cmd_help(const char * const inp, struct cmd_help_t help);
static gboolean _cmd_about(const char * const inp, struct cmd_help_t help);
static gboolean _cmd_prefs(const char * const inp, struct cmd_help_t help);
static gboolean _cmd_who(const char * const inp, struct cmd_help_t help);
static gboolean _cmd_connect(const char * const inp, struct cmd_help_t help);
@@ -93,7 +94,7 @@ static struct cmd_t main_commands[] =
_cmd_help,
{ "/help [area|command]", "Show help summary, or help on a specific area or command",
{ "/help [area|command]",
"---------------",
"--------------------",
"Show help options.",
"Specify an area (basic, status, settings, navigation) for more help on that area.",
"Specify the command if you want more detailed help on a specific command.",
@@ -102,6 +103,14 @@ static struct cmd_t main_commands[] =
"Example : /help settings",
NULL } } },
{ "/about",
_cmd_about,
{ "/about", "About Profanity",
{ "/about",
"------",
"Show versioning and license information.",
NULL } } },
{ "/connect",
_cmd_connect,
{ "/connect user@host", "Login to jabber.",
@@ -594,6 +603,13 @@ _cmd_help(const char * const inp, struct cmd_help_t help)
return TRUE;
}
static gboolean
_cmd_about(const char * const inp, struct cmd_help_t help)
{
cons_about();
return TRUE;
}
static gboolean
_cmd_prefs(const char * const inp, struct cmd_help_t help)
{