X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FExtMsg.pm;h=15f875a7facf6f514d29785d4121a22f1c71b599;hb=a90885c5c10b837b05ef1ebf718fd88e428a3c91;hp=133a1513acdef46cba5bb2cefc808f601e104716;hpb=6f20114b034d329c1e2a4f91f0aba2f6ec4002d4;p=spider.git diff --git a/perl/ExtMsg.pm b/perl/ExtMsg.pm index 133a1513..15f875a7 100644 --- a/perl/ExtMsg.pm +++ b/perl/ExtMsg.pm @@ -9,6 +9,9 @@ # # Copyright (c) 2001 - Dirk Koopman G1TLH # +# Modified Jan 2006 by John Wiseman G8BPQ to support connections to BPQ32 node, +# and fix pattern matching on 'chat' abort handling +# package ExtMsg; @@ -21,12 +24,6 @@ use IO::File; use IO::Socket; use IPC::Open3; -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; - use vars qw(@ISA $deftimeout); @ISA = qw(Msg); @@ -157,7 +154,7 @@ sub to_connected delete $conn->{cmd}; $conn->{timeout}->del if $conn->{timeout}; delete $conn->{timeout}; - $conn->nolinger; + $conn->nolinger unless $conn->isa('AGWMsg'); &{$conn->{rproc}}($conn, "$dir$call|$sort"); $conn->_send_file("$main::data/connected") unless $conn->{outgoing}; } @@ -276,6 +273,10 @@ sub _doconnect # turn it into an AGW object bless $conn, 'AGWMsg'; $r = $conn->connect($line); + } elsif ($sort eq 'bpq') { + # turn it into an BPQ object + bless $conn, 'BPQMsg'; + $r = $conn->connect($line); } elsif ($sort eq 'ax25' || $sort eq 'prog') { $r = $conn->start_program($line, $sort); } else { @@ -324,7 +325,7 @@ sub _dochat if ($line) { if ($expect) { dbg("connect $conn->{cnum}: expecting: \"$expect\" received: \"$line\"") if isdbg('connect'); - if ($conn->{abort} && $line =~ /\Q$conn->{abort}/i) { + if ($conn->{abort} && $line =~ /$conn->{abort}/i) { dbg("connect $conn->{cnum}: aborted on /$conn->{abort}/") if isdbg('connect'); $conn->disconnect; delete $conn->{cmd};