From: minima Date: Mon, 28 Aug 2000 11:44:55 +0000 (+0000) Subject: change DXChannel::get_all_ak1a to get_all_nodes X-Git-Tag: R_1_44~7 X-Git-Url: http://dxspider.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=29ec5bb85c591182dd868e7a3d87f510d7b47e9b;p=spider.git change DXChannel::get_all_ak1a to get_all_nodes --- diff --git a/Changes b/Changes index f842cdfc..06d1a6e3 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ +28Aug00======================================================================= +1. changes DXChannel::get_all_ak1a to get_all_nodes. 26Aug00======================================================================= 1. make blank origins on messages the node call. 2. added new version of FAQ from Ian G0VGS diff --git a/cmd/links.pl b/cmd/links.pl index 017d6119..648ebba4 100644 --- a/cmd/links.pl +++ b/cmd/links.pl @@ -15,7 +15,7 @@ my @out; push @out, " Callsign Type Started Ave RTT"; -foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all_ak1a ) { +foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all_nodes ) { my $call = $dxchan->call(); my $t = cldatetime($dxchan->startt); my $sort; diff --git a/cmd/show/configuration.pl b/cmd/show/configuration.pl index 6fe170a0..bb845456 100644 --- a/cmd/show/configuration.pl +++ b/cmd/show/configuration.pl @@ -16,7 +16,7 @@ my @val; push @out, "Node Callsigns"; if ($list[0] && $list[0] =~ /^NOD/) { - my @ch = sort {$a->call cmp $b->call} DXChannel::get_all_ak1a(); + my @ch = sort {$a->call cmp $b->call} DXChannel::get_all_nodes(); my $dxchan; foreach $dxchan (@ch) { diff --git a/perl/DXChannel.pm b/perl/DXChannel.pm index 7a27a8f2..17f34919 100644 --- a/perl/DXChannel.pm +++ b/perl/DXChannel.pm @@ -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', + node => '5,Node 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)] @@ -158,12 +160,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 +173,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 +184,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; } diff --git a/perl/DXMsg.pm b/perl/DXMsg.pm index 0ef24235..58c548a2 100644 --- a/perl/DXMsg.pm +++ b/perl/DXMsg.pm @@ -600,12 +600,12 @@ sub queue_msg my $call = shift; my $ref; my $clref; - my @nodelist = DXChannel::get_all_ak1a(); # bat down the message list looking for one that needs to go off site and whose # nearest node is not busy. dbg('msg', "queue msg ($sort)\n"); + my @nodelist = DXChannel::get_all_nodes; foreach $ref (@msg) { # firstly, is it private and unread? if so can I find the recipient # in my cluster node list offsite? diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 73fcfc54..26d1b169 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -263,6 +263,8 @@ sub normal { my ($self, $line) = @_; my @field = split /\^/, $line; + return unless @field; + pop @field if $field[-1] eq '~'; # print join(',', @field), "\n"; @@ -1354,7 +1356,7 @@ sub broadcast_ak1a { my $s = shift; # the line to be rebroadcast my @except = @_; # to all channels EXCEPT these (dxchannel refs) - my @dxchan = DXChannel::get_all_ak1a(); + my @dxchan = DXChannel::get_all_nodes(); my $dxchan; # send it if it isn't the except list and isn't isolated and still has a hop count @@ -1371,7 +1373,7 @@ sub broadcast_all_ak1a { my $s = shift; # the line to be rebroadcast my @except = @_; # to all channels EXCEPT these (dxchannel refs) - my @dxchan = DXChannel::get_all_ak1a(); + my @dxchan = DXChannel::get_all_nodes(); my $dxchan; # send it if it isn't the except list and isn't isolated and still has a hop count