X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=check.pl;h=9112aa21982b1bc9000c4c01aa6aeca9f9dd708c;hb=1cb36d8d6abd14abad07e7dc49ed3a8cc396ffaa;hp=1f9fd03680866328a729e720fb6ef861047ac163;hpb=a7cec3a4152ab42e16d6b530f25f960909c72eca;p=ndwebbie.git diff --git a/check.pl b/check.pl index 1f9fd03..9112aa2 100644 --- a/check.pl +++ b/check.pl @@ -41,9 +41,9 @@ if (param('coords') =~ /(\d+)(?: |:)(\d+)(?:(?: |:)(\d+))?(?: |:(\d+))?/){ } if (isMember() && param('cmd') eq 'arbiter'){ - my $query = $DBH->prepare(q{SELECT count(*) AS friendlies FROM current_planet_stats WHERE x = ? AND z = ? + my $query = $DBH->prepare(q{SELECT count(*) AS friendlies FROM current_planet_stats WHERE x = ? AND y = ? AND (planet_status IN ('Friendly','NAP') OR relationship IN ('Friendly','NAP'))}); - my $count = $DBH->selectrow_array($query,undef,$x,$y); + my ($count) = $DBH->selectrow_array($query,undef,$x,$y); if ($count > 0){ $BODY->param(Arbiter => 'DO NOT ATTACK THIS GAL'); }else{