1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-20 18:14:46 +02:00

Add infolists with list of scripts

This commit is contained in:
Sebastien Helleu
2009-03-28 20:58:00 +01:00
parent 30a50c6999
commit b2f1273c01
14 changed files with 315 additions and 15 deletions
@@ -662,6 +662,30 @@ weechat_python_completion_cb (void *data, const char *completion_item,
return WEECHAT_RC_OK;
}
/*
* weechat_python_infolist_cb: callback for infolist
*/
struct t_infolist *
weechat_python_infolist_cb (void *data, const char *infolist_name,
void *pointer, const char *arguments)
{
/* make C compiler happy */
(void) data;
(void) arguments;
if (!infolist_name || !infolist_name[0])
return NULL;
if (weechat_strcasecmp (infolist_name, "python_script") == 0)
{
return script_infolist_list_scripts (weechat_python_plugin,
python_scripts, pointer);
}
return NULL;
}
/*
* weechat_python_debug_dump_cb: dump Python plugin data in WeeChat log file
*/
@@ -744,6 +768,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
script_init (weechat_python_plugin,
&weechat_python_command_cb,
&weechat_python_completion_cb,
&weechat_python_infolist_cb,
&weechat_python_debug_dump_cb,
&weechat_python_buffer_closed_cb,
&weechat_python_load_cb);