]> scm.dxcluster.org Git - spider.git/blob - cmd/set/here.pl
added show/ik3qar command
[spider.git] / cmd / set / here.pl
1 #
2 # set the here flag
3 #
4 # Copyright (c) 1998 - Dirk Koopman
5 #
6 #
7 #
8
9 my ($self, $line) = @_;
10 my @args = split /\s+/, $line;
11 my $call;
12 my @out;
13
14 @args = $self->call if (!@args || $self->priv < 9);
15
16 foreach $call (@args) {
17         $call = uc $call;
18         my $dxchan = DXChannel::get($call);
19         if ($dxchan) {
20                 $dxchan->here(1);
21                 push @out, $self->msg('heres', $call);
22                 my $ref = Route::User::get($call);
23                 $ref = Route::Node::get($call) unless $ref;
24                 if ($ref) {
25                         $ref->here(1);
26                         my $s = DXProt::pc24($ref);
27                         DXProt::eph_dup($s);
28                         DXChannel::broadcast_all_nodes($s, $main::me) ;
29                 }
30         } else {
31                 push @out, $self->msg('e3', "Set Here", $call);
32         }
33 }
34
35 return (1, @out);