X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FAGWMsg.pm;h=771551430a99b7d7b1bf704ba330dd0ffc02efc0;hb=ca3a14c5a22a621e9b69ecf0acc2a5da08c5ab91;hp=d6828812f2f31dbd2684b3143db3575bbae39647;hpb=e8fe72d833414c4bb7f017ed0b62167aa5ac593d;p=spider.git diff --git a/perl/AGWMsg.pm b/perl/AGWMsg.pm index d6828812..77155143 100644 --- a/perl/AGWMsg.pm +++ b/perl/AGWMsg.pm @@ -16,7 +16,7 @@ # because I have the 'power of perl' available that avoids me getting # terminally bored sorting out other people's sloppyness. # -# $Id$ +# # # Copyright (c) 2001 - Dirk Koopman G1TLH # @@ -45,12 +45,6 @@ $hpolltime = 300 unless defined $hpolltime; %circuit = (); $total_in = $total_out = 0; -use vars qw($VERSION $BRANCH); -$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); -$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); -$main::build += $VERSION; -$main::branch += $BRANCH; - sub init { return unless $enable; @@ -104,6 +98,11 @@ sub finish } } +sub login +{ + goto &main::login; # save some writing, this was the default +} + sub active { return $sock; @@ -327,15 +326,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'); }