diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-03-28 20:58:00 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-03-28 20:58:00 +0100 |
commit | b2f1273c01f2f13f02683a7d31823540f251f951 (patch) | |
tree | a3bcdde82e0b3f3aaeaed5d986ec45b5b7dadd99 /src/plugins/scripts/ruby/weechat-ruby.c | |
parent | 30a50c6999b8ba312abe674470ac052e322211a1 (diff) | |
download | weechat-b2f1273c01f2f13f02683a7d31823540f251f951.zip |
Add infolists with list of scripts
Diffstat (limited to 'src/plugins/scripts/ruby/weechat-ruby.c')
-rw-r--r-- | src/plugins/scripts/ruby/weechat-ruby.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c index 18f1d5398..78a3965a4 100644 --- a/src/plugins/scripts/ruby/weechat-ruby.c +++ b/src/plugins/scripts/ruby/weechat-ruby.c @@ -649,6 +649,30 @@ weechat_ruby_completion_cb (void *data, const char *completion_item, } /* + * weechat_ruby_infolist_cb: callback for infolist + */ + +struct t_infolist * +weechat_ruby_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, "ruby_script") == 0) + { + return script_infolist_list_scripts (weechat_ruby_plugin, + ruby_scripts, pointer); + } + + return NULL; +} + +/* * weechat_ruby_debug_dump_cb: dump Ruby plugin data in WeeChat log file */ @@ -785,6 +809,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) script_init (weechat_ruby_plugin, &weechat_ruby_command_cb, &weechat_ruby_completion_cb, + &weechat_ruby_infolist_cb, &weechat_ruby_debug_dump_cb, &weechat_ruby_buffer_closed_cb, &weechat_ruby_load_cb); |