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