X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FAGWMsg.pm;h=f6fc50747f9a5fa005099630777770e4cdec2986;hb=4e6ea4e7991cf205a61637e16f5cf852399e7ad9;hp=d6828812f2f31dbd2684b3143db3575bbae39647;hpb=e8fe72d833414c4bb7f017ed0b62167aa5ac593d;p=spider.git diff --git a/perl/AGWMsg.pm b/perl/AGWMsg.pm index d6828812..f6fc5074 100644 --- a/perl/AGWMsg.pm +++ b/perl/AGWMsg.pm @@ -327,15 +327,9 @@ sub _decode $conn->{incoming} = 1; $conn->{agwcall} = $call; $circuit{$call} = $conn; - if ($call =~ /^(\w+)-(\d\d?)$/) { - my $c = $1; - my $s = $2; - $s = 15 - $s; - if ($s <= 8 && $s > 0) { - $call = "${c}-${s}"; - } else { - $call = $c; - } + if (my ($c, $s) = $call =~ /^(\w+)-(\d\d?)$/) { + $s = 15 - $s if $s > 8; + $call = $s > 0 ? "${c}-${s}" : $c; } $conn->to_connected($call, 'A', $conn->{csort} = 'ax25'); }