route the right thing in the user portion of PC16
[spider.git] / perl / DXProt.pm
index 5f910bbbc4cc6ffd99ef40426f447797ce6b49b8..ab989c8f3ccf404cec3397006c3b4727919ca8d3 100644 (file)
@@ -729,11 +729,12 @@ sub normal
                                my $flags = Route::here($here)|Route::conf($conf);
                                
                                if ($r) {
+                                       my $au = $r->addparent($parent);                                        
                                        if ($r->flags != $flags) {
                                                $r->flags($flags);
-                                               push @rout, $r;
+                                               $au = $r;
                                        }
-                                       $r->addparent($parent);
+                                       push @rout, $r if $au;
                                } else {
                                        push @rout, $parent->add_user($call, $flags);
                                }
@@ -911,6 +912,7 @@ sub normal
                                                my $new = Route->new($call);          # throw away
                                                if ($self->in_filter_route($new)) {
                                                        my $ar = $parent->add($call, $ver, $flags);
+                                                       $user->wantroutepc19(1) unless defined $user->wantroutepc19;
                                                        push @rout, $ar if $ar;
                                                } else {
                                                        next;
@@ -1892,8 +1894,8 @@ sub disconnect
                $self->send_now("D", DXProt::pc39($main::mycall, $self->msg('disc1', "System Op")));
        }
 
-       # get rid of any PC16/17/19/21s
-       eph_del_regex("^PC(?:1[679]|21).*$call");
+       # get rid of any PC16/17/19
+       eph_del_regex("^PC1[679]*$call");
 
        # do routing stuff, remove me from routing table
        my $node = Route::Node::get($call);
@@ -1904,7 +1906,7 @@ sub disconnect
                # and all my ephemera as well
                for (@rout) {
                        my $c = $_->call;
-                       eph_del_regex("^PC(?:1[679]|21).*$c");
+                       eph_del_regex("^PC1[679].*$c");
                }
        }
        
@@ -1918,7 +1920,7 @@ sub disconnect
                }
                
                # and the ephemera
-               eph_del_regex("^PC(?:1[679]|21).*$k");
+               eph_del_regex("^PC1[679].*$k");
        }
 
        # unbusy and stop and outgoing mail