X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Faddress.pl;h=15e42579597482a00ff5c899b2c852118b44666e;hb=7a356e1acb6d7e513e2004d75c6c39f0c326081a;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=6b6a8002929017b6d4217f68fa492a2d728ee1fe;p=spider.git diff --git a/cmd/set/address.pl b/cmd/set/address.pl index e69de29b..15e42579 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, $self->msg('addr', $call, $line); + +return (1, @out);