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:
parent
557e271293
commit
29d82d114c
20
applets/random-quote.pl
vendored
20
applets/random-quote.pl
vendored
@ -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}: ";
|
||||
}
|
||||
|
||||
@ -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 {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user