tidy up prefix handling
[spider.git] / perl / Prefix.pm
index 65074b83d0c5f98c01f75e877dcfd6fee9032b4f..bc8a0edf92ea3f411b6e2f242fe6eef824a228ad 100644 (file)
@@ -473,14 +473,17 @@ sub to_ciz
        return @out;
 }
 
-# get the full country data (dxcc, itu, cq, state) as a list
+# get the full country data (dxcc, itu, cq, state, city) as a list
 # from a callsign. 
 sub cty_data
 {
        my $call = shift;
        
        my @dxcc = extract($call);
-       return @dxcc ? ($dxcc[1]->dxcc, $dxcc[1]->itu, $dxcc[1]->cq, $dxcc[1]->state) : ();
+       if (@dxcc) {
+               return ($dxcc[1]->dxcc, $dxcc[1]->itu, $dxcc[1]->cq, $dxcc[1]->state, $dxcc[1]->city);
+       }
+       return (666,0,0,'','');         
 }
 
 my %valid = (