X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=scripts%2Fscans.pl;h=dc5b575681b790e32fae97c417c2d86e595d9eb2;hb=c26dd7395127b35eef6f219f23ebd6ffc453c2dc;hp=3e01d7823944242fdd470a1c7d4cb85f68ffa246;hpb=124a0112372b96cfb48bee4544ffdb4a975a5e3e;p=ndwebbie.git diff --git a/scripts/scans.pl b/scripts/scans.pl index 3e01d78..dc5b575 100755 --- a/scripts/scans.pl +++ b/scripts/scans.pl @@ -140,7 +140,7 @@ while (my $scan = $newscans->fetchrow_hashref){ my ($target) = $dbh->selectrow_array($findplanet,undef ,$2,$3,$4,$t) or die $dbh->errstr; die "No target: $2:$3:$4" unless defined $target; - my $id = addfleet($1,$mission,undef,$planet,$target,$5 + my $id = addfleet($1,$mission,undef,$target,$planet,$5 ,$eta,$back,$6, ($x == $2 && $y == $3)); $fleetscan->execute($id,$scan->{id}) or die $dbh->errstr; } @@ -195,7 +195,7 @@ sub addfleet { $total += $2; push @ships, [$1,$2]; } - $amount = $total if not defined $amount && defined $ships; + $amount = $total if (!defined $amount) && defined $ships; my $id = $dbh->selectrow_array($addfleet,undef,$name,$mission,$sender ,$target,$tick, $eta, $back, $amount,$ingal) or die $dbh->errstr; for my $s (@ships){