From: Michael Andreen Date: Tue, 15 Jan 2008 09:27:00 +0000 (+0100) Subject: Switched target and sender for Launch news items, and properly set amount as null... X-Git-Url: https://ruin.nu/git/?p=ndwebbie.git;a=commitdiff_plain;h=c2665d4b5323a324e5d29ce08a3e6d5295387eec Switched target and sender for Launch news items, and properly set amount as null for these --- diff --git a/scripts/scans.pl b/scripts/scans.pl index 3e01d78..30c4b59 100755 --- a/scripts/scans.pl +++ b/scripts/scans.pl @@ -128,7 +128,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,$6 + my $id = addfleet($1,$mission,undef,$target,$planet,$6 ,$eta,$back,undef, ($x == $2 && $y == $3)); $fleetscan->execute($id,$scan->{id}) or die $dbh->errstr; }elsif($news eq 'Incoming' && $text =~ m/We have detected an open jumpgate from (.*?), located at (\d+):(\d+):(\d+). The fleet will approach our system in tick (\d+) and appears to have roughly (\d+) ships/g){ @@ -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){