while (my $intel = $query->fetchrow_hashref){
my $def = {target => $intel->{coords}.(defined $intel->{alliance} ? " ($intel->{alliance})" : ''), tick => $intel->{tick}};
if (defined $intel->{alliance_id} && $intel->{alliance_id} == 1){
while (my $intel = $query->fetchrow_hashref){
my $def = {target => $intel->{coords}.(defined $intel->{alliance} ? " ($intel->{alliance})" : ''), tick => $intel->{tick}};
if (defined $intel->{alliance_id} && $intel->{alliance_id} == 1){