remove $Id$ strings from everywhere that I can find
[spider.git] / cmd / set / email.pl
index ed68420eaed123b858d7075416c5c32571275d68..ac6c991cdd7682a413bf240ec3bb8f837eb5872b 100644 (file)
@@ -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);
 if ($user) {
-       $user->email($line);
+       $user->email(\@f);
+       $user->wantemail(1);
        $user->put();
        return (1, $self->msg('emaila', $line));
 } else {