3
0
mirror of https://github.com/pragma-/pbot.git synced 2026-04-01 13:08:02 +02:00

applets/random-quote: move count to more sensible place

This commit is contained in:
Pragmatic Software 2026-03-29 13:45:43 -07:00
parent 557e271293
commit 29d82d114c
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
2 changed files with 12 additions and 12 deletions

View File

@ -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}: ";
}

View File

@ -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 {}