X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FThingy%2FRt.pm;h=bdc4bf41de4415d27d5b05517d34de5ecf1f1643;hb=652422252c199b15fbbc500a4fff6f31dcf3b8d1;hp=362904d01cac4b311eb2679e379f0afbea16f25e;hpb=24e7cdb8b2479635fc99952e007bfc6c4c7f6a9a;p=spider.git diff --git a/perl/Thingy/Rt.pm b/perl/Thingy/Rt.pm index 362904d0..bdc4bf41 100644 --- a/perl/Thingy/Rt.pm +++ b/perl/Thingy/Rt.pm @@ -24,11 +24,9 @@ use Thingy; use Thingy::RouteFilter; use Spot; -use vars qw(@ISA $update_interval); +use vars qw(@ISA); @ISA = qw(Thingy Thingy::RouteFilter); -$update_interval = 30 * 60; # the interval between 'cf' updates for an interface - sub gen_Aranea { my $thing = shift; @@ -37,13 +35,13 @@ sub gen_Aranea unless ($thing->{Aranea}) { my $ref; if ($ref = $thing->{anodes}) { - $thing->{a} = join(':', map {"$_->{flags}$_->{call}"} @$ref); + $thing->{a} = join(':', map {"$_->{flags}$_->{call}"} @$ref) || ''; } - if ($ref = $thing->{anodes}) { - $thing->{n} = join(':', map {"$_->{flags}$_->{call}"} @$ref); + if ($ref = $thing->{pnodes}) { + $thing->{n} = join(':', map {"$_->{flags}$_->{call}"} @$ref) || ''; } if ($ref = $thing->{ausers}) { - $thing->{u} = join(':', map {"$_->{flags}$_->{call}"} @$ref); + $thing->{u} = join(':', map {"$_->{flags}$_->{call}"} @$ref) || ''; } $thing->{Aranea} = Aranea::genmsg($thing, [qw(s a n u)]); } @@ -238,12 +236,9 @@ sub copy_pc16_data $thing->{'s'} = 'cf'; - my @u = $uref->users; - if (@u) { - $thing->{ausers} = [map {Route::User::get($_)} @u]; - return scalar @u; - } - return undef; + my @u = map {Route::User::get($_)} $uref->users; + $thing->{ausers} = \@u; + return @u; }