From f8c66145a19ebed3192a1f3a24af2f53fae2bd53 Mon Sep 17 00:00:00 2001 From: Daniel B Date: Tue, 10 May 2016 00:26:24 +0200 Subject: [PATCH] Check for negative strikes in karma (#265) Commit 5e157d2 introduced this bug: for negative karma, we have to check against negative strikes --- plugins/karma | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/karma b/plugins/karma index 2d2bbd6..4134b09 100644 --- a/plugins/karma +++ b/plugins/karma @@ -449,7 +449,7 @@ sub disconnect_handler { my $history = ($nice || 0) - $naughty; my $log_mess = ''; - if ($karma <= $self->{_args}{strikes}) { # Enough negative strikes ? + if ($karma <= -$self->{_args}{strikes}) { # Enough negative strikes ? $history--; my $negative_limit = 0 - $self->{_args}{negative}; if ($history <= $negative_limit) {