]> ruin.nu Git - ndwebbie.git/blobdiff - lib/NDWeb/Controller/Alliances.pm
Show how many times an alliance has been targeted by us.
[ndwebbie.git] / lib / NDWeb / Controller / Alliances.pm
index ec6da88f2d634d648549dea75564f0209b1f2c3c..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 BETWEEN $1 + i.eta AND $2 + i.eta
-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);