summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/guile/weechat-guile.c24
-rw-r--r--src/plugins/lua/weechat-lua.c20
-rw-r--r--src/plugins/perl/weechat-perl.c20
-rw-r--r--src/plugins/plugin-script.c3
-rw-r--r--src/plugins/plugin-script.h3
-rw-r--r--src/plugins/python/weechat-python.c20
-rw-r--r--src/plugins/ruby/weechat-ruby.c21
-rw-r--r--src/plugins/tcl/weechat-tcl.c20
8 files changed, 131 insertions, 0 deletions
diff --git a/src/plugins/guile/weechat-guile.c b/src/plugins/guile/weechat-guile.c
index 246ee4600..fa26c5f92 100644
--- a/src/plugins/guile/weechat-guile.c
+++ b/src/plugins/guile/weechat-guile.c
@@ -775,6 +775,29 @@ weechat_guile_signal_debug_dump_cb (void *data, const char *signal,
}
/*
+ * Display infos about external libraries used.
+ */
+
+int
+weechat_guile_signal_debug_libs_cb (void *data, const char *signal,
+ const char *type_data, void *signal_data)
+{
+ /* make C compiler happy */
+ (void) data;
+ (void) signal;
+ (void) type_data;
+ (void) signal_data;
+
+ weechat_printf (NULL, " %s: v%d.%d.%d",
+ GUILE_PLUGIN_NAME,
+ SCM_MAJOR_VERSION,
+ SCM_MINOR_VERSION,
+ SCM_MICRO_VERSION);
+
+ return WEECHAT_RC_OK;
+}
+
+/*
* Callback called when a buffer is closed.
*/
@@ -958,6 +981,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
init.callback_hdata = &weechat_guile_hdata_cb;
init.callback_infolist = &weechat_guile_infolist_cb;
init.callback_signal_debug_dump = &weechat_guile_signal_debug_dump_cb;
+ init.callback_signal_debug_libs = &weechat_guile_signal_debug_libs_cb;
init.callback_signal_buffer_closed = &weechat_guile_signal_buffer_closed_cb;
init.callback_signal_script_action = &weechat_guile_signal_script_action_cb;
init.callback_load_file = &weechat_guile_load_cb;
diff --git a/src/plugins/lua/weechat-lua.c b/src/plugins/lua/weechat-lua.c
index e9425fa0a..bddcff600 100644
--- a/src/plugins/lua/weechat-lua.c
+++ b/src/plugins/lua/weechat-lua.c
@@ -783,6 +783,25 @@ weechat_lua_signal_debug_dump_cb (void *data, const char *signal,
}
/*
+ * Display infos about external libraries used.
+ */
+
+int
+weechat_lua_signal_debug_libs_cb (void *data, const char *signal,
+ const char *type_data, void *signal_data)
+{
+ /* make C compiler happy */
+ (void) data;
+ (void) signal;
+ (void) type_data;
+ (void) signal_data;
+
+ weechat_printf (NULL, " %s: %s", LUA_PLUGIN_NAME, LUA_VERSION);
+
+ return WEECHAT_RC_OK;
+}
+
+/*
* Callback called when a buffer is closed.
*/
@@ -900,6 +919,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
init.callback_hdata = &weechat_lua_hdata_cb;
init.callback_infolist = &weechat_lua_infolist_cb;
init.callback_signal_debug_dump = &weechat_lua_signal_debug_dump_cb;
+ init.callback_signal_debug_libs = &weechat_lua_signal_debug_libs_cb;
init.callback_signal_buffer_closed = &weechat_lua_signal_buffer_closed_cb;
init.callback_signal_script_action = &weechat_lua_signal_script_action_cb;
init.callback_load_file = &weechat_lua_load_cb;
diff --git a/src/plugins/perl/weechat-perl.c b/src/plugins/perl/weechat-perl.c
index bbc0b6483..aa1594a89 100644
--- a/src/plugins/perl/weechat-perl.c
+++ b/src/plugins/perl/weechat-perl.c
@@ -811,6 +811,25 @@ weechat_perl_signal_debug_dump_cb (void *data, const char *signal,
}
/*
+ * Display infos about external libraries used.
+ */
+
+int
+weechat_perl_signal_debug_libs_cb (void *data, const char *signal,
+ const char *type_data, void *signal_data)
+{
+ /* make C compiler happy */
+ (void) data;
+ (void) signal;
+ (void) type_data;
+ (void) signal_data;
+
+ weechat_printf (NULL, " %s: v%s", PERL_PLUGIN_NAME, PERL_VERSION_STRING);
+
+ return WEECHAT_RC_OK;
+}
+
+/*
* Callback called when a buffer is closed.
*/
@@ -976,6 +995,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
init.callback_hdata = &weechat_perl_hdata_cb;
init.callback_infolist = &weechat_perl_infolist_cb;
init.callback_signal_debug_dump = &weechat_perl_signal_debug_dump_cb;
+ init.callback_signal_debug_libs = &weechat_perl_signal_debug_libs_cb;
init.callback_signal_buffer_closed = &weechat_perl_signal_buffer_closed_cb;
init.callback_signal_script_action = &weechat_perl_signal_script_action_cb;
init.callback_load_file = &weechat_perl_load_cb;
diff --git a/src/plugins/plugin-script.c b/src/plugins/plugin-script.c
index d2956a84f..a04e5e95c 100644
--- a/src/plugins/plugin-script.c
+++ b/src/plugins/plugin-script.c
@@ -207,6 +207,9 @@ plugin_script_init (struct t_weechat_plugin *weechat_plugin,
/* add signal for "debug_dump" */
weechat_hook_signal ("debug_dump", init->callback_signal_debug_dump, NULL);
+ /* add signal for "debug_libs" */
+ weechat_hook_signal ("debug_libs", init->callback_signal_debug_libs, NULL);
+
/* add signal for "buffer_closed" */
weechat_hook_signal ("buffer_closed",
init->callback_signal_buffer_closed, NULL);
diff --git a/src/plugins/plugin-script.h b/src/plugins/plugin-script.h
index aaf770148..f579fe089 100644
--- a/src/plugins/plugin-script.h
+++ b/src/plugins/plugin-script.h
@@ -83,6 +83,9 @@ struct t_plugin_script_init
int (*callback_signal_debug_dump)(void *data, const char *signal,
const char *type_data,
void *signal_data);
+ int (*callback_signal_debug_libs)(void *data, const char *signal,
+ const char *type_data,
+ void *signal_data);
int (*callback_signal_buffer_closed)(void *data, const char *signal,
const char *type_data,
void *signal_data);
diff --git a/src/plugins/python/weechat-python.c b/src/plugins/python/weechat-python.c
index becd762ab..f10050359 100644
--- a/src/plugins/python/weechat-python.c
+++ b/src/plugins/python/weechat-python.c
@@ -1127,6 +1127,25 @@ weechat_python_signal_debug_dump_cb (void *data, const char *signal,
}
/*
+ * Display infos about external libraries used.
+ */
+
+int
+weechat_python_signal_debug_libs_cb (void *data, const char *signal,
+ const char *type_data, void *signal_data)
+{
+ /* make C compiler happy */
+ (void) data;
+ (void) signal;
+ (void) type_data;
+ (void) signal_data;
+
+ weechat_printf (NULL, " %s: v%s", PYTHON_PLUGIN_NAME, PY_VERSION);
+
+ return WEECHAT_RC_OK;
+}
+
+/*
* Callback called when a buffer is closed.
*/
@@ -1286,6 +1305,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
init.callback_hdata = &weechat_python_hdata_cb;
init.callback_infolist = &weechat_python_infolist_cb;
init.callback_signal_debug_dump = &weechat_python_signal_debug_dump_cb;
+ init.callback_signal_debug_libs = &weechat_python_signal_debug_libs_cb;
init.callback_signal_buffer_closed = &weechat_python_signal_buffer_closed_cb;
init.callback_signal_script_action = &weechat_python_signal_script_action_cb;
init.callback_load_file = &weechat_python_load_cb;
diff --git a/src/plugins/ruby/weechat-ruby.c b/src/plugins/ruby/weechat-ruby.c
index 4e6d45c85..b4490e8a6 100644
--- a/src/plugins/ruby/weechat-ruby.c
+++ b/src/plugins/ruby/weechat-ruby.c
@@ -23,6 +23,7 @@
#undef _
#include <ruby.h>
+#include <ruby/version.h>
#if defined(RUBY_VERSION) && RUBY_VERSION >=19
#include <ruby/encoding.h>
#endif
@@ -948,6 +949,25 @@ weechat_ruby_signal_debug_dump_cb (void *data, const char *signal,
}
/*
+ * Display infos about external libraries used.
+ */
+
+int
+weechat_ruby_signal_debug_libs_cb (void *data, const char *signal,
+ const char *type_data, void *signal_data)
+{
+ /* make C compiler happy */
+ (void) data;
+ (void) signal;
+ (void) type_data;
+ (void) signal_data;
+
+ weechat_printf (NULL, " %s: v%s", RUBY_PLUGIN_NAME, ruby_version);
+
+ return WEECHAT_RC_OK;
+}
+
+/*
* Callback called when a buffer is closed.
*/
@@ -1163,6 +1183,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
init.callback_hdata = &weechat_ruby_hdata_cb;
init.callback_infolist = &weechat_ruby_infolist_cb;
init.callback_signal_debug_dump = &weechat_ruby_signal_debug_dump_cb;
+ init.callback_signal_debug_libs = &weechat_ruby_signal_debug_libs_cb;
init.callback_signal_buffer_closed = &weechat_ruby_signal_buffer_closed_cb;
init.callback_signal_script_action = &weechat_ruby_signal_script_action_cb;
init.callback_load_file = &weechat_ruby_load_cb;
diff --git a/src/plugins/tcl/weechat-tcl.c b/src/plugins/tcl/weechat-tcl.c
index 82090b327..096ef57fb 100644
--- a/src/plugins/tcl/weechat-tcl.c
+++ b/src/plugins/tcl/weechat-tcl.c
@@ -689,6 +689,25 @@ weechat_tcl_signal_debug_dump_cb (void *data, const char *signal,
}
/*
+ * Display infos about external libraries used.
+ */
+
+int
+weechat_tcl_signal_debug_libs_cb (void *data, const char *signal,
+ const char *type_data, void *signal_data)
+{
+ /* make C compiler happy */
+ (void) data;
+ (void) signal;
+ (void) type_data;
+ (void) signal_data;
+
+ weechat_printf (NULL, " %s: v%s", TCL_PLUGIN_NAME, TCL_VERSION);
+
+ return WEECHAT_RC_OK;
+}
+
+/*
* Callback called when a buffer is closed.
*/
@@ -806,6 +825,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
init.callback_hdata = &weechat_tcl_hdata_cb;
init.callback_infolist = &weechat_tcl_infolist_cb;
init.callback_signal_debug_dump = &weechat_tcl_signal_debug_dump_cb;
+ init.callback_signal_debug_libs = &weechat_tcl_signal_debug_libs_cb;
init.callback_signal_buffer_closed = &weechat_tcl_signal_buffer_closed_cb;
init.callback_signal_script_action = &weechat_tcl_signal_script_action_cb;
init.callback_load_file = &weechat_tcl_load_cb;