]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
trigger.pl: Fix for newer perls
authordequis <redacted>
Sat, 7 Nov 2015 16:45:20 +0000 (13:45 -0300)
committerdequis <redacted>
Sat, 7 Nov 2015 17:04:22 +0000 (14:04 -0300)
Pretty much just doing what the warning told me to do.

Done some testing and seems to behave as intended.

scripts/trigger.pl

index 6b88cbd2722c6b690b2e8a35e758051f1c03ce67..4b070e68e322a28398fe292d95c5bf5f27e3c5ff 100644 (file)
@@ -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';
git clone https://git.99rst.org/PROJECT