X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=perl%2FDXCommandmode.pm;h=d88d879ee9678d7209a89c546bb3375cd6e85858;hb=e83b70ecab022dbbeac0b56f67ed2e4bed609e86;hp=1743af851f59375d2d401f0dfbca70c6e32edb53;hpb=f155969d600561b9ef151a7ce2494a0c89aed033;p=spider.git diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 1743af85..d88d879e 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -80,7 +80,15 @@ sub start $self->{dx} = $user->wantdx; $self->{logininfo} = $user->wantlogininfo; $self->{here} = 1; - + + # clean up qra locators + my $qra = $user->qra; + $qra = undef if ($qra && !DXBearing::is_qra($qra)); + unless ($qra) { + my $lat = $user->lat; + my $long = $user->long; + $user->qra(DXBearing::lltoqra($lat, $long)) if (defined $lat && defined $long); + } # add yourself to the database my $node = DXNode->get($main::mycall) or die "$main::mycall not allocated in DXNode database"; @@ -306,13 +314,14 @@ sub process sub finish { my $self = shift; + my $conn = shift; my $call = $self->call; # I was the last node visited $self->user->node($main::mycall); # log out text - if (-e "$main::data/logout") { + if ($conn && -e "$main::data/logout") { open(I, "$main::data/logout") or confess; my @in = ; close(I);