1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 12:26:40 +02:00

fix the possibility to load a perl script even if it doesn't call register() function

This commit is contained in:
Emmanuel Bouthenot
2007-02-17 18:23:50 +00:00
parent aba6e1257d
commit 429167f032
8 changed files with 16 additions and 28 deletions
+1 -3
View File
@@ -2331,7 +2331,7 @@ weechat_lua_load (t_weechat_plugin *plugin, char *filename)
plugin->print_server (plugin,
"Lua warning: unable to redirect stdout and stderr");
lua_current_script_filename = strdup (filename);
lua_current_script_filename = filename;
if (luaL_loadfile (lua_current_interpreter, filename) != 0)
{
@@ -2363,9 +2363,7 @@ weechat_lua_load (t_weechat_plugin *plugin, char *filename)
weechat_script_remove (plugin, &lua_scripts, lua_current_script);
return 0;
}
fclose (fp);
free (lua_current_script_filename);
if (lua_current_script == NULL)
{