From 7925b2d242513844cb42e4b146994f7b00643f7a Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 20 Mar 2010 17:09:07 +0100 Subject: Refresh screen when exiting WeeChat (to display messages printed after /quit) --- src/plugins/scripts/python/weechat-python.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/plugins/scripts/python') diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c index e406de6b7..55e1be01e 100644 --- a/src/plugins/scripts/python/weechat-python.c +++ b/src/plugins/scripts/python/weechat-python.c @@ -537,9 +537,12 @@ weechat_python_unload (struct t_plugin_script *script) void *interpreter; PyThreadState *old_interpreter; - weechat_printf (NULL, - weechat_gettext ("%s: unloading script \"%s\""), - PYTHON_PLUGIN_NAME, script->name); + if ((weechat_python_plugin->debug >= 1) || !python_quiet) + { + weechat_printf (NULL, + weechat_gettext ("%s: unloading script \"%s\""), + PYTHON_PLUGIN_NAME, script->name); + } if (script->shutdown_func && script->shutdown_func[0]) { @@ -943,11 +946,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) int weechat_plugin_end (struct t_weechat_plugin *plugin) { - /* make C compiler happy */ - (void) plugin; - /* unload all scripts */ - weechat_python_unload_all (); + python_quiet = 1; + script_end (plugin, &python_scripts, &weechat_python_unload_all); + python_quiet = 0; /* free Python interpreter */ if (python_mainThreadState != NULL) -- cgit v1.2.3