backport mojo console.pl width/scolling changes
[spider.git] / perl / DXChannel.pm
index fcc230aa324b25238535084697d473b1cfdf60a1..fedaee056d4815807f744748297b7b786f322300 100644 (file)
@@ -80,11 +80,13 @@ $count = 0;
                  wcyfilter => '5,WCY Filt-out',
                  spotsfilter => '5,Spot Filt-out',
                  routefilter => '5,Route Filt-out',
+                 pc92filter => '5,PC92 Route Filt-out',
                  inannfilter => '5,Ann Filt-inp',
                  inwwvfilter => '5,WWV Filt-inp',
                  inwcyfilter => '5,WCY Filt-inp',
                  inspotsfilter => '5,Spot Filt-inp',
                  inroutefilter => '5,Route Filt-inp',
+                 inpc92filter => '5,PC92 Route Filt-inp',
                  passwd => '9,Passwd List,yesno',
                  pingint => '5,Ping Interval ',
                  nopings => '5,Ping Obs Count',
@@ -157,12 +159,15 @@ sub alloc
                $user->new_buddies unless $user->buddies;
                $self->{group} = $user->group;
                $self->{sort} = $user->sort;
+               $self->{width} = $user->width;
        }
        $self->{startt} = $self->{t} = time;
        $self->{state} = 0;
        $self->{oldstate} = 0;
        $self->{lang} = $main::lang if !$self->{lang};
        $self->{func} = "";
+       $self->{width} ||=  80;
+       
 
        # add in all the dxcc, itu, zone info
        my @dxcc = Prefix::extract($call);
@@ -239,6 +244,17 @@ sub get_all_nodes
        return @out;
 }
 
+# return a list of node calls
+sub get_all_node_calls
+{
+       my $ref;
+       my @out;
+       foreach $ref (values %channels) {
+               push @out, $ref->{call} if $ref->is_node;
+       }
+       return @out;
+}
+
 # return a list of all users
 sub get_all_users
 {
@@ -686,17 +702,14 @@ sub broadcast_list
 sub process
 {
        foreach my $dxchan (get_all()) {
-
+               next if $dxchan->{disconnecting};
+               
                while (my $data = shift @{$dxchan->{inqueue}}) {
                        my ($sort, $call, $line) = $dxchan->decode_input($data);
                        next unless defined $sort;
 
                        # do the really sexy console interface bit! (Who is going to do the TK interface then?)
                        dbg("<- $sort $call $line") if $sort ne 'D' && isdbg('chan');
-                       if ($dxchan->{disconnecting}) {
-                               dbg('In disconnection, ignored');
-                               next;
-                       }
 
                        # handle A records
                        my $user = $dxchan->user;