@args = $self->call if (!@args || $self->priv < 9);
foreach $call (@args) {
- $call = uc $call;
- my $dxchan = DXChannel->get($call);
- my $ref = DXCluster->get_exact($call);
- if ($dxchan && $ref) {
- $dxchan->here(1);
- $ref->here(1);
- DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me);
- push @out, $self->msg('heres', $call);
- } else {
- push @out, $self->msg('e3', "Set Here", $call);
- }
+ $call = uc $call;
+ my $dxchan = DXChannel->get($call);
+ my $ref = Route::User::get($call);
+ if ($dxchan) {
+ $dxchan->here(1);
+ push @out, $self->msg('heres', $call);
+ if ($ref) {
+ DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me) ;
+ $ref->here(1);
+ } elsif ($ref = Route::Node::get($call)) {
+ DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me) ;
+ $ref->here(1);
+ } else {
+ $ref = Route::Node::get($call);
+ $ref->here(1) if $ref;
+ }
+ } else {
+ push @out, $self->msg('e3', "Set Here", $call);
+ }
}
return (1, @out);
#
# show some statistics
#
-return (1, DXCluster::cluster() );
+return (1, Route::cluster() );
my $count;
# search thru the user for nodes
-unless (@call) {
-
+if ($call[0] eq 'ALL') {
+ shift @call;
my ($action, $key, $data) = (0,0,0);
for ($action = DXUser::R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = DXUser::R_NEXT) {
if ($data =~ m{sort => '[ACRSX]'}) {
++$count;
}
}
+} elsif (@call == 0) {
+ @call = map {$_->call} DXChannel::get_all_nodes();
}
my $call;
foreach $call (@call) {
- my $clref = DXCluster->get_exact($call);
+ my $clref = Route::Node::get($call);
my $uref = DXUser->get_current($call);
my ($sort, $ver);
$sort = "Spider";
$ver = $main::version;
} else {
- $ver = $clref->pcversion if $clref && $clref->pcversion;
+ $ver = $clref->version if $clref && $clref->version;
}
my ($major, $minor, $subs) = unpack("AAA*", $ver) if $ver;
my $l;
foreach $l (@list) {
- my $ref = DXCluster->get_exact($l);
+ my $ref = Route::get($l);
if ($ref) {
- push @out, $self->msg('route', $l, $ref->mynode->call, $ref->dxchan->call);
+ my $parents = join ',', $ref->parents;
+ my $dxchan = $ref->dxchan;
+ push @out, $self->msg('route', $l, $parents, $dxchan->call);
} else {
push @out, $self->msg('e7', $l);
}
$miles = $dx * 0.62133785;
}
- my $cref = DXCluster->get_exact($call);
- $cref = DXCluster->get($call) unless $cref;
- my $seek = $cref->mynode->call if $cref;
+ my $cref = Route::get($call);
+ my $seek = join(',', $cref->parents) if $cref;
if ($seek) {
push @out, "User : $call (at $seek)";
@args = $self->call if (!@args || $self->priv < 9);
foreach $call (@args) {
- $call = uc $call;
- my $dxchan = DXChannel->get($call);
- my $ref = DXCluster->get_exact($call);
- if ($dxchan && $ref) {
- $dxchan->here(0);
- $ref->here(0);
- DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me);
- push @out, $self->msg('hereu', $call);
- } else {
- push @out, $self->msg('e3', "Unset Here", $call);
- }
+ $call = uc $call;
+ my $dxchan = DXChannel->get($call);
+ my $ref = Route::User::get($call);
+ if ($dxchan) {
+ $dxchan->here(0);
+ push @out, $self->msg('hereu', $call);
+ if ($ref) {
+ DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me) ;
+ $ref->here(0);
+ } elsif ($ref = Route::Node::get($call)) {
+ DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me) ;
+ $ref->here(0);
+ } else {
+ $ref = Route::Node::get($call);
+ $ref->here(0) if $ref;
+ }
+ } else {
+ push @out, $self->msg('e3', "Unset Here", $call);
+ }
}
+
return (1, @out);
# my $hnode = $uref->homenode if $uref;
# $clref = Route::Node::get($hnode) if $hnode;
# }
- if ($clref && !grep { $clref->dxchan == $_ } DXCommandmode::get_all()) {
- next if $clref->call eq $main::mycall; # i.e. it lives here
- $dxchan = $clref->dxchan;
- $ref->start_msg($dxchan) if $dxchan && !get_busy($dxchan->call) && $dxchan->state eq 'normal';
+ if ($clref) {
+ my $dxc = $clref->dxchan;
+ if ($dxc) {
+ if (grep {my $dxc=$clref->dxchan; $dxc && $dxc == $_ } DXCommandmode::get_all()) {
+ next if $clref->call eq $main::mycall; # i.e. it lives here
+ $dxchan = $clref->dxchan;
+ $ref->start_msg($dxchan) if $dxchan && !get_busy($dxchan->call) && $dxchan->state eq 'normal';
+ }
+ } else {
+ dbg('route', "Route: No dxchan for $ref->{to} " . ref($clref) );
+ }
}
}
if ($to ne $field[7]) {
$to = $field[7];
$node = Route::Node::get($to);
- $dxchan = $node->dxchan;
- if ($node->dxchan && $dxchan->is_clx) {
- route(undef, $to, pc84($main::mycall, $to, $main::mycall, $cmd));
- } else {
- route(undef, $to, pc34($main::mycall, $to, $cmd));
+ if ($node) {
+ $dxchan = $node->dxchan;
+ if ($dxchan && $dxchan->is_clx) {
+ route(undef, $to, pc84($main::mycall, $to, $main::mycall, $cmd));
+ } else {
+ route(undef, $to, pc34($main::mycall, $to, $cmd));
+ }
}
}
$user->lastoper($main::systime);