use LWP::Simple;
-use lib qw{/var/www/ndawn/};
+use lib qw{/var/www/ndawn/lib/};
use ND::DB;
our $dbh = ND::DB::DB();
$select->execute($type,$head[2]);
unless ($select->fetchrow){
my $file = get("http://game.planetarion.com/botfiles/${type}_listing.txt");
- if ($file =~ /Tick: (\d+)/){
+ if (defined $file && $file =~ /Tick: (\d+)/){
$updated = $1;
$insert->execute($1,$type,$head[2],$file);
}
}
if ($updated){
- `/var/www/ndawn/scripts/parsedumps.pl $updated`;
+ `/var/www/ndawn/scripts/parsealliances.pl $updated`;
+ `/var/www/ndawn/scripts/parseplanets.pl $updated`;
+ `/var/www/ndawn/scripts/parsegalaxies.pl $updated`;
`/var/www/ndawn/scripts/ndrank.pl`;
- $dbh->do("UPDATE misc SET value = ? WHERE id = 'TICK'", undef, $updated);
+ $dbh->do(q{UPDATE misc SET value = ? WHERE id = 'TICK'}, undef, $updated);
+ local $dbh->{Warn} = 0;
+ $dbh->do(q{VACUUM ANALYZE});
}