diff options
Diffstat (limited to 'src/plugins/scripts/ruby/weechat-ruby.c')
-rw-r--r-- | src/plugins/scripts/ruby/weechat-ruby.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c index 278f270fb..a9c8681e9 100644 --- a/src/plugins/scripts/ruby/weechat-ruby.c +++ b/src/plugins/scripts/ruby/weechat-ruby.c @@ -582,6 +582,16 @@ weechat_ruby_load (const char *filename) ruby_current_script->interpreter = (VALUE *) curModule; rb_gc_register_address (ruby_current_script->interpreter); + /* + * set input/close callbacks for buffers created by this script + * (to restore callbacks after upgrade) + */ + script_set_buffer_callbacks (weechat_ruby_plugin, + ruby_scripts, + ruby_current_script, + &weechat_ruby_api_buffer_input_data_cb, + &weechat_ruby_api_buffer_close_cb); + return 1; } @@ -1059,16 +1069,13 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) script_init (weechat_ruby_plugin, argc, argv, - &ruby_scripts, &weechat_ruby_command_cb, &weechat_ruby_completion_cb, &weechat_ruby_infolist_cb, &weechat_ruby_signal_debug_dump_cb, &weechat_ruby_signal_buffer_closed_cb, &weechat_ruby_signal_script_action_cb, - &weechat_ruby_load_cb, - &weechat_ruby_api_buffer_input_data_cb, - &weechat_ruby_api_buffer_close_cb); + &weechat_ruby_load_cb); ruby_quiet = 0; script_display_short_list (weechat_ruby_plugin, |