1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 04:16:38 +02:00

scripts: fix reset of "quiet" status in case of nested calls (issue #2046, issue #2126)

This commit is contained in:
Sébastien Helleu
2024-06-26 18:09:12 +02:00
parent dc283dd1c7
commit 3d3d8f2ea7
8 changed files with 110 additions and 43 deletions
+15 -6
View File
@@ -742,13 +742,15 @@ weechat_guile_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
int exec_commands, const char *code)
{
void *func_argv[1], *result;
int old_guile_quiet;
if (!guile_script_eval)
{
old_guile_quiet = guile_quiet;
guile_quiet = 1;
guile_script_eval = weechat_guile_load (WEECHAT_SCRIPT_EVAL_NAME,
GUILE_EVAL_SCRIPT);
guile_quiet = 0;
guile_quiet = old_guile_quiet;
if (!guile_script_eval)
return 0;
}
@@ -777,9 +779,10 @@ weechat_guile_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
if (!weechat_config_boolean (guile_config_look_eval_keep_context))
{
old_guile_quiet = guile_quiet;
guile_quiet = 1;
weechat_guile_unload (guile_script_eval);
guile_quiet = 0;
guile_quiet = old_guile_quiet;
guile_script_eval = NULL;
}
@@ -796,7 +799,7 @@ weechat_guile_command_cb (const void *pointer, void *data,
int argc, char **argv, char **argv_eol)
{
char *ptr_name, *ptr_code, *path_script;
int i, send_to_buffer_as_input, exec_commands;
int i, send_to_buffer_as_input, exec_commands, old_guile_quiet;
/* make C compiler happy */
(void) pointer;
@@ -855,6 +858,7 @@ weechat_guile_command_cb (const void *pointer, void *data,
|| (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0))
{
old_guile_quiet = guile_quiet;
ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0)
{
@@ -884,7 +888,7 @@ weechat_guile_command_cb (const void *pointer, void *data,
/* unload guile script */
weechat_guile_unload_name (ptr_name);
}
guile_quiet = 0;
guile_quiet = old_guile_quiet;
}
else if (weechat_strcmp (argv[1], "eval") == 0)
{
@@ -1243,6 +1247,7 @@ int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{
char str_version[128];
int old_guile_quiet;
/* make C compiler happy */
(void) argc;
@@ -1318,9 +1323,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
guile_data.callback_load_file = &weechat_guile_load_cb;
guile_data.unload_all = &weechat_guile_unload_all;
old_guile_quiet = guile_quiet;
guile_quiet = 1;
plugin_script_init (weechat_guile_plugin, &guile_data);
guile_quiet = 0;
guile_quiet = old_guile_quiet;
plugin_script_display_short_list (weechat_guile_plugin,
guile_scripts);
@@ -1336,7 +1342,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
int
weechat_plugin_end (struct t_weechat_plugin *plugin)
{
int old_guile_quiet;
/* unload all scripts */
old_guile_quiet = guile_quiet;
guile_quiet = 1;
if (guile_script_eval)
{
@@ -1344,7 +1353,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
guile_script_eval = NULL;
}
plugin_script_end (plugin, &guile_data);
guile_quiet = 0;
guile_quiet = old_guile_quiet;
/* unprotect module */
weechat_guile_catch (scm_gc_unprotect_object, (void *)guile_module_weechat);
+10 -4
View File
@@ -582,7 +582,7 @@ weechat_js_command_cb (const void *pointer, void *data,
int argc, char **argv, char **argv_eol)
{
char *ptr_name, *ptr_code, *path_script;
int i, send_to_buffer_as_input, exec_commands;
int i, send_to_buffer_as_input, exec_commands, old_js_quiet;
/* make C++ compiler happy */
(void) pointer;
@@ -641,6 +641,7 @@ weechat_js_command_cb (const void *pointer, void *data,
|| (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0))
{
old_js_quiet = js_quiet;
ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0)
{
@@ -670,7 +671,7 @@ weechat_js_command_cb (const void *pointer, void *data,
/* unload javascript script */
weechat_js_unload_name (ptr_name);
}
js_quiet = 0;
js_quiet = old_js_quiet;
}
else if (weechat_strcmp (argv[1], "eval") == 0)
{
@@ -920,6 +921,7 @@ EXPORT int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{
char str_interpreter[64];
int old_js_quiet;
/* make C compiler happy */
(void) argc;
@@ -955,9 +957,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
js_data.callback_load_file = &weechat_js_load_cb;
js_data.unload_all = &weechat_js_unload_all;
old_js_quiet = js_quiet;
js_quiet = 1;
plugin_script_init (plugin, &js_data);
js_quiet = 0;
js_quiet = old_js_quiet;
plugin_script_display_short_list (weechat_js_plugin, js_scripts);
@@ -971,6 +974,9 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
EXPORT int
weechat_plugin_end (struct t_weechat_plugin *plugin)
{
int old_js_quiet;
old_js_quiet = js_quiet;
js_quiet = 1;
if (js_script_eval)
{
@@ -978,7 +984,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
js_script_eval = NULL;
}
plugin_script_end (plugin, &js_data);
js_quiet = 0;
js_quiet = old_js_quiet;
/* free some data */
if (js_action_install_list)
+16 -6
View File
@@ -861,13 +861,15 @@ weechat_lua_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
int exec_commands, const char *code)
{
void *func_argv[1], *result;
int old_lua_quiet;
if (!lua_script_eval)
{
old_lua_quiet = lua_quiet;
lua_quiet = 1;
lua_script_eval = weechat_lua_load (WEECHAT_SCRIPT_EVAL_NAME,
LUA_EVAL_SCRIPT);
lua_quiet = 0;
lua_quiet = old_lua_quiet;
if (!lua_script_eval)
return 0;
}
@@ -896,9 +898,10 @@ weechat_lua_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
if (!weechat_config_boolean (lua_config_look_eval_keep_context))
{
old_lua_quiet = lua_quiet;
lua_quiet = 1;
weechat_lua_unload (lua_script_eval);
lua_quiet = 0;
lua_quiet = old_lua_quiet;
lua_script_eval = NULL;
}
@@ -915,7 +918,7 @@ weechat_lua_command_cb (const void *pointer, void *data,
int argc, char **argv, char **argv_eol)
{
char *ptr_name, *ptr_code, *path_script;
int i, send_to_buffer_as_input, exec_commands;
int i, send_to_buffer_as_input, exec_commands, old_lua_quiet;
/* make C compiler happy */
(void) pointer;
@@ -974,6 +977,7 @@ weechat_lua_command_cb (const void *pointer, void *data,
|| (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0))
{
old_lua_quiet = lua_quiet;
ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0)
{
@@ -1003,7 +1007,7 @@ weechat_lua_command_cb (const void *pointer, void *data,
/* unload lua script */
weechat_lua_unload_name (ptr_name);
}
lua_quiet = 0;
lua_quiet = old_lua_quiet;
}
else if (weechat_strcmp (argv[1], "eval") == 0)
{
@@ -1249,6 +1253,8 @@ weechat_lua_signal_script_action_cb (const void *pointer, void *data,
int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{
int old_lua_quiet;
/* make C compiler happy */
(void) argc;
(void) argv;
@@ -1291,9 +1297,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
lua_data.callback_load_file = &weechat_lua_load_cb;
lua_data.unload_all = &weechat_lua_unload_all;
old_lua_quiet = lua_quiet;
lua_quiet = 1;
plugin_script_init (weechat_lua_plugin, &lua_data);
lua_quiet = 0;
lua_quiet = old_lua_quiet;
plugin_script_display_short_list (weechat_lua_plugin,
lua_scripts);
@@ -1309,7 +1316,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
int
weechat_plugin_end (struct t_weechat_plugin *plugin)
{
int old_lua_quiet;
/* unload all scripts */
old_lua_quiet = lua_quiet;
lua_quiet = 1;
if (lua_script_eval)
{
@@ -1317,7 +1327,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
lua_script_eval = NULL;
}
plugin_script_end (plugin, &lua_data);
lua_quiet = 0;
lua_quiet = old_lua_quiet;
/* free some data */
if (lua_action_install_list)
+16 -6
View File
@@ -832,13 +832,15 @@ weechat_perl_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
int exec_commands, const char *code)
{
void *func_argv[1], *result;
int old_perl_quiet;
if (!perl_script_eval)
{
old_perl_quiet = perl_quiet;
perl_quiet = 1;
perl_script_eval = weechat_perl_load (WEECHAT_SCRIPT_EVAL_NAME,
PERL_EVAL_SCRIPT);
perl_quiet = 0;
perl_quiet = old_perl_quiet;
if (!perl_script_eval)
return 0;
}
@@ -867,9 +869,10 @@ weechat_perl_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
if (!weechat_config_boolean (perl_config_look_eval_keep_context))
{
old_perl_quiet = perl_quiet;
perl_quiet = 1;
weechat_perl_unload (perl_script_eval);
perl_quiet = 0;
perl_quiet = old_perl_quiet;
perl_script_eval = NULL;
}
@@ -886,7 +889,7 @@ weechat_perl_command_cb (const void *pointer, void *data,
int argc, char **argv, char **argv_eol)
{
char *ptr_name, *ptr_code, *path_script;
int i, send_to_buffer_as_input, exec_commands;
int i, send_to_buffer_as_input, exec_commands, old_perl_quiet;
/* make C compiler happy */
(void) pointer;
@@ -945,6 +948,7 @@ weechat_perl_command_cb (const void *pointer, void *data,
|| (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0))
{
old_perl_quiet = perl_quiet;
ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0)
{
@@ -974,7 +978,7 @@ weechat_perl_command_cb (const void *pointer, void *data,
/* unload perl script */
weechat_perl_unload_name (ptr_name);
}
perl_quiet = 0;
perl_quiet = old_perl_quiet;
}
else if (weechat_strcmp (argv[1], "eval") == 0)
{
@@ -1243,6 +1247,8 @@ weechat_perl_signal_quit_upgrade_cb (const void *pointer, void *data,
int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{
int old_perl_quiet;
#ifdef PERL_SYS_INIT3
int a;
char **perl_args_local;
@@ -1316,9 +1322,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
perl_data.callback_load_file = &weechat_perl_load_cb;
perl_data.unload_all = &weechat_perl_unload_all;
old_perl_quiet = perl_quiet;
perl_quiet = 1;
plugin_script_init (weechat_perl_plugin, &perl_data);
perl_quiet = 0;
perl_quiet = old_perl_quiet;
plugin_script_display_short_list (weechat_perl_plugin,
perl_scripts);
@@ -1337,7 +1344,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
int
weechat_plugin_end (struct t_weechat_plugin *plugin)
{
int old_perl_quiet;
/* unload all scripts */
old_perl_quiet = perl_quiet;
perl_quiet = 1;
if (perl_script_eval)
{
@@ -1345,7 +1355,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
perl_script_eval = NULL;
}
plugin_script_end (plugin, &perl_data);
perl_quiet = 0;
perl_quiet = old_perl_quiet;
#ifndef MULTIPLICITY
/* free perl interpreter */
+11 -4
View File
@@ -870,7 +870,7 @@ weechat_php_command_cb (const void *pointer, void *data,
int argc, char **argv, char **argv_eol)
{
char *ptr_name, *ptr_code, *path_script;
int i, send_to_buffer_as_input, exec_commands;
int i, send_to_buffer_as_input, exec_commands, old_php_quiet;
/* make C compiler happy */
(void) pointer;
@@ -929,6 +929,7 @@ weechat_php_command_cb (const void *pointer, void *data,
|| (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0))
{
old_php_quiet = php_quiet;
ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0)
{
@@ -958,7 +959,7 @@ weechat_php_command_cb (const void *pointer, void *data,
/* unload PHP script */
weechat_php_unload_name (ptr_name);
}
php_quiet = 0;
php_quiet = old_php_quiet;
}
else if (weechat_strcmp (argv[1], "eval") == 0)
{
@@ -1267,6 +1268,8 @@ php_weechat_log_message (char *message)
int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{
int old_php_quiet;
/* make C compiler happy */
(void) argc;
(void) argv;
@@ -1314,9 +1317,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
PG(report_zend_debug) = 0; /* Turn off --enable-debug output */
old_php_quiet = php_quiet;
php_quiet = 1;
plugin_script_init (weechat_php_plugin, &php_data);
php_quiet = 0;
php_quiet = old_php_quiet;
plugin_script_display_short_list (weechat_php_plugin,
php_scripts);
@@ -1332,7 +1336,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
int
weechat_plugin_end (struct t_weechat_plugin *plugin)
{
int old_php_quiet;
/* unload all scripts */
old_php_quiet = php_quiet;
php_quiet = 1;
if (php_script_eval)
{
@@ -1340,7 +1347,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
php_script_eval = NULL;
}
plugin_script_end (plugin, &php_data);
php_quiet = 0;
php_quiet = old_php_quiet;
if (weechat_php_func_map)
{
+16 -6
View File
@@ -1041,13 +1041,15 @@ weechat_python_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
int exec_commands, const char *code)
{
void *func_argv[1], *result;
int old_python_quiet;
if (!python_script_eval)
{
old_python_quiet = python_quiet;
python_quiet = 1;
python_script_eval = weechat_python_load (WEECHAT_SCRIPT_EVAL_NAME,
PYTHON_EVAL_SCRIPT);
python_quiet = 0;
python_quiet = old_python_quiet;
if (!python_script_eval)
return 0;
}
@@ -1076,9 +1078,10 @@ weechat_python_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
if (!weechat_config_boolean (python_config_look_eval_keep_context))
{
old_python_quiet = python_quiet;
python_quiet = 1;
weechat_python_unload (python_script_eval);
python_quiet = 0;
python_quiet = old_python_quiet;
python_script_eval = NULL;
}
@@ -1095,7 +1098,7 @@ weechat_python_command_cb (const void *pointer, void *data,
int argc, char **argv, char **argv_eol)
{
char *ptr_name, *ptr_code, *path_script;
int i, send_to_buffer_as_input, exec_commands;
int i, send_to_buffer_as_input, exec_commands, old_python_quiet;
/* make C compiler happy */
(void) pointer;
@@ -1154,6 +1157,7 @@ weechat_python_command_cb (const void *pointer, void *data,
|| (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0))
{
old_python_quiet = python_quiet;
ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0)
{
@@ -1183,7 +1187,7 @@ weechat_python_command_cb (const void *pointer, void *data,
/* unload python script */
weechat_python_unload_name (ptr_name);
}
python_quiet = 0;
python_quiet = old_python_quiet;
}
else if (weechat_strcmp (argv[1], "eval") == 0)
{
@@ -1513,6 +1517,8 @@ weechat_python_signal_script_action_cb (const void *pointer, void *data,
int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{
int old_python_quiet;
/* make C compiler happy */
(void) argc;
(void) argv;
@@ -1588,9 +1594,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
python_data.callback_load_file = &weechat_python_load_cb;
python_data.unload_all = &weechat_python_unload_all;
old_python_quiet = python_quiet;
python_quiet = 1;
plugin_script_init (weechat_python_plugin, &python_data);
python_quiet = 0;
python_quiet = old_python_quiet;
plugin_script_display_short_list (weechat_python_plugin,
python_scripts);
@@ -1623,7 +1630,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
int
weechat_plugin_end (struct t_weechat_plugin *plugin)
{
int old_python_quiet;
/* unload all scripts */
old_python_quiet = python_quiet;
python_quiet = 1;
plugin_script_end (plugin, &python_data);
if (python_script_eval)
@@ -1631,7 +1641,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
weechat_python_unload (python_script_eval);
python_script_eval = NULL;
}
python_quiet = 0;
python_quiet = old_python_quiet;
/* free python interpreter */
if (python_mainThreadState != NULL)
+15 -7
View File
@@ -872,13 +872,15 @@ weechat_ruby_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
{
void *func_argv[1], *result;
char empty_arg[1] = { '\0' };
int old_ruby_quiet;
if (!ruby_script_eval)
{
old_ruby_quiet = ruby_quiet;
ruby_quiet = 1;
ruby_script_eval = weechat_ruby_load (WEECHAT_SCRIPT_EVAL_NAME,
RUBY_EVAL_SCRIPT);
ruby_quiet = 0;
ruby_quiet = old_ruby_quiet;
if (!ruby_script_eval)
return 0;
}
@@ -907,9 +909,10 @@ weechat_ruby_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
if (!weechat_config_boolean (ruby_config_look_eval_keep_context))
{
old_ruby_quiet = ruby_quiet;
ruby_quiet = 1;
weechat_ruby_unload (ruby_script_eval);
ruby_quiet = 0;
ruby_quiet = old_ruby_quiet;
ruby_script_eval = NULL;
}
@@ -926,7 +929,7 @@ weechat_ruby_command_cb (const void *pointer, void *data,
int argc, char **argv, char **argv_eol)
{
char *ptr_name, *ptr_code, *path_script;
int i, send_to_buffer_as_input, exec_commands;
int i, send_to_buffer_as_input, exec_commands, old_ruby_quiet;
/* make C compiler happy */
(void) pointer;
@@ -985,6 +988,7 @@ weechat_ruby_command_cb (const void *pointer, void *data,
|| (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0))
{
old_ruby_quiet = ruby_quiet;
ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0)
{
@@ -1014,7 +1018,7 @@ weechat_ruby_command_cb (const void *pointer, void *data,
/* unload ruby script */
weechat_ruby_unload_name (ptr_name);
}
ruby_quiet = 0;
ruby_quiet = old_ruby_quiet;
}
else if (weechat_strcmp (argv[1], "eval") == 0)
{
@@ -1260,7 +1264,7 @@ weechat_ruby_signal_script_action_cb (const void *pointer, void *data,
int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{
int ruby_error;
int ruby_error, old_ruby_quiet;
VALUE err;
char *weechat_ruby_code = {
"$stdout = WeechatOutputs\n"
@@ -1406,9 +1410,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
ruby_data.callback_load_file = &weechat_ruby_load_cb;
ruby_data.unload_all = &weechat_ruby_unload_all;
old_ruby_quiet = ruby_quiet;
ruby_quiet = 1;
plugin_script_init (weechat_ruby_plugin, &ruby_data);
ruby_quiet = 0;
ruby_quiet = old_ruby_quiet;
plugin_script_display_short_list (weechat_ruby_plugin,
ruby_scripts);
@@ -1424,7 +1429,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
int
weechat_plugin_end (struct t_weechat_plugin *plugin)
{
int old_ruby_quiet;
/* unload all scripts */
old_ruby_quiet = ruby_quiet;
ruby_quiet = 1;
if (ruby_script_eval)
{
@@ -1432,7 +1440,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
ruby_script_eval = NULL;
}
plugin_script_end (plugin, &ruby_data);
ruby_quiet = 0;
ruby_quiet = old_ruby_quiet;
ruby_cleanup (0);
signal (SIGCHLD, SIG_DFL);
+11 -4
View File
@@ -574,7 +574,7 @@ weechat_tcl_command_cb (const void *pointer, void *data,
int argc, char **argv, char **argv_eol)
{
char *ptr_name, *ptr_code, *path_script;
int i, send_to_buffer_as_input, exec_commands;
int i, send_to_buffer_as_input, exec_commands, old_tcl_quiet;
/* make C compiler happy */
(void) pointer;
@@ -633,6 +633,7 @@ weechat_tcl_command_cb (const void *pointer, void *data,
|| (weechat_strcmp (argv[1], "reload") == 0)
|| (weechat_strcmp (argv[1], "unload") == 0))
{
old_tcl_quiet = tcl_quiet;
ptr_name = argv_eol[2];
if (strncmp (ptr_name, "-q ", 3) == 0)
{
@@ -662,7 +663,7 @@ weechat_tcl_command_cb (const void *pointer, void *data,
/* unload tcl script */
weechat_tcl_unload_name (ptr_name);
}
tcl_quiet = 0;
tcl_quiet = old_tcl_quiet;
}
else if (weechat_strcmp (argv[1], "eval") == 0)
{
@@ -910,6 +911,8 @@ weechat_tcl_signal_script_action_cb (const void *pointer, void *data,
int
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
{
int old_tcl_quiet;
/* make C compiler happy */
(void) argc;
(void) argv;
@@ -947,9 +950,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
tcl_data.callback_load_file = &weechat_tcl_load_cb;
tcl_data.unload_all = &weechat_tcl_unload_all;
old_tcl_quiet = tcl_quiet;
tcl_quiet = 1;
plugin_script_init (weechat_tcl_plugin, &tcl_data);
tcl_quiet = 0;
tcl_quiet = old_tcl_quiet;
plugin_script_display_short_list (weechat_tcl_plugin,
tcl_scripts);
@@ -965,7 +969,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
int
weechat_plugin_end (struct t_weechat_plugin *plugin)
{
int old_tcl_quiet;
/* unload all scripts */
old_tcl_quiet = tcl_quiet;
tcl_quiet = 1;
if (tcl_script_eval)
{
@@ -973,7 +980,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
tcl_script_eval = NULL;
}
plugin_script_end (plugin, &tcl_data);
tcl_quiet = 0;
tcl_quiet = old_tcl_quiet;
/* free some data */
if (tcl_action_install_list)