We have lift off, we are CONNECTED. We aren't doing much but we can
[spider.git] / cmd / set / address.pl
1 #
2 # set the address field
3 #
4 # Copyright (c) 1998 - Dirk Koopman
5 #
6 # $Id$
7 #
8
9 my ($self, $line) = @_;
10 my $call;
11 my @out;
12 my $user;
13
14 if ($self->priv >= 5) {             # allow a callsign as first arg
15   my @args = split /\s+/, $line;
16   $call = UC $args[0];
17   $user = DXUser->get_current($call);
18   shift @args if $user;
19   $line = join ' ', @args;
20 } else {
21   $user = $self->user;
22 }
23
24 $user->addr($line);
25 push @out, DXM::msg('addr', $call);
26
27 return (1, @out);