change DXChannel::get_all_ak1a to get_all_nodes
authorminima <minima>
Mon, 28 Aug 2000 11:44:55 +0000 (11:44 +0000)
committerminima <minima>
Mon, 28 Aug 2000 11:44:55 +0000 (11:44 +0000)
Changes
cmd/links.pl
cmd/show/configuration.pl
perl/DXChannel.pm
perl/DXMsg.pm
perl/DXProt.pm

diff --git a/Changes b/Changes
index f842cdfc2a2ed5ac9de2af3db5eafdc525361d18..06d1a6e3544ad394e4ea423dc7ccd0582922b95e 100644 (file)
--- 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
index 017d61199d0912ed2db23b054550abb8635a6ec0..648ebba43909eb4348ab4411ede5f5ea1dcada87 100644 (file)
@@ -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;
index 6fe170a002b4311fc0f577dc901baa54da87209e..bb845456e8c604ac3ee6e460a6f341b953ee3515 100644 (file)
@@ -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) {
index 7a27a8f2bc3bd3a90eda6efaaf388e9c6bc312fc..17f34919e7eb970f4eef85a2cc893e3dd95469d2 100644 (file)
@@ -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;
 }
index 0ef242352a28cb1e4c8532e584396600418df09b..58c548a22ac19e000bdc417d3e9091b3c351ca89 100644 (file)
@@ -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?
index 73fcfc54ad42156d339db25f7e282a532fd606ce..26d1b169854b585ee1cd94a136da525cb1ff47d7 100644 (file)
@@ -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