]> ruin.nu Git - ndwebbie.git/blobdiff - scripts/parseplanets.pl
LWP::Simple fix for cloudfare
[ndwebbie.git] / scripts / parseplanets.pl
index a01377f1aa86df741ef15f35218852314310d872..518a887201661cc63a413332e9662e05ff7720e4 100755 (executable)
@@ -22,11 +22,10 @@ q{
 
 use strict;
 use warnings;
+use local::lib;
 use DBI;
 use DBD::Pg qw(:pg_types);
 
-use LWP::Simple;
-
 use FindBin;
 use lib "$FindBin::Bin/../lib";
 
@@ -85,6 +84,7 @@ while (my @planet = $findplanets->fetchrow){
 }
 my $intel = $dbh->prepare(q{INSERT INTO forum_posts (ftid,uid,message) VALUES(
                (SELECT ftid FROM planets WHERE pid = $2),$1,$3)});
+$dbh->do(q{DELETE FROM planet_stats WHERE tick = $1},undef,$tick);
 for my $planet (@planets) {
        #print "$planet->[1]\n";
        my $oldPlanet = $oldStats{$planet->[1]};