X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Femail.pl;h=c5bfe52bdd740d9891df5d1290d569b91294edc4;hb=ab811a0c902225075a9bd69749f65594079433a9;hp=ed68420eaed123b858d7075416c5c32571275d68;hpb=79f4593964c44fb39faf9d070a418125e90e1333;p=spider.git diff --git a/cmd/set/email.pl b/cmd/set/email.pl index ed68420e..c5bfe52b 100644 --- a/cmd/set/email.pl +++ b/cmd/set/email.pl @@ -3,23 +3,22 @@ # # 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 +$line =~ s/[<>()\[\]{}]//g; # remove any braces +my @f = split /\s+/, $line; return (1, $self->msg('emaile1')) if !$line; -$user = DXUser->get_current($call); +$user = DXUser::get_current($call); if ($user) { - $user->email($line); + $user->email(\@f); + $user->wantemail(1); $user->put(); return (1, $self->msg('emaila', $line)); } else {