4 # Note that this is a generator of pc21n and pc17n/pc17u
5 # and a consumer of fpc21n and fpc21n
9 # Copyright (c) 2005 Dirk Koopman G1TLH
16 use vars qw($VERSION $BRANCH);
18 main::mkver($VERSION = q$Revision$);
24 use Thingy::RouteFilter;
27 @ISA = qw(Thingy Thingy::RouteFilter);
32 unless ($thing->{Aranea}) {
33 $thing->{Aranea} = Aranea::genmsg($thing, [qw(s auth)]);
35 return $thing->{Aranea};
43 # fix the interface routing
44 my $intcall = $thing->{user} || $thing->{origin};
45 if ($dxchan->{call} eq $thing->{origin} && !$thing->{user}) {
46 RouteDB::delete_interface($intcall);
48 RouteDB::delete($intcall, $dxchan->{call});
53 if (my $user = $thing->{user}) {
54 my $parent = Route::Node::get($thing->{origin});
55 my $uref = Route::get($user);
56 if ($parent && $uref) {
57 if ($uref->isa('Route::Node')) {
58 @pc21 = $parent->del($uref);
60 $parent->del_user($uref);
61 $thing->{pc17n} = $parent;
62 $thing->{pc17u} = [$uref];
66 my $parent = Route::get($thing->{origin});
67 @pc21 = $parent->del_nodes if $parent;
70 $thing->{pc21n} = \@pc21 if @pc21;
72 $thing->broadcast($dxchan);