add CTY-2008 from cty_wt.dat, stop chat on pc12
[spider.git] / perl / ExtMsg.pm
index 0ca2de83c6f5d367a67fbb4dc87d0267372b84f0..6b2cce7d5059aea87f97a3af8d70632378aaf4da 100644 (file)
@@ -72,7 +72,7 @@ sub dequeue
        my $conn = shift;
        my $msg;
 
-       if ($conn->{csort} eq 'ax25' && exists $conn->{msg}) {
+       if ($conn->ax25 && exists $conn->{msg}) {
                $conn->{msg} =~ s/\cM/\cJ/g;
        }
        if ($conn->{state} eq 'WC') {
@@ -153,7 +153,11 @@ sub to_connected
        delete $conn->{cmd};
        $conn->{timeout}->del if $conn->{timeout};
        delete $conn->{timeout};
-       $conn->nolinger unless $conn->isa('AGWMsg') || $conn->isa('BPQMsg');
+       $conn->{csort} = $sort;
+       unless ($conn->ax25) {
+               eval {$conn->{peerhost} = $conn->{sock}->peerhost};
+               $conn->nolinger;
+       }
        &{$conn->{rproc}}($conn, "$dir$call|$sort");
        $conn->_send_file("$main::data/connected") unless $conn->{outgoing};
 }