From 29d82d114c1986d8a5dd1895dfc581ad56f2f86a Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 29 Mar 2026 13:45:43 -0700 Subject: [PATCH] applets/random-quote: move count to more sensible place --- applets/random-quote.pl | 20 ++++++++++---------- lib/PBot/VERSION.pm | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/applets/random-quote.pl b/applets/random-quote.pl index b725cfed..98bf44da 100755 --- a/applets/random-quote.pl +++ b/applets/random-quote.pl @@ -60,19 +60,19 @@ $db->begin(); my $quote = $db->get_random_quote($channel, $text, $author); -if ($show_count) { - my ($total, $remaining) = $db->count_random_quote($channel, $text, $author); - - if (defined $total && $total > 0) { - $total = $total->{'COUNT(*)'}; - $remaining = $total - $remaining->{'COUNT(*)'}; - print "$remaining/$total "; - } -} - if (!defined $quote) { print "No quote found.\n"; } else { + if ($show_count) { + my ($total, $remaining) = $db->count_random_quote($channel, $text, $author); + + if (defined $total && $total > 0) { + $total = $total->{'COUNT(*)'}; + $remaining = $total - $remaining->{'COUNT(*)'}; + print "$remaining/$total "; + } + } + if ($show_id) { print "$quote->{id}: "; } diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index 6cc15c74..6d87e161 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,8 +25,8 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4945, - BUILD_DATE => "2026-03-27", + BUILD_REVISION => 4946, + BUILD_DATE => "2026-03-29", }; sub initialize {}