3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-22 18:52:40 +01:00

Core/Factoids: top20: show only defined edited-by for edited sub-command

This commit is contained in:
Pragmatic Software 2024-10-23 22:32:27 -07:00
parent 4345b0a75c
commit f542cc0cf2
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
2 changed files with 2 additions and 1 deletions

View File

@ -1430,6 +1430,7 @@ sub cmd_top20($self, $context) {
if (lc $args eq 'edited') {
my $iter = $factoids->get_each('type = text', "index1 = $channel", 'index2', 'edited_on', 'edited_by', '_sort = -edited_on');
while (defined (my $factoid = $factoids->get_next($iter))) {
last if not defined $factoid->{'edited_on'};
my $ago = concise ago gettimeofday - $factoid->{'edited_on'};
my ($editor) = $factoid->{'edited_by'} =~ /^([^!]+)/;
$text .= ' ' . $factoids->get_data($factoid->{index1}, $factoid->{index2}, '_name') . " [$ago by $editor]\n";

View File

@ -25,7 +25,7 @@ use PBot::Imports;
# These are set by the /misc/update_version script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 4810,
BUILD_REVISION => 4811,
BUILD_DATE => "2024-10-23",
};