fix long callsign checking

This commit is contained in:
minima 2002-01-27 18:20:50 +00:00
parent cc7d21f996
commit ccd8bcf26e
3 changed files with 8 additions and 6 deletions

View File

@ -3,6 +3,7 @@
2. try to get the C client to handle closes on its standard input better
3. put some validation in cluster.pl to check that people have set it up
handled.
4. fix the long callsign checking
22Jan02=======================================================================
1. limit spot dupe checking to first 12 characters
13Jan02=======================================================================

View File

@ -441,6 +441,12 @@ sub normal
return;
}
}
if (Spot::dup($field[1], $field[2], $d, $field[5])) {
dbg("PCPROT: Duplicate Spot ignored\n") if isdbg('chanerr');
return;
}
my @spot = Spot::prepare($field[1], $field[2], $d, $field[5], $field[6], $field[7]);
# global spot filtering on INPUT
@ -451,11 +457,6 @@ sub normal
return;
}
}
if (Spot::dup($field[1], $field[2], $d, $field[5])) {
dbg("PCPROT: Duplicate Spot ignored\n") if isdbg('chanerr');
return;
}
# add it
Spot::add(@spot);

View File

@ -299,7 +299,7 @@ sub dup
return 2 if $d < $main::systime - $dupage;
$freq = sprintf "%.1f", $freq; # normalise frequency
$call = substr($call, 12) if length $call > 12;
$call = substr($call, 0, 12) if length $call > 12;
chomp $text;
$text =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg;
$text = substr($text, 0, $duplth) if length $text > $duplth;