]> dxcluster.org Git - spider.git/commitdiff
fix talk and routing problems to mycall
authorminima <minima>
Fri, 6 Jul 2001 10:30:26 +0000 (10:30 +0000)
committerminima <minima>
Fri, 6 Jul 2001 10:30:26 +0000 (10:30 +0000)
Changes
perl/DXCommandmode.pm
perl/DXProt.pm

diff --git a/Changes b/Changes
index 6dcfcf238149ad0cd1bb4900ad666c42a23f8219..bc6210005c6a268dda205586aa2d154aa6291229 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,5 @@
+06Jul01=======================================================================
+1. fix talk and routing problems to mycall
 05Jul01=======================================================================
 1. disconnect channels whose route node has disappeared
 29Jun01=======================================================================
index cfedb1db07768c4f89d829753bf31cb236afbb93..c1a461ff640791c40cb5b9e90d5d13a5afcf1976 100644 (file)
@@ -105,8 +105,6 @@ sub start
                $user->qra(DXBearing::lltoqra($lat, $long)) if (defined $lat && defined $long);  
        }
 
-       $DXProt::me->conn($self->conn) if $call eq $main::myalias; # send all output for mycall to myalias
-
        Log('DXCommand', "$call connected");
 
        # send prompts and things
@@ -409,11 +407,6 @@ sub disconnect
        my $self = shift;
        my $call = $self->call;
 
-       # reset the redirection of messages back to 'normal' if we are the sysop
-       if ($call eq $main::myalias) {
-               $DXProt::me->conn(undef);
-       }
-
        my @rout = $main::routeroot->del_user($call);
        dbg("B/C PC17 on $main::mycall for: $call") if isdbg('route');
 
index 8364aca903e9f779ebd16054c5e2b9ff6b63a3fe..5f3890a02e0ee751e6ad2f3971facb376835e1a1 100644 (file)
@@ -316,7 +316,8 @@ sub normal
                        } else {
                                $call = $to = $field[2];
                        }
-                       $dxchan = DXChannel->get($call);
+                       $dxchan = DXChannel->get($main::myalias) if $call eq $main::mycall;
+                       $dxchan = DXChannel->get($call) unless $dxchan;
                        if ($dxchan && $dxchan->is_user) {
                                $field[3] =~ s/\%5E/^/g;
                                $dxchan->talk($field[1], $to, $via, $field[3]);
@@ -421,7 +422,7 @@ sub normal
                                        my $node;
                                        my $to = $user->homenode;
                                        my $last = $user->lastoper || 0;
-                                       if ($send_opernam && $main::systime > $last + $DXUser::lastoperinterval && $to && ($node = Route::Node::get($to)) ) {
+                                       if ($to ne $main::mycall && $send_opernam && $main::systime > $last + $DXUser::lastoperinterval && $to && ($node = Route::Node::get($to)) ) {
                                                my $cmd = "forward/opernam $spot[4]";
                                                # send the rcmd but we aren't interested in the replies...
                                                my $dxchan = $node->dxchan;
@@ -1515,7 +1516,7 @@ sub route
        if ($dxchan) {
                my $routeit = adjust_hops($dxchan, $line);   # adjust its hop count by node name
                if ($routeit) {
-                       $dxchan->send($routeit);
+                       $dxchan->send($routeit) unless $dxchan == $me;
                }
        } else {
                dbg("PCPROT: No route available, dropped") if isdbg('chanerr');
@@ -1693,10 +1694,10 @@ sub addrcmd
        $r->{t} = $main::systime;
        $r->{cmd} = $cmd;
        $rcmds{$to} = $r;
-
+       
        my $ref = Route::Node::get($to);
        my $dxchan = $ref->dxchan;
-    if ($dxchan && $dxchan->is_clx) {
+       if ($dxchan && $dxchan->is_clx) {
                route(undef, $to, pc84($main::mycall, $to, $self->{call}, $cmd));
        } else {
                route(undef, $to, pc34($main::mycall, $to, $cmd));