X-Git-Url: http://scm.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FExtMsg.pm;h=c4522146defe2b09443003f1fe6bd64704915976;hb=a2fc02fa7ad04e42be78783a4aa38a771b7d1ec3;hp=e181722d1ba36d0d9f614bcdaa894ca017250ef6;hpb=4a89177a94f3a5ca3f3a1d1231ae5cdd6abd5155;p=spider.git diff --git a/perl/ExtMsg.pm b/perl/ExtMsg.pm index e181722d..c4522146 100644 --- a/perl/ExtMsg.pm +++ b/perl/ExtMsg.pm @@ -70,7 +70,7 @@ sub dequeue } } if ($conn->{state} eq 'WC' && exists $conn->{cmd} && @{$conn->{cmd}} == 0) { - $conn->to_connected($conn->{call}, 'O', $conn->{sort}); + $conn->to_connected($conn->{call}, 'O', $conn->{csort}); } } elsif ($conn->{msg} =~ /\cJ/) { my @lines = $conn->{msg} =~ /([^\cM\cJ]*)\cM?\cJ/g; @@ -90,7 +90,7 @@ sub dequeue } elsif ($conn->{state} eq 'WL' ) { $msg = uc $msg; if (is_callsign($msg)) { - $conn->to_connected($msg, 'A', 'telnet'); + $conn->to_connected($msg, 'A', $conn->{csort}); } else { $conn->send_now("Sorry $msg is an invalid callsign"); $conn->disconnect; @@ -99,7 +99,7 @@ sub dequeue if (exists $conn->{cmd} && @{$conn->{cmd}}) { $conn->_docmd($msg); if ($conn->{state} eq 'WC' && exists $conn->{cmd} && @{$conn->{cmd}} == 0) { - $conn->to_connected($conn->{call}, 'O', $conn->{sort}); + $conn->to_connected($conn->{call}, 'O', $conn->{csort}); } } } @@ -211,6 +211,10 @@ sub _doconnect } else { dbg('connect', "***Connect Failed to $host $port $!"); } + } elsif ($sort eq 'agw') { + # turn it into an AGW object + bless $conn, 'AGWMsg'; + $r = $conn->connect($line); } elsif ($sort eq 'ax25' || $sort eq 'prog') { local $^F = 10000; # make sure it ain't closed on exec my ($a, $b) = IO::Socket->socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC); @@ -308,7 +312,7 @@ sub _dochat } if ($line =~ /\Q$expect/i) { dbg('connect', "got: \"$expect\" sending: \"$send\""); - $conn->send_later($send); + $conn->send_later("D$conn->{call}|$send"); delete $conn->{msg}; # get rid any input if a match return; }