X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=cmd%2Fset%2Faddress.pl;h=f31a982ea3224bd028acdc56b9c5bfbb9bca6905;hb=65744dd1e30165cd280502ee1a05c0c640023303;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=6b6a8002929017b6d4217f68fa492a2d728ee1fe;p=spider.git diff --git a/cmd/set/address.pl b/cmd/set/address.pl index e69de29b..f31a982e 100644 --- a/cmd/set/address.pl +++ b/cmd/set/address.pl @@ -0,0 +1,28 @@ +# +# set the address field +# +# Copyright (c) 1998 - Dirk Koopman +# +# $Id$ +# + +my ($self, $line) = @_; +my $call; +my @out; +my $user; + +if ($self->priv >= 5) { # allow a callsign as first arg + my @args = split /\s+/, $line; + $call = UC $args[0]; + $user = DXUser->get_current($call); + shift @args if $user; + $line = join ' ', @args; +} else { + $call = $self->call; + $user = $self->user; +} + +$user->addr($line); +push @out, DXM::msg('addr', $call, $line); + +return (1, @out);