]> ruin.nu Git - NDIRC.git/blobdiff - Scans.pm
Converted .getscans
[NDIRC.git] / Scans.pm
index b2621e8d332da3b3332fe9abf8e04ead03357dff..2b33361c65413da1665e70fe11e78f6a8e6fe3a4 100644 (file)
--- a/Scans.pm
+++ b/Scans.pm
@@ -84,49 +84,6 @@ sub sendScan {
        }
 }
 
-
-our %scantypes;
-{
-       my $i = 1;
-       %scantypes = map {$_ => $i++} @scantypes;
-}
-
-sub scanReqs {
-       my ($msg, $command) = @_;
-
-       if (scanner()){
-
-               my @notype;
-               if ($msg && $msg =~ /-([pdunja]+)/){
-                       for (split //, $1){
-                               push @notype, $scantypes[$scanid{$_}-1];
-                       }
-               }
-
-               my $reqs = $ND::DBH->prepare(q{SELECT min(sr.id) AS id, x,y,z,type
-                       FROM scan_requests sr
-                               JOIN current_planet_stats p ON p.id = sr.planet
-                       WHERE sr.time > NOW() - '30 min'::INTERVAL
-                               AND NOT EXISTS (SELECT scan_id FROM scans
-                                       WHERE planet = sr.planet
-                                               AND type = sr.type
-                                               AND tick >= sr.tick
-                               )
-                               AND type <> ALL($1)
-                       GROUP BY x,y,z,type
-                       ORDER BY id
-                       });
-               $reqs->execute(\@notype);
-               my $text = '';
-               while (my $req = $reqs->fetchrow_hashref){
-                       $text .= "$ND::B$req->{id}$ND::O http://game.planetarion.com/waves.pl?id=$scantypes{$req->{type}}&x=$req->{x}&y=$req->{y}&z=$req->{z} "
-               }
-
-               $text = 'No unhandled requests.' unless $text;
-               $ND::server->command("notice $ND::nick $text");
-       }
-}
-
 sub getScan {
        my ($msg, $command) = @_;