]> ruin.nu Git - NDIRC.git/commitdiff
List handled requests in scan channel
authorMichael Andreen <harv@ruin.nu>
Mon, 10 Aug 2020 16:53:02 +0000 (18:53 +0200)
committerMichael Andreen <harv@ruin.nu>
Mon, 10 Aug 2020 16:53:02 +0000 (18:53 +0200)
Delling.pm

index c6d06fa1ac500ccaf92e14c5efed3476c99bb5b1..c6df7f24b7c5f9d5fb64f786ae7260592b4e6e24 100644 (file)
@@ -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});