]> www.dxcluster.org Git - spider.git/blob - cmd/rinit.pl
add logging of PC92A ip addresses
[spider.git] / cmd / rinit.pl
1 #
2 # reverse init a cluster connection
3 #
4 # Copyright (c) 1999 Dirk Koopman G1TLH
5 #
6 #
7 #
8 my ($self, $line) = @_;
9 my @calls = split /\s+/, $line;
10 my $call;
11 my @out;
12
13 return (1, $self->msg('e5')) if $self->priv < 5;
14
15 foreach $call (@calls) {
16         $call = uc $call;
17         next if $call eq $main::mycall;
18         my $dxchan = DXChannel::get($call);
19         if ($dxchan) {
20                 if ($dxchan->is_node) {
21                         my $parent = Route::Node::get($call);
22                         $dxchan->state('init');
23                         $dxchan->send_local_config;
24                         $dxchan->send(DXProt::pc20());
25                         push @out, $self->msg('init1', $call);
26                 } 
27         } else {
28                 push @out, $self->msg('e10', $call);
29         }
30 }
31
32 return (1, @out);
33