- $self->{beep} = $self->{wwv} = $self->{wx} = $self->{talk} = $self->{ann} = $self->{here} = $self->{dx} = 1;
- # $self->prompt() if $self->{state} =~ /^prompt/o;
-
- # add yourself to the database
- my $node = DXNode->get($main::mycall) or die "$main::mycall not allocated in DXNode database";
- my $cuser = DXNodeuser->new($self, $node, $call, 0, 1);
- $node->dxchan($self) if $call eq $main::myalias; # send all output for mycall to myalias
+ $self->{beep} = $user->wantbeep;
+ $self->{ann} = $user->wantann;
+ $self->{wwv} = $user->wantwwv;
+ $self->{wcy} = $user->wantwcy;
+ $self->{talk} = $user->wanttalk;
+ $self->{wx} = $user->wantwx;
+ $self->{dx} = $user->wantdx;
+ $self->{logininfo} = $user->wantlogininfo;
+ $self->{ann_talk} = $user->wantann_talk;
+ $self->{here} = 1;
+ $self->{prompt} = $user->prompt if $user->prompt;
+
+ # sort out new dx spot stuff
+ $user->wantdxcq(0) unless defined $user->{wantdxcq};
+ $user->wantdxitu(0) unless defined $user->{wantdxitu};
+ $user->wantusstate(0) unless defined $user->{wantusstate};
+
+ # sort out registration
+ if ($main::reqreg == 1) {
+ $self->{registered} = $user->registered;
+ } elsif ($main::reqreg == 2) {
+ $self->{registered} = !$user->registered;
+ } else {
+ $self->{registered} = 1;
+ }
+
+
+ # decide which motd to send
+ my $motd = "${main::motd}_nor" unless $self->{registered};
+ $motd = $main::motd unless $motd && -e $motd;
+ $self->send_file($motd) if -e $motd;
+
+ # sort out privilege reduction
+ $self->{priv} = 0 if $line =~ /^(ax|te)/ && !$self->conn->{usedpasswd};
+
+ # get the filters
+ $self->{spotsfilter} = Filter::read_in('spots', $call, 0) || Filter::read_in('spots', 'user_default', 0);
+ $self->{wwvfilter} = Filter::read_in('wwv', $call, 0) || Filter::read_in('wwv', 'user_default', 0);
+ $self->{wcyfilter} = Filter::read_in('wcy', $call, 0) || Filter::read_in('wcy', 'user_default', 0);
+ $self->{annfilter} = Filter::read_in('ann', $call, 0) || Filter::read_in('ann', 'user_default', 0) ;
+
+ # 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);
+ }
+
+ # decide on echo
+ my $echo = $user->wantecho;
+ unless ($echo) {
+ $self->send_now('E', "0");
+ $self->send($self->msg('echow'));
+ $self->conn->echo($echo) if $self->conn->can('echo');
+ }