]> ruin.nu Git - ndwebbie.git/blobdiff - lib/NDWeb/Controller/Alliances.pm
Show target coords as soon as they are released
[ndwebbie.git] / lib / NDWeb / Controller / Alliances.pm
index 5f3372655474d454f355131c6ebd0c58d0390372..8f0b6c67555203131bbcb25b828e7978945eb6a8 100644 (file)
@@ -189,12 +189,8 @@ sub hostile : Local {
        }
 
        my $query = $dbh->prepare(q{
-               SELECT s.aid AS id,s.alliance AS name,count(*) AS hostile_count
-FROM calls c 
-       JOIN incomings i USING (call)
-       JOIN current_planet_stats s USING (pid)
-WHERE c.landing_tick - i.eta > $1 and c.landing_tick - i.eta < $2
-GROUP BY s.aid,s.alliance
+SELECT aid, alliance, hostile_count, targeted, targeted_raids
+FROM hostile_alliances($1,$2)
 ORDER BY hostile_count DESC
                });
        $query->execute($begintick,$endtick);