]> ruin.nu Git - ndwebbie.git/commitdiff
Format for scans has changed to include commas in numbers
authorMichael Andreen <harv@ruin.nu>
Sun, 21 Mar 2010 09:25:21 +0000 (09:25 +0000)
committerMichael Andreen <harv@ruin.nu>
Sun, 21 Mar 2010 15:20:38 +0000 (15:20 +0000)
scripts/scans.pl

index 096d175bc015fdd6613cf43eea66c3f0f2f97da1..f6b6be316d14debf006acaf3f34a05d67e50fe5b 100755 (executable)
@@ -128,6 +128,7 @@ sub parse_unit {
 sub parse_jumpgate {
        my ($scan,$file) = @_;
 
+       $file =~ s/,//g;
        while ($file =~ m{(\d+):(\d+):(\d+)\D+(Attack|Defend|Return)</td><td class="left">([^<]*)\D+(\d+)\D+(\d+)}g){
                my ($sender) = $dbh->selectrow_array($findplanet,undef,$1,$2,$3,$scan->{tick});
                ($sender) = $dbh->selectrow_array($findoldplanet,undef,$1,$2,$3,$scan->{tick})
@@ -271,6 +272,7 @@ sub addfleet {
 
        my @ships;
        my $total = 0;
+       $ships =~ s/,//g;
        while(defined $ships && $ships =~ m{((?:[a-zA-Z]| )+)</td><td(?: class="right")?>(\d+)}sg){
                $total += $2;
                push @ships, [$1,$2];