From dc7406ccb8fac679813461db3c6585f4a7fbe3a5 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Wed, 9 Aug 2017 01:22:13 -0700 Subject: [PATCH] Fix a couple of keys on scalar --- PBot/ChanOps.pm | 2 +- PBot/Plugins/AntiRepeat.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PBot/ChanOps.pm b/PBot/ChanOps.pm index e51b78b4..7ce8deb9 100644 --- a/PBot/ChanOps.pm +++ b/PBot/ChanOps.pm @@ -324,7 +324,7 @@ sub check_unban_queue { last if $count >= $self->{pbot}->{ircd}->{MODES}; } - if (not keys $self->{unban_queue}->{$channel}) { + if (not keys %{ $self->{unban_queue}->{$channel} }) { delete $self->{unban_queue}->{$channel}; $done = 1; } diff --git a/PBot/Plugins/AntiRepeat.pm b/PBot/Plugins/AntiRepeat.pm index 704a4ec4..43c4df28 100644 --- a/PBot/Plugins/AntiRepeat.pm +++ b/PBot/Plugins/AntiRepeat.pm @@ -156,7 +156,7 @@ sub adjust_offenses { if ($self->{offenses}->{$account}->{$channel}->{offenses} <= 0) { delete $self->{offenses}->{$account}->{$channel}; - if (keys $self->{offenses}->{$account} == 0) { + if (keys %{ $self->{offenses}->{$account} } == 0) { delete $self->{offenses}->{$account}; } } else {