X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FThingy%2FRt.pm;h=554d171aea445f9ed6d65e231d6b3881eb102d44;hb=de7f7dbbadcad48ba245f22db044b14954e18782;hp=362904d01cac4b311eb2679e379f0afbea16f25e;hpb=24e7cdb8b2479635fc99952e007bfc6c4c7f6a9a;p=spider.git diff --git a/perl/Thingy/Rt.pm b/perl/Thingy/Rt.pm index 362904d0..554d171a 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); + $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; }