aboutsummaryrefslogtreecommitdiffstats
path: root/lib/SpamCat.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/SpamCat.pm')
-rw-r--r--lib/SpamCat.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/SpamCat.pm b/lib/SpamCat.pm
index cbae3fd..282ac7c 100644
--- a/lib/SpamCat.pm
+++ b/lib/SpamCat.pm
@@ -48,7 +48,7 @@ sub filter {
# Negative counts indicate unlimited delivery.
#
if (defined $count && $count >= 0) {
- my $count_str = '[' . ($self->{default_count} - $count + 1) . '/' . $self->{default_count} . ']';
+ my $count_str = '[' . ($self->{default_count} - $count) . '/' . $self->{default_count} . ']';
my $new_subject = $email->header('Subject');
if ($new_subject) {
$new_subject .= ' - ' . $count_str;
@@ -158,7 +158,7 @@ sub decrement_count_t {
my $q;
my $count = $self->get_count_t($sender);
if (!defined $count) {
- $count = $self->{default_count};
+ $count = $self->{default_count} - 1;
$q = 'INSERT INTO emails (count, sender) VALUES (?, ?)';
} elsif ($count <= 0) {
return $count;