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 {