Mercurial > hg
diff mcabber/src/commands.c @ 868:cefdaeb42e67
Add online /help command
We use help files stored in "$DATA_DIR/mcabber/help/$lang/", with $lang
defaulting to "en".
The DATA_DIR location can be set using configure --with-datadir="...".
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 25 May 2006 18:20:52 +0200 |
parents | 7f056c566569 |
children | ee39f6d94d43 |
line wrap: on
line diff
--- a/mcabber/src/commands.c Wed May 24 23:30:31 2006 +0200 +++ b/mcabber/src/commands.c Thu May 25 18:20:52 2006 +0200 @@ -22,6 +22,7 @@ #include <string.h> #include "commands.h" +#include "help.h" #include "jabglue.h" #include "roster.h" #include "screen.h" @@ -58,6 +59,7 @@ static void do_version(char *arg); static void do_request(char *arg); static void do_event(char *arg); +static void do_help(char *arg); // Global variable for the commands list static GSList *Commands; @@ -96,7 +98,7 @@ cmd_add("disconnect", "Disconnect from server", 0, 0, &do_disconnect); cmd_add("event", "Process an event", COMPL_EVENTSID, COMPL_EVENTS, &do_event); cmd_add("group", "Change group display settings", COMPL_GROUP, 0, &do_group); - //cmd_add("help", "Display some help", COMPL_CMD, 0, NULL); + cmd_add("help", "Display some help", COMPL_CMD, 0, &do_help); cmd_add("info", "Show basic info on current buddy", 0, 0, &do_info); cmd_add("move", "Move the current buddy to another group", COMPL_GROUPNAME, 0, &do_move); @@ -2218,4 +2220,9 @@ jb_disconnect(); } +static void do_help(char *arg) +{ + help_process(arg); +} + /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */