From: dequis Date: Sat, 7 Nov 2015 16:45:20 +0000 (-0300) Subject: trigger.pl: Fix for newer perls X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=7c68c0a357fe5634c1e32a0c8ee169abe5faf95f;p=irssi-scripts.irssi.org.git trigger.pl: Fix for newer perls Pretty much just doing what the warning told me to do. Done some testing and seems to behave as intended. --- diff --git a/scripts/trigger.pl b/scripts/trigger.pl index 6b88cbd..4b070e6 100644 --- a/scripts/trigger.pl +++ b/scripts/trigger.pl @@ -736,7 +736,7 @@ sub get_flags { my ($chatnet, $channel, $nick, $address) = @_; my $flags; no strict 'refs'; - if (defined %{ 'Irssi::Script::people::' }) { + if (%{ 'Irssi::Script::people::' }) { if (defined ($channel)) { $flags = (&{ 'Irssi::Script::people::find_local_flags' }($chatnet,$channel,$nick,$address)); } else { @@ -745,7 +745,7 @@ sub get_flags { $flags = join('',keys(%{$flags})); } else { my $shasta; - if (defined %{ 'Irssi::Script::friends_shasta::' }) { + if (%{ 'Irssi::Script::friends_shasta::' }) { $shasta = 'friends_shasta'; } elsif (defined &{ 'Irssi::Script::friends::get_idx' }) { $shasta = 'friends';