]> dxcluster.net Git - spider.git/commitdiff
tidy up for running with 'showdx' a bit more.
authorminima <minima>
Sat, 7 Jan 2006 11:37:09 +0000 (11:37 +0000)
committerminima <minima>
Sat, 7 Jan 2006 11:37:09 +0000 (11:37 +0000)
cmd/show/dx.pl
perl/DXUser.pm
perl/showdx

index 17a17d27e3e23e4fa0ec19a0aa092ddbb3699862..0728c650dbd20918d580788d91f0bcd52fa9c537 100644 (file)
@@ -86,7 +86,7 @@ while ($f = shift @list) {            # next field
                next;
        }
        if (lc $f =~ /^filt/) {
-               $dofilter = 1 if $self->spotsfilter;
+               $dofilter = 1 if $self && $self->spotsfilter;
                next;
        }
        if (lc $f eq 'qsl') {
@@ -372,7 +372,7 @@ foreach $ref (@res) {
        if ($self && $self->ve7cc) {
                push @out, VE7CC::dx_spot($self, @$ref);
        } else {
-               if ($real) {
+               if ($self && $real) {
                        push @out, DXCommandmode::format_dx_spot($self, @$ref);
                } else {
                        push @out, Spot::formatl(@$ref);
index 3df7fc20b218e42a2afb90da8fa03d0dec82cbf7..adddce0a4cef1f5701536e8d361530cc303f6244 100644 (file)
@@ -212,17 +212,23 @@ sub finish
 # new - create a new user
 #
 
-sub new
+sub alloc
 {
        my $pkg = shift;
        my $call = uc shift;
+       my $self = bless {call => $call, 'sort'=>'U'}, $pkg;
+       return $self;
+}
+
+sub new
+{
+       my $pkg = shift;
+       my $call = shift;
        #  $call =~ s/-\d+$//o;
   
 #      confess "can't create existing call $call in User\n!" if $u{$call};
 
-       my $self = bless {}, $pkg;
-       $self->{call} = $call;
-       $self->{'sort'} = 'U';
+       my $self = $pkg->alloc($call);
        $self->put;
        return $self;
 }
index 9af8f41bcfba489681c86419da5a12e819bf964f..bd7696f8682ead963e4360d184e99d58cdff5a0c 100755 (executable)
@@ -21,6 +21,7 @@ use IO::Handle;
 use DXUtil;
 use Bands;
 use Spot;
+use VE7CC;
 
 $dxdir = "/spider/cmd/show";
 $dxcmd = "dx.pl";
@@ -44,7 +45,7 @@ for (;;) {
                chomp $myexpr;
                last if $myexpr =~ /^q$/i;
        }
-       my @out = map {"$_\n"} &$dxproc({priv=>0,call=>'GDX'}, $myexpr);
+       my @out = map {"$_\n"} &$dxproc(undef, $myexpr);
        shift @out;   # remove return code
        print @out;
        last if $expr;