summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/tcl
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-03-28 20:58:00 +0100
committerSebastien Helleu <flashcode@flashtux.org>2009-03-28 20:58:00 +0100
commitb2f1273c01f2f13f02683a7d31823540f251f951 (patch)
treea3bcdde82e0b3f3aaeaed5d986ec45b5b7dadd99 /src/plugins/scripts/tcl
parent30a50c6999b8ba312abe674470ac052e322211a1 (diff)
downloadweechat-b2f1273c01f2f13f02683a7d31823540f251f951.zip
Add infolists with list of scripts
Diffstat (limited to 'src/plugins/scripts/tcl')
-rw-r--r--src/plugins/scripts/tcl/weechat-tcl.c35
1 files changed, 30 insertions, 5 deletions
diff --git a/src/plugins/scripts/tcl/weechat-tcl.c b/src/plugins/scripts/tcl/weechat-tcl.c
index 910e20551..f1c9da394 100644
--- a/src/plugins/scripts/tcl/weechat-tcl.c
+++ b/src/plugins/scripts/tcl/weechat-tcl.c
@@ -390,6 +390,30 @@ weechat_tcl_completion_cb (void *data, const char *completion_item,
}
/*
+ * weechat_tcl_infolist_cb: callback for infolist
+ */
+
+struct t_infolist *
+weechat_tcl_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, "tcl_script") == 0)
+ {
+ return script_infolist_list_scripts (weechat_tcl_plugin,
+ tcl_scripts, pointer);
+ }
+
+ return NULL;
+}
+
+/*
* weechat_tcl_debug_dump_cb: dump Tcl plugin data in WeeChat log file
*/
@@ -442,11 +466,12 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
tcl_quiet = 1;
script_init (weechat_tcl_plugin,
- weechat_tcl_command_cb,
- weechat_tcl_completion_cb,
- weechat_tcl_debug_dump_cb,
- weechat_tcl_buffer_closed_cb,
- weechat_tcl_load_cb);
+ &weechat_tcl_command_cb,
+ &weechat_tcl_completion_cb,
+ &weechat_tcl_infolist_cb,
+ &weechat_tcl_debug_dump_cb,
+ &weechat_tcl_buffer_closed_cb,
+ &weechat_tcl_load_cb);
tcl_quiet = 0;
script_display_short_list (weechat_tcl_plugin,