]> ruin.nu Git - ndwebbie.git/blobdiff - scripts/ndrank.pl
Get agent and guard information from planet scans
[ndwebbie.git] / scripts / ndrank.pl
index cc7c12767e190b8681de3b72f44cdc663703998d..e5d152c936f64208a2e78e396b5586ed0d189ff4 100755 (executable)
@@ -27,15 +27,10 @@ use DBD::Pg qw(:pg_types);
 
 use LWP::Simple;
 
-our $dbh;
-for my $file ("/home/whale/db.pl")
-{
-       unless (my $return = do $file){
-               warn "couldn't parse $file: $@" if $@;
-               warn "couldn't do $file: $!"    unless defined $return;
-               warn "couldn't run $file"       unless $return;
-       }
-}
+use lib qw{/var/www/ndawn/lib/};
+use ND::DB;
+
+our $dbh = ND::DB::DB();
 
 $dbh->begin_work;
 my $st = $dbh->prepare(q{SELECT uid FROM current_planet_stats p JOIN users u ON p.id = u.planet WHERE alliance_id = 1 ORDER BY score DESC});