X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Femail.pl;h=c5bfe52bdd740d9891df5d1290d569b91294edc4;hb=ab811a0c902225075a9bd69749f65594079433a9;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=6b6a8002929017b6d4217f68fa492a2d728ee1fe;p=spider.git diff --git a/cmd/set/email.pl b/cmd/set/email.pl index e69de29b..c5bfe52b 100644 --- a/cmd/set/email.pl +++ b/cmd/set/email.pl @@ -0,0 +1,27 @@ +# +# set the email address of the user +# +# Copyright (c) 1998 - Dirk Koopman +# +# +# + +my ($self, $line) = @_; +my $call = $self->call; +my $user; + +$line =~ s/[<>()\[\]{}]//g; # remove any braces +my @f = split /\s+/, $line; + +return (1, $self->msg('emaile1')) if !$line; + +$user = DXUser::get_current($call); +if ($user) { + $user->email(\@f); + $user->wantemail(1); + $user->put(); + return (1, $self->msg('emaila', $line)); +} else { + return (1, $self->msg('namee2', $call)); +} +