1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-02 15:53:12 +02:00

scripts: add option "eval_keep_context" in script plugins

This commit is contained in:
Sébastien Helleu
2018-01-15 22:00:15 +01:00
parent 21e63e7958
commit 8fbbe8b0d5
58 changed files with 351 additions and 0 deletions
+8
View File
@@ -45,6 +45,7 @@ struct t_plugin_script_data perl_data;
struct t_config_file *perl_config_file = NULL;
struct t_config_option *perl_config_look_check_license = NULL;
struct t_config_option *perl_config_look_eval_keep_context = NULL;
int perl_quiet = 0;
@@ -841,6 +842,12 @@ weechat_perl_eval (struct t_gui_buffer *buffer, int send_to_buffer_as_input,
perl_eval_exec_commands = 0;
perl_eval_buffer = NULL;
if (!weechat_config_boolean (perl_config_look_eval_keep_context))
{
weechat_perl_unload (perl_script_eval);
perl_script_eval = NULL;
}
return 1;
}
@@ -1259,6 +1266,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
perl_data.config_file = &perl_config_file;
perl_data.config_look_check_license = &perl_config_look_check_license;
perl_data.config_look_eval_keep_context = &perl_config_look_eval_keep_context;
perl_data.scripts = &perl_scripts;
perl_data.last_script = &last_perl_script;
perl_data.callback_command = &weechat_perl_command_cb;