fix various minor bugs in plugins scripts
This commit is contained in:
parent
0ef010d211
commit
7a80558d0f
@ -138,8 +138,6 @@ weechat_perl_exec (t_weechat_plugin *plugin,
|
||||
|
||||
count = perl_call_argv (func, G_EVAL | G_SCALAR, argv);
|
||||
|
||||
perl_current_script = NULL;
|
||||
|
||||
SPAGAIN;
|
||||
|
||||
sv = GvSV (gv_fetchpv ("@", TRUE, SVt_PV));
|
||||
@ -917,7 +915,7 @@ weechat_perl_load (t_weechat_plugin *plugin, char *filename)
|
||||
perl_destruct (perl_current_interpreter);
|
||||
perl_free (perl_current_interpreter);
|
||||
#endif
|
||||
if (perl_current_script != NULL)
|
||||
if ((perl_current_script != NULL) && (perl_current_script != &tempscript))
|
||||
weechat_script_remove (plugin, &perl_scripts, perl_current_script);
|
||||
|
||||
return 0;
|
||||
|
@ -78,8 +78,6 @@ weechat_python_exec (t_weechat_plugin *plugin,
|
||||
|
||||
rc = PyObject_CallFunction(evFunc, "ss", server == NULL ? "" : server, arguments == NULL ? "" : arguments);
|
||||
|
||||
python_current_script = NULL;
|
||||
|
||||
if (rc)
|
||||
{
|
||||
ret = (int) PyInt_AsLong(rc);
|
||||
|
@ -126,8 +126,6 @@ weechat_ruby_exec (t_weechat_plugin *plugin,
|
||||
&ruby_error, 2,
|
||||
rb_str_new2((server == NULL) ? "" : server),
|
||||
rb_str_new2((arguments == NULL) ? "" : arguments));
|
||||
ruby_current_script = NULL;
|
||||
|
||||
if (ruby_error)
|
||||
{
|
||||
VALUE ruby_error_info = rb_inspect(ruby_errinfo);
|
||||
@ -996,6 +994,10 @@ weechat_ruby_load (t_weechat_plugin *plugin, char *filename)
|
||||
filename);
|
||||
ruby_plugin->printf_server (ruby_plugin,
|
||||
"Ruby error: %s", STR2CSTR(ruby_error_info));
|
||||
|
||||
if (ruby_current_script != NULL)
|
||||
weechat_script_remove (plugin, &ruby_scripts, ruby_current_script);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -138,8 +138,6 @@ weechat_perl_exec (t_weechat_plugin *plugin,
|
||||
|
||||
count = perl_call_argv (func, G_EVAL | G_SCALAR, argv);
|
||||
|
||||
perl_current_script = NULL;
|
||||
|
||||
SPAGAIN;
|
||||
|
||||
sv = GvSV (gv_fetchpv ("@", TRUE, SVt_PV));
|
||||
@ -917,7 +915,7 @@ weechat_perl_load (t_weechat_plugin *plugin, char *filename)
|
||||
perl_destruct (perl_current_interpreter);
|
||||
perl_free (perl_current_interpreter);
|
||||
#endif
|
||||
if (perl_current_script != NULL)
|
||||
if ((perl_current_script != NULL) && (perl_current_script != &tempscript))
|
||||
weechat_script_remove (plugin, &perl_scripts, perl_current_script);
|
||||
|
||||
return 0;
|
||||
|
@ -78,8 +78,6 @@ weechat_python_exec (t_weechat_plugin *plugin,
|
||||
|
||||
rc = PyObject_CallFunction(evFunc, "ss", server == NULL ? "" : server, arguments == NULL ? "" : arguments);
|
||||
|
||||
python_current_script = NULL;
|
||||
|
||||
if (rc)
|
||||
{
|
||||
ret = (int) PyInt_AsLong(rc);
|
||||
|
@ -126,8 +126,6 @@ weechat_ruby_exec (t_weechat_plugin *plugin,
|
||||
&ruby_error, 2,
|
||||
rb_str_new2((server == NULL) ? "" : server),
|
||||
rb_str_new2((arguments == NULL) ? "" : arguments));
|
||||
ruby_current_script = NULL;
|
||||
|
||||
if (ruby_error)
|
||||
{
|
||||
VALUE ruby_error_info = rb_inspect(ruby_errinfo);
|
||||
@ -996,6 +994,10 @@ weechat_ruby_load (t_weechat_plugin *plugin, char *filename)
|
||||
filename);
|
||||
ruby_plugin->printf_server (ruby_plugin,
|
||||
"Ruby error: %s", STR2CSTR(ruby_error_info));
|
||||
|
||||
if (ruby_current_script != NULL)
|
||||
weechat_script_remove (plugin, &ruby_scripts, ruby_current_script);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user