]> ruin.nu Git - ndwebbie.git/blobdiff - scripts/stats.pl
minor updates
[ndwebbie.git] / scripts / stats.pl
index ad8fc0030f013edc9510f7c5b6c0e81e05ea1fed..bcac7fe8f81274b2d182b71b677db8728e64b436 100755 (executable)
@@ -26,18 +26,11 @@ use DBI;
 use DBD::Pg qw(:pg_types);
 
 use LWP::Simple;
+use lib qw{/var/www/ndawn/};
+use ND::DB;
+
+our $dbh = ND::DB::DB();
 
-$0 =~ /(.*\/)[^\/]/;
-my $dir = $1;
-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;
-       }
-}
 $dbh->do("SET CLIENT_ENCODING TO 'LATIN1';");
 
 my %classes = (Fighter => 'Fi', Corvette => 'Co', Frigate => 'Fr', Destroyer => 'De', Cruiser => 'Cr', Battleship => 'Bs');