X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXChannel.pm;h=9d52d67c3a204481a220e2feac51a833efd4357b;hb=15a742ea0f1983282fdff272a362555afbdb99ad;hp=7a27a8f2bc3bd3a90eda6efaaf388e9c6bc312fc;hpb=4e5b3de7a26563d94678fb790b8a1e2c4daaac8d;p=spider.git diff --git a/perl/DXChannel.pm b/perl/DXChannel.pm index 7a27a8f2..9d52d67c 100644 --- a/perl/DXChannel.pm +++ b/perl/DXChannel.pm @@ -17,9 +17,9 @@ # # PLEASE NOTE - I am a C programmer using this as a method of learning perl # firstly and OO about ninthly (if you don't like the design and you can't -# improve it with better OO by make it smaller and more efficient, then tough). +# improve it with better OO and thus make it smaller and more efficient, then tough). # -# Copyright (c) 1998 - Dirk Koopman G1TLH +# Copyright (c) 1998-2000 - Dirk Koopman G1TLH # # $Id$ # @@ -87,6 +87,7 @@ use vars qw(%channels %valid); pingave => '0,Ping ave time', logininfo => '9,Login info req,yesno', talklist => '0,Talk List,parray', + cluster => '5,Cluster data', ); # object destruction @@ -106,6 +107,7 @@ sub DESTROY undef $self->{inwwvfilter}; undef $self->{inspotfilter}; undef $self->{passwd}; + undef $self->{node}; } # create a new channel object [$obj = DXChannel->new($call, $msg_conn_obj, $user_obj)] @@ -131,12 +133,6 @@ sub alloc $self->{lang} = $main::lang if !$self->{lang}; $self->{func} = ""; - # get the filters - $self->{spotfilter} = Filter::read_in('spots', $call, 0); - $self->{wwvfilter} = Filter::read_in('wwv', $call, 0); - $self->{wcyfilter} = Filter::read_in('wcy', $call, 0); - $self->{annfilter} = Filter::read_in('ann', $call, 0); - bless $self, $pkg; return $channels{$call} = $self; } @@ -158,12 +154,11 @@ sub get_all # # gimme all the ak1a nodes # -sub get_all_ak1a +sub get_all_nodes { - my @list = DXChannel->get_all(); my $ref; my @out; - foreach $ref (@list) { + foreach $ref (values %channels) { push @out, $ref if $ref->is_node; } return @out; @@ -172,10 +167,9 @@ sub get_all_ak1a # return a list of all users sub get_all_users { - my @list = DXChannel->get_all(); my $ref; my @out; - foreach $ref (@list) { + foreach $ref (values %channels) { push @out, $ref if $ref->is_user; } return @out; @@ -184,11 +178,10 @@ sub get_all_users # return a list of all user callsigns sub get_all_user_calls { - my @list = DXChannel->get_all(); my $ref; my @out; - foreach $ref (@list) { - push @out, $ref->call if $ref->is_user; + foreach $ref (values %channels) { + push @out, $ref->{call} if $ref->is_user; } return @out; }