1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

Fix scriptassist broken on unload

This is a regression introduced in
c5ad61b4b0 where one `defined' statement
got removed in error while cleaning up warnings.
This commit is contained in:
Ailin Nemui 2015-02-20 14:05:58 +01:00
parent 8657cd22cf
commit 6ce8a64118

View File

@ -1088,7 +1088,7 @@ sub sig_command_script_load ($$$) {
no strict;
$script = $2 if $script =~ /(.*\/)?(.*?)\.pl$/;
if ( %{ "Irssi::Script::${script}::" }) {
if ( &{ "Irssi::Script::${script}::pre_unload" }) {
if (defined &{ "Irssi::Script::${script}::pre_unload" }) {
print CLIENTCRAP "%R>>%n Triggering pre_unload function of $script...";
&{ "Irssi::Script::${script}::pre_unload" }();
}