]> dxcluster.org Git - spider.git/blob - cmd/set/email.pl
added user filtering (or at leats the capability for it)
[spider.git] / cmd / set / email.pl
1 #
2 # set the email address  of the user
3 #
4 # Copyright (c) 1998 - Dirk Koopman
5 #
6 # $Id$
7 #
8
9 my ($self, $line) = @_;
10 my $call = $self->call;
11 my $user;
12
13 # remove leading and trailing spaces
14 $line =~ s/^\s+//;
15 $line =~ s/\s+$//;
16
17 return (1, $self->msg('emaile1')) if !$line;
18
19 $user = DXUser->get_current($call);
20 if ($user) {
21         $user->email($line);
22         $user->put();
23         return (1, $self->msg('emaila', $line));
24 } else {
25         return (1, $self->msg('namee2', $call));
26 }
27