aboutsummaryrefslogtreecommitdiffstats
path: root/bin/spamcat
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2022-06-12 15:19:52 -0400
committerBrian Cully <bjc@kublai.com>2022-06-12 15:19:52 -0400
commita982d8ba8aa73bb316ebeb6f2eeabb304358b9fa (patch)
tree549c4fce57346c8a80a7a99b19a863da500eb0d1 /bin/spamcat
parent0718a13ba8225c9d180b3207470876d048184310 (diff)
downloadspamcat-a982d8ba8aa73bb316ebeb6f2eeabb304358b9fa.tar.gz
spamcat-a982d8ba8aa73bb316ebeb6f2eeabb304358b9fa.zip
Differentiate between 0 and undefined.
Diffstat (limited to 'bin/spamcat')
-rwxr-xr-xbin/spamcat3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/spamcat b/bin/spamcat
index 60fdf46..dfc0876 100755
--- a/bin/spamcat
+++ b/bin/spamcat
@@ -96,7 +96,8 @@ if ($#ARGV >= 0) {
} elsif ($cmd eq 'get') {
my $sender = shift @ARGV;
pod2usage(1) unless $sender;
- my $count = $sch->get_count($sender) || $conf{default_count};
+ my $count = $sch->get_count($sender);
+ $count = $conf{default_count} if (!defined $count);
print "$sender has $count messages remaining.\n";
} elsif ($cmd eq 'set') {
my ($sender, $count) = @ARGV;