From: Michael Andreen Date: Mon, 10 Aug 2020 16:53:02 +0000 (+0200) Subject: List handled requests in scan channel X-Git-Url: https://ruin.nu/git/?p=NDIRC.git;a=commitdiff_plain;h=410507b62593ec8cc527567ce44b2be347352df7 List handled requests in scan channel --- diff --git a/Delling.pm b/Delling.pm index c6d06fa..c6df7f2 100644 --- a/Delling.pm +++ b/Delling.pm @@ -149,11 +149,19 @@ sub refresh { SET sent = TRUE WHERE id = ANY($1) }); $scans->execute; + my @scanreqs; while (my $scan = $scans->fetchrow_hashref){ $self->message("($scan->{coords} $scan->{type})" ." http://game.planetarion.com/showscan.pl?scan_id=$scan->{scan_id}" , @{$scan->{nick}}); $sentscan->execute($scan->{id}); + push @scanreqs, @{$scan->{id}}; + } + + if (scalar @scanreqs > 0) + { + my $scanreqs = join(', ', @scanreqs); + $self->toTarget(scan => "Handled the following requests: $scanreqs"); } my @row = $dbh->selectrow_array(q{SELECT tick(), max(tick) FROM planet_stats});