- my ($self, $line, $sort) = @_;
- my $user = $self->{user};
- my $call = $self->{call};
- my $name = $user->{name};
-
- $self->{name} = $name ? $name : $call;
- $self->send($self->msg('l2',$self->{name}));
- $self->send_file($main::motd) if (-e $main::motd);
- $self->state('prompt'); # a bit of room for further expansion, passwords etc
- $self->{priv} = $user->priv;
- $self->{lang} = $user->lang;
- $self->{pagelth} = 20;
- $self->{priv} = 0 if $line =~ /^(ax|te)/; # set the connection priv to 0 - can be upgraded later
- $self->{consort} = $line; # save the connection type
-
- # set some necessary flags on the user if they are connecting
- $self->{wwv} = $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
-
- # issue a pc16 to everybody interested
- my $nchan = DXChannel->get($main::mycall);
- my @pc16 = DXProt::pc16($nchan, $cuser);
- DXProt::broadcast_ak1a(@pc16);
- Log('DXCommand', "$call connected");
-
- # send prompts and things
- my $info = DXCluster::cluster();
- $self->send("Cluster:$info");
- $self->send($self->msg('pr', $call));
+ my ($self, $line, $sort) = @_;
+ my $user = $self->{user};
+ my $call = $self->{call};
+ my $name = $user->{name};
+
+ $self->{name} = $name ? $name : $call;
+ $self->send($self->msg('l2',$self->{name}));
+ $self->send_file($main::motd) if (-e $main::motd);
+ $self->state('prompt'); # a bit of room for further expansion, passwords etc
+ $self->{priv} = $user->priv;
+ $self->{lang} = $user->lang;
+ $self->{pagelth} = 20;
+ $self->{priv} = 0 if $line =~ /^(ax|te)/; # set the connection priv to 0 - can be upgraded later
+ $self->{consort} = $line; # save the connection type
+
+ # set some necessary flags on the user if they are connecting
+ $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
+
+ # issue a pc16 to everybody interested
+ my $nchan = DXChannel->get($main::mycall);
+ my @pc16 = DXProt::pc16($nchan, $cuser);
+ for (@pc16) {
+ DXProt::broadcast_all_ak1a($_);
+ }
+ Log('DXCommand', "$call connected");
+
+ # send prompts and things
+ my $info = DXCluster::cluster();
+ $self->send("Cluster:$info");
+ $self->send($self->msg('namee1')) if !$user->name;
+ $self->send($self->msg('qthe1')) if !$user->qth;
+ $self->send($self->msg('qll')) if !$user->qra || (!$user->lat && !$user->long);
+ $self->send($self->msg('hnodee1')) if !$user->qth;
+ $self->send($self->msg('m9')) if DXMsg::for_me($call);
+
+
+ $self->send($self->msg('pr', $call));