summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-09-02 17:02:59 +0200
committerSebastien Helleu <flashcode@flashtux.org>2008-09-02 17:02:59 +0200
commite7dcf1376475d1578321dcd2e2c7871d96fcb25a (patch)
tree7cd87b91dfad8f3b0156a730f137929160f5873d /src/plugins
parente756f4770ae99b07c7aaf7d43d5f07d0c88f256f (diff)
downloadweechat-e7dcf1376475d1578321dcd2e2c7871d96fcb25a.zip
Add description for info and infolist hooks
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/alias/alias-info.c3
-rw-r--r--src/plugins/fifo/fifo-info.c3
-rw-r--r--src/plugins/irc/irc-info.c18
-rw-r--r--src/plugins/logger/logger-info.c3
-rw-r--r--src/plugins/plugin-api.c55
-rw-r--r--src/plugins/scripts/lua/weechat-lua-api.c16
-rw-r--r--src/plugins/scripts/perl/weechat-perl-api.c16
-rw-r--r--src/plugins/scripts/python/weechat-python-api.c12
-rw-r--r--src/plugins/scripts/ruby/weechat-ruby-api.c26
-rw-r--r--src/plugins/scripts/script-api.c7
-rw-r--r--src/plugins/scripts/script-api.h2
-rw-r--r--src/plugins/weechat-plugin.h12
-rw-r--r--src/plugins/xfer/xfer-info.c3
13 files changed, 117 insertions, 59 deletions
diff --git a/src/plugins/alias/alias-info.c b/src/plugins/alias/alias-info.c
index 829d228e1..2a8e7a2e9 100644
--- a/src/plugins/alias/alias-info.c
+++ b/src/plugins/alias/alias-info.c
@@ -89,5 +89,6 @@ void
alias_info_init ()
{
/* alias infolist hooks */
- weechat_hook_infolist ("alias", &alias_info_get_infolist_cb, NULL);
+ weechat_hook_infolist ("alias", N_("list of alias"),
+ &alias_info_get_infolist_cb, NULL);
}
diff --git a/src/plugins/fifo/fifo-info.c b/src/plugins/fifo/fifo-info.c
index e9f46f5a6..20a4df336 100644
--- a/src/plugins/fifo/fifo-info.c
+++ b/src/plugins/fifo/fifo-info.c
@@ -53,5 +53,6 @@ void
fifo_info_init ()
{
/* fifo info hooks */
- weechat_hook_info ("fifo_filename", &fifo_info_get_info_cb, NULL);
+ weechat_hook_info ("fifo_filename", N_("fifo filename"),
+ &fifo_info_get_info_cb, NULL);
}
diff --git a/src/plugins/irc/irc-info.c b/src/plugins/irc/irc-info.c
index f70f031c5..ec654a549 100644
--- a/src/plugins/irc/irc-info.c
+++ b/src/plugins/irc/irc-info.c
@@ -326,12 +326,18 @@ void
irc_info_init ()
{
/* irc info hooks */
- weechat_hook_info ("irc_is_channel", &irc_info_get_info_cb, NULL);
- weechat_hook_info ("irc_nick_from_host", &irc_info_get_info_cb, NULL);
- weechat_hook_info ("irc_buffer", &irc_info_get_info_cb, NULL);
+ weechat_hook_info ("irc_is_channel", N_("1 if string is an IRC channel"),
+ &irc_info_get_info_cb, NULL);
+ weechat_hook_info ("irc_nick_from_host", N_("get nick from IRC host"),
+ &irc_info_get_info_cb, NULL);
+ weechat_hook_info ("irc_buffer", N_("get buffer pointer for an IRC server/channel"),
+ &irc_info_get_info_cb, NULL);
/* irc infolist hooks */
- weechat_hook_infolist ("irc_server", &irc_info_get_infolist_cb, NULL);
- weechat_hook_infolist ("irc_channel", &irc_info_get_infolist_cb, NULL);
- weechat_hook_infolist ("irc_nick", &irc_info_get_infolist_cb, NULL);
+ weechat_hook_infolist ("irc_server", N_("list of IRC servers"),
+ &irc_info_get_infolist_cb, NULL);
+ weechat_hook_infolist ("irc_channel", N_("list of channels for an IRC server"),
+ &irc_info_get_infolist_cb, NULL);
+ weechat_hook_infolist ("irc_nick", N_("list of nicks for an IRC channel"),
+ &irc_info_get_infolist_cb, NULL);
}
diff --git a/src/plugins/logger/logger-info.c b/src/plugins/logger/logger-info.c
index 0e75f7eb6..58266fe0f 100644
--- a/src/plugins/logger/logger-info.c
+++ b/src/plugins/logger/logger-info.c
@@ -92,5 +92,6 @@ void
logger_info_init ()
{
/* irc infolist hooks */
- weechat_hook_infolist ("logger_buffer", &logger_info_get_infolist_cb, NULL);
+ weechat_hook_infolist ("logger_buffer", N_("list of logger buffers"),
+ &logger_info_get_infolist_cb, NULL);
}
diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c
index 95bbb039e..c1ce8e414 100644
--- a/src/plugins/plugin-api.c
+++ b/src/plugins/plugin-api.c
@@ -675,25 +675,42 @@ void
plugin_api_init ()
{
/* WeeChat core info hooks */
- hook_info (NULL, "version", &plugin_api_info_get_internal, NULL);
- hook_info (NULL, "date", &plugin_api_info_get_internal, NULL);
- hook_info (NULL, "dir_separator", &plugin_api_info_get_internal, NULL);
- hook_info (NULL, "weechat_dir", &plugin_api_info_get_internal, NULL);
- hook_info (NULL, "weechat_libdir", &plugin_api_info_get_internal, NULL);
- hook_info (NULL, "weechat_sharedir", &plugin_api_info_get_internal, NULL);
- hook_info (NULL, "weechat_localedir", &plugin_api_info_get_internal, NULL);
- hook_info (NULL, "charset_terminal", &plugin_api_info_get_internal, NULL);
- hook_info (NULL, "charset_internal", &plugin_api_info_get_internal, NULL);
- hook_info (NULL, "inactivity", &plugin_api_info_get_internal, NULL);
- hook_info (NULL, "filters_enabled", &plugin_api_info_get_internal, NULL);
+ hook_info (NULL, "version", N_("WeeChat version"),
+ &plugin_api_info_get_internal, NULL);
+ hook_info (NULL, "date", N_("WeeChat compilation date"),
+ &plugin_api_info_get_internal, NULL);
+ hook_info (NULL, "dir_separator", N_("directory separator"),
+ &plugin_api_info_get_internal, NULL);
+ hook_info (NULL, "weechat_dir", N_("WeeChat directory"),
+ &plugin_api_info_get_internal, NULL);
+ hook_info (NULL, "weechat_libdir", N_("WeeChat \"lib\" directory"),
+ &plugin_api_info_get_internal, NULL);
+ hook_info (NULL, "weechat_sharedir", N_("WeeChat \"share\" directory"),
+ &plugin_api_info_get_internal, NULL);
+ hook_info (NULL, "weechat_localedir", N_("WeeChat \"locale\" directory"),
+ &plugin_api_info_get_internal, NULL);
+ hook_info (NULL, "charset_terminal", N_("terminal charset"),
+ &plugin_api_info_get_internal, NULL);
+ hook_info (NULL, "charset_internal", N_("WeeChat internal charset"),
+ &plugin_api_info_get_internal, NULL);
+ hook_info (NULL, "inactivity", N_("keyboard inactivity (seconds)"),
+ &plugin_api_info_get_internal, NULL);
+ hook_info (NULL, "filters_enabled", N_("1 if filters are enabled"),
+ &plugin_api_info_get_internal, NULL);
/* WeeChat core infolist hooks */
- hook_infolist (NULL, "buffer", &plugin_api_infolist_get_internal, NULL);
- hook_infolist (NULL, "buffer_lines", &plugin_api_infolist_get_internal, NULL);
- hook_infolist (NULL, "buffer", &plugin_api_infolist_get_internal, NULL);
- hook_infolist (NULL, "nicklist", &plugin_api_infolist_get_internal, NULL);
- hook_infolist (NULL, "window", &plugin_api_infolist_get_internal, NULL);
- hook_infolist (NULL, "hotlist", &plugin_api_infolist_get_internal, NULL);
- hook_infolist (NULL, "option", &plugin_api_infolist_get_internal, NULL);
- hook_infolist (NULL, "hook", &plugin_api_infolist_get_internal, NULL);
+ hook_infolist (NULL, "buffer", N_("list of buffers"),
+ &plugin_api_infolist_get_internal, NULL);
+ hook_infolist (NULL, "buffer_lines", N_("lines of a buffer"),
+ &plugin_api_infolist_get_internal, NULL);
+ hook_infolist (NULL, "nicklist", N_("nicks in nicklist for a buffer"),
+ &plugin_api_infolist_get_internal, NULL);
+ hook_infolist (NULL, "window", N_("list of windows"),
+ &plugin_api_infolist_get_internal, NULL);
+ hook_infolist (NULL, "hotlist", N_("list of buffers in hotlist"),
+ &plugin_api_infolist_get_internal, NULL);
+ hook_infolist (NULL, "option", N_("list of options"),
+ &plugin_api_infolist_get_internal, NULL);
+ hook_infolist (NULL, "hook", N_("list of hooks"),
+ &plugin_api_infolist_get_internal, NULL);
}
diff --git a/src/plugins/scripts/lua/weechat-lua-api.c b/src/plugins/scripts/lua/weechat-lua-api.c
index 3b6c05323..9f4f1dd12 100644
--- a/src/plugins/scripts/lua/weechat-lua-api.c
+++ b/src/plugins/scripts/lua/weechat-lua-api.c
@@ -3105,7 +3105,7 @@ weechat_lua_api_hook_info_cb (void *data, const char *info_name,
static int
weechat_lua_api_hook_info (lua_State *L)
{
- const char *info_name, *function;
+ const char *info_name, *description, *function;
char *result;
int n;
@@ -3123,18 +3123,20 @@ weechat_lua_api_hook_info (lua_State *L)
n = lua_gettop (lua_current_interpreter);
- if (n < 2)
+ if (n < 3)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("hook_info");
LUA_RETURN_EMPTY;
}
- info_name = lua_tostring (lua_current_interpreter, -2);
+ info_name = lua_tostring (lua_current_interpreter, -3);
+ description = lua_tostring (lua_current_interpreter, -2);
function = lua_tostring (lua_current_interpreter, -1);
result = script_ptr2str (script_api_hook_info (weechat_lua_plugin,
lua_current_script,
info_name,
+ description,
&weechat_lua_api_hook_info_cb,
function));
@@ -3178,7 +3180,7 @@ weechat_lua_api_hook_infolist_cb (void *data, const char *info_name,
static int
weechat_lua_api_hook_infolist (lua_State *L)
{
- const char *infolist_name, *function;
+ const char *infolist_name, *description, *function;
char *result;
int n;
@@ -3196,18 +3198,20 @@ weechat_lua_api_hook_infolist (lua_State *L)
n = lua_gettop (lua_current_interpreter);
- if (n < 2)
+ if (n < 3)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("hook_infolist");
LUA_RETURN_EMPTY;
}
- infolist_name = lua_tostring (lua_current_interpreter, -2);
+ infolist_name = lua_tostring (lua_current_interpreter, -3);
+ description = lua_tostring (lua_current_interpreter, -2);
function = lua_tostring (lua_current_interpreter, -1);
result = script_ptr2str (script_api_hook_infolist (weechat_lua_plugin,
lua_current_script,
infolist_name,
+ description,
&weechat_lua_api_hook_infolist_cb,
function));
diff --git a/src/plugins/scripts/perl/weechat-perl-api.c b/src/plugins/scripts/perl/weechat-perl-api.c
index d5257267e..c7842db10 100644
--- a/src/plugins/scripts/perl/weechat-perl-api.c
+++ b/src/plugins/scripts/perl/weechat-perl-api.c
@@ -2597,7 +2597,7 @@ weechat_perl_api_hook_info_cb (void *data, const char *info_name,
static XS (XS_weechat_hook_info)
{
- char *result, *info_name, *perl_fn;
+ char *result, *info_name, *description, *perl_fn;
dXSARGS;
/* make C compiler happy */
@@ -2609,17 +2609,19 @@ static XS (XS_weechat_hook_info)
PERL_RETURN_EMPTY;
}
- if (items < 2)
+ if (items < 3)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("hook_info");
PERL_RETURN_EMPTY;
}
info_name = SvPV (ST (0), PL_na);
- perl_fn = SvPV (ST (1), PL_na);
+ description = SvPV (ST (1), PL_na);
+ perl_fn = SvPV (ST (2), PL_na);
result = script_ptr2str (script_api_hook_info (weechat_perl_plugin,
perl_current_script,
info_name,
+ description,
&weechat_perl_api_hook_info_cb,
perl_fn));
@@ -2662,7 +2664,7 @@ weechat_perl_api_hook_infolist_cb (void *data, const char *infolist_name,
static XS (XS_weechat_hook_infolist)
{
- char *result, *infolist_name, *perl_fn;
+ char *result, *infolist_name, *description, *perl_fn;
dXSARGS;
/* make C compiler happy */
@@ -2674,17 +2676,19 @@ static XS (XS_weechat_hook_infolist)
PERL_RETURN_EMPTY;
}
- if (items < 2)
+ if (items < 3)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("hook_infolist");
PERL_RETURN_EMPTY;
}
infolist_name = SvPV (ST (0), PL_na);
- perl_fn = SvPV (ST (1), PL_na);
+ description = SvPV (ST (1), PL_na);
+ perl_fn = SvPV (ST (2), PL_na);
result = script_ptr2str (script_api_hook_infolist (weechat_perl_plugin,
perl_current_script,
infolist_name,
+ description,
&weechat_perl_api_hook_infolist_cb,
perl_fn));
diff --git a/src/plugins/scripts/python/weechat-python-api.c b/src/plugins/scripts/python/weechat-python-api.c
index 2ff23794c..64e788f99 100644
--- a/src/plugins/scripts/python/weechat-python-api.c
+++ b/src/plugins/scripts/python/weechat-python-api.c
@@ -2754,7 +2754,7 @@ weechat_python_api_hook_info_cb (void *data, const char *info_name,
static PyObject *
weechat_python_api_hook_info (PyObject *self, PyObject *args)
{
- char *info_name, *function, *result;
+ char *info_name, *description, *function, *result;
PyObject *object;
/* make C compiler happy */
@@ -2767,9 +2767,10 @@ weechat_python_api_hook_info (PyObject *self, PyObject *args)
}
info_name = NULL;
+ description = NULL;
function = NULL;
- if (!PyArg_ParseTuple (args, "ss", &info_name, &function))
+ if (!PyArg_ParseTuple (args, "sss", &info_name, &description, &function))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("hook_info");
PYTHON_RETURN_EMPTY;
@@ -2778,6 +2779,7 @@ weechat_python_api_hook_info (PyObject *self, PyObject *args)
result = script_ptr2str(script_api_hook_info (weechat_python_plugin,
python_current_script,
info_name,
+ description,
&weechat_python_api_hook_info_cb,
function));
@@ -2821,7 +2823,7 @@ weechat_python_api_hook_infolist_cb (void *data, const char *infolist_name,
static PyObject *
weechat_python_api_hook_infolist (PyObject *self, PyObject *args)
{
- char *infolist_name, *function, *result;
+ char *infolist_name, *description, *function, *result;
PyObject *object;
/* make C compiler happy */
@@ -2834,9 +2836,10 @@ weechat_python_api_hook_infolist (PyObject *self, PyObject *args)
}
infolist_name = NULL;
+ description = NULL;
function = NULL;
- if (!PyArg_ParseTuple (args, "ss", &infolist_name, &function))
+ if (!PyArg_ParseTuple (args, "sss", &infolist_name, &description, &function))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("hook_infolist");
PYTHON_RETURN_EMPTY;
@@ -2845,6 +2848,7 @@ weechat_python_api_hook_infolist (PyObject *self, PyObject *args)
result = script_ptr2str(script_api_hook_infolist (weechat_python_plugin,
python_current_script,
infolist_name,
+ description,
&weechat_python_api_hook_infolist_cb,
function));
diff --git a/src/plugins/scripts/ruby/weechat-ruby-api.c b/src/plugins/scripts/ruby/weechat-ruby-api.c
index 25a1e2cb4..81987d1dc 100644
--- a/src/plugins/scripts/ruby/weechat-ruby-api.c
+++ b/src/plugins/scripts/ruby/weechat-ruby-api.c
@@ -3162,9 +3162,10 @@ weechat_ruby_api_hook_info_cb (void *data, const char *info_name,
*/
static VALUE
-weechat_ruby_api_hook_info (VALUE class, VALUE info_name, VALUE function)
+weechat_ruby_api_hook_info (VALUE class, VALUE info_name, VALUE description,
+ VALUE function)
{
- char *c_info_name, *c_function, *result;
+ char *c_info_name, *c_description, *c_function, *result;
VALUE return_value;
/* make C compiler happy */
@@ -3177,23 +3178,27 @@ weechat_ruby_api_hook_info (VALUE class, VALUE info_name, VALUE function)
}
c_info_name = NULL;
+ c_description = NULL;
c_function = NULL;
- if (NIL_P (info_name) || NIL_P (function))
+ if (NIL_P (info_name) || NIL_P (description) || NIL_P (function))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("hook_info");
RUBY_RETURN_EMPTY;
}
Check_Type (info_name, T_STRING);
+ Check_Type (description, T_STRING);
Check_Type (function, T_STRING);
c_info_name = STR2CSTR (info_name);
+ c_description = STR2CSTR (description);
c_function = STR2CSTR (function);
result = script_ptr2str (script_api_hook_info (weechat_ruby_plugin,
ruby_current_script,
c_info_name,
+ c_description,
&weechat_ruby_api_hook_info_cb,
c_function));
@@ -3235,9 +3240,10 @@ weechat_ruby_api_hook_infolist_cb (void *data, const char *infolist_name,
*/
static VALUE
-weechat_ruby_api_hook_infolist (VALUE class, VALUE infolist_name, VALUE function)
+weechat_ruby_api_hook_infolist (VALUE class, VALUE infolist_name,
+ VALUE description, VALUE function)
{
- char *c_infolist_name, *c_function, *result;
+ char *c_infolist_name, *c_description, *c_function, *result;
VALUE return_value;
/* make C compiler happy */
@@ -3250,23 +3256,27 @@ weechat_ruby_api_hook_infolist (VALUE class, VALUE infolist_name, VALUE function
}
c_infolist_name = NULL;
+ c_description = NULL;
c_function = NULL;
- if (NIL_P (infolist_name) || NIL_P (function))
+ if (NIL_P (infolist_name) || NIL_P (description) || NIL_P (function))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("hook_infolist");
RUBY_RETURN_EMPTY;
}
Check_Type (infolist_name, T_STRING);
+ Check_Type (description, T_STRING);
Check_Type (function, T_STRING);
c_infolist_name = STR2CSTR (infolist_name);
+ c_description = STR2CSTR (description);
c_function = STR2CSTR (function);
result = script_ptr2str (script_api_hook_infolist (weechat_ruby_plugin,
ruby_current_script,
c_infolist_name,
+ c_description,
&weechat_ruby_api_hook_infolist_cb,
c_function));
@@ -4964,8 +4974,8 @@ weechat_ruby_api_init (VALUE ruby_mWeechat)
rb_define_module_function (ruby_mWeechat, "hook_completion_list_add", &weechat_ruby_api_hook_completion_list_add, 4);
rb_define_module_function (ruby_mWeechat, "hook_modifier", &weechat_ruby_api_hook_modifier, 2);
rb_define_module_function (ruby_mWeechat, "hook_modifier_exec", &weechat_ruby_api_hook_modifier_exec, 3);
- rb_define_module_function (ruby_mWeechat, "hook_info", &weechat_ruby_api_hook_info, 2);
- rb_define_module_function (ruby_mWeechat, "hook_infolist", &weechat_ruby_api_hook_infolist, 2);
+ rb_define_module_function (ruby_mWeechat, "hook_info", &weechat_ruby_api_hook_info, 3);
+ rb_define_module_function (ruby_mWeechat, "hook_infolist", &weechat_ruby_api_hook_infolist, 3);
rb_define_module_function (ruby_mWeechat, "unhook", &weechat_ruby_api_unhook, 1);
rb_define_module_function (ruby_mWeechat, "unhook_all", &weechat_ruby_api_unhook_all, 0);
rb_define_module_function (ruby_mWeechat, "buffer_new", &weechat_ruby_api_buffer_new, 4);
diff --git a/src/plugins/scripts/script-api.c b/src/plugins/scripts/script-api.c
index baeab5559..d304e40ec 100644
--- a/src/plugins/scripts/script-api.c
+++ b/src/plugins/scripts/script-api.c
@@ -884,6 +884,7 @@ struct t_hook *
script_api_hook_info (struct t_weechat_plugin *weechat_plugin,
struct t_plugin_script *script,
const char *info_name,
+ const char *description,
char *(*callback)(void *data,
const char *info_name,
const char *arguments),
@@ -896,7 +897,8 @@ script_api_hook_info (struct t_weechat_plugin *weechat_plugin,
if (!new_script_callback)
return NULL;
- new_hook = weechat_hook_info (info_name, callback, new_script_callback);
+ new_hook = weechat_hook_info (info_name, description,
+ callback, new_script_callback);
if (!new_hook)
{
script_callback_free_data (new_script_callback);
@@ -922,6 +924,7 @@ struct t_hook *
script_api_hook_infolist (struct t_weechat_plugin *weechat_plugin,
struct t_plugin_script *script,
const char *infolist_name,
+ const char *description,
struct t_infolist *(*callback)(void *data,
const char *infolist_name,
void *pointer,
@@ -935,7 +938,7 @@ script_api_hook_infolist (struct t_weechat_plugin *weechat_plugin,
if (!new_script_callback)
return NULL;
- new_hook = weechat_hook_infolist (infolist_name,
+ new_hook = weechat_hook_infolist (infolist_name, description,
callback, new_script_callback);
if (!new_hook)
{
diff --git a/src/plugins/scripts/script-api.h b/src/plugins/scripts/script-api.h
index f437275b5..1c09892a8 100644
--- a/src/plugins/scripts/script-api.h
+++ b/src/plugins/scripts/script-api.h
@@ -153,6 +153,7 @@ extern struct t_hook *script_api_hook_modifier (struct t_weechat_plugin *weechat
extern struct t_hook *script_api_hook_info (struct t_weechat_plugin *weechat_plugin,
struct t_plugin_script *script,
const char *info_name,
+ const char *description,
char *(*callback)(void *data,
const char *info_name,
const char *arguments),
@@ -160,6 +161,7 @@ extern struct t_hook *script_api_hook_info (struct t_weechat_plugin *weechat_plu
extern struct t_hook *script_api_hook_infolist (struct t_weechat_plugin *weechat_plugin,
struct t_plugin_script *script,
const char *infolist_name,
+ const char *description,
struct t_infolist *(*callback)(void *data,
const char *infolist_name,
void *pointer,
diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h
index 058ff2e02..a3a77616b 100644
--- a/src/plugins/weechat-plugin.h
+++ b/src/plugins/weechat-plugin.h
@@ -370,12 +370,14 @@ struct t_weechat_plugin
const char *string);
struct t_hook *(*hook_info) (struct t_weechat_plugin *plugin,
const char *info_name,
+ const char *description,
char *(*callback)(void *data,
const char *info_name,
const char *arguments),
void *callback_data);
struct t_hook *(*hook_infolist) (struct t_weechat_plugin *plugin,
const char *infolist_name,
+ const char *description,
struct t_infolist *(*callback)(void *data,
const char *infolist_name,
void *pointer,
@@ -836,12 +838,14 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
__string) \
weechat_plugin->hook_modifier_exec(weechat_plugin, __modifier, \
__modifier_data, __string)
-#define weechat_hook_info(__info_name, __callback, __data) \
+#define weechat_hook_info(__info_name, __description, __callback, \
+ __data) \
weechat_plugin->hook_info(weechat_plugin, __info_name, \
- __callback, __data)
-#define weechat_hook_infolist(__infolist_name, __callback, __data) \
+ __description, __callback, __data)
+#define weechat_hook_infolist(__infolist_name, __description, \
+ __callback, __data) \
weechat_plugin->hook_infolist(weechat_plugin, __infolist_name, \
- __callback, __data)
+ __description, __callback, __data)
#define weechat_unhook(__hook) \
weechat_plugin->unhook( __hook)
#define weechat_unhook_all() \
diff --git a/src/plugins/xfer/xfer-info.c b/src/plugins/xfer/xfer-info.c
index 762c5cba3..1472adf5c 100644
--- a/src/plugins/xfer/xfer-info.c
+++ b/src/plugins/xfer/xfer-info.c
@@ -90,5 +90,6 @@ void
xfer_info_init ()
{
/* xfer infolist hooks */
- weechat_hook_infolist ("xfer", &xfer_info_get_infolist_cb, NULL);
+ weechat_hook_infolist ("xfer", N_("list of xfer"),
+ &xfer_info_get_infolist_cb, NULL);
}