X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Fhere.pl;h=8d5665c94366dd5497cc41245404f349377f1f7a;hb=b32570d9978c9e99a8652e52491cf92540bf876b;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=6b6a8002929017b6d4217f68fa492a2d728ee1fe;p=spider.git diff --git a/cmd/set/here.pl b/cmd/set/here.pl index e69de29b..8d5665c9 100644 --- a/cmd/set/here.pl +++ b/cmd/set/here.pl @@ -0,0 +1,42 @@ +# +# set the here flag +# +# Copyright (c) 1998 - Dirk Koopman +# +# $Id$ +# + +my ($self, $line) = @_; +my @args = split /\s+/, $line; +my $call; +my @out; + +@args = $self->call if (!@args || $self->priv < 9); + +foreach $call (@args) { + $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) { + my $s = DXProt::pc24($ref); + DXProt::eph_dup($s); + DXProt::broadcast_all_ak1a($s, $DXProt::me) ; + $ref->here(1); + } elsif ($ref = Route::Node::get($call)) { + my $s = DXProt::pc24($ref); + DXProt::eph_dup($s); + DXProt::broadcast_all_ak1a($s, $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);