my $call;
my @out;
my $user;
+my $create;
return (0) if $self->priv < 5;
push @out, $self->msg('nodee1', $call);
} else {
$user = DXUser->get($call);
+ $create = !$user;
+ $user = DXUser->new($call) if $create;
if ($user) {
$user->sort('A');
$user->close();
- push @out, $self->msg('node', $call);
+ push @out, $self->msg($create ? 'nodec' : 'node', $call);
} else {
push @out, $self->msg('e3', "Set Node", $call);
}
l2 => 'Hello $_[0], this is $main::mycall in $main::myqth running DXSpider V$main::version',
m2 => '$_[0] Information: $_[1]',
node => '$_[0] set as AK1A style Node',
+ nodec => '$_[0] created as AK1A style Node',
nodee1 => 'You cannot use this command whilst your target ($_[0]) is on-line',
ok => 'Operation successful',
page => 'Press Enter to continue, A to abort ($_[0] lines) >',
return;
}
- # is there one already connected elsewhere in the cluster?
- if (($call eq $main::myalias && DXCluster->get_exact($call)) ||
+ # is there one already connected elsewhere in the cluster (and not a cluster)
+ my $user = DXUser->get($call);
+ if ($user && $user->sort eq 'A' && !DXCluster->get_exact($call)) {
+ ;
+ } elsif (($call eq $main::myalias && DXCluster->get_exact($call)) ||
DXCluster->get($call)) {
my $mess = DXM::msg($lang, 'concluster', $call);
dbg('chan', "-> D $call $mess\n");