]> scm.dxcluster.org Git - spider.git/blob - cmd/set/email.pl
added show/ik3qar command
[spider.git] / cmd / set / email.pl
1 #
2 # set the email address  of the user
3 #
4 # Copyright (c) 1998 - Dirk Koopman
5 #
6 #
7 #
8
9 my ($self, $line) = @_;
10 my $call = $self->call;
11 my $user;
12
13 $line =~ s/[<>()\[\]{}]//g;  # remove any braces
14 my @f = split /\s+/, $line;
15
16 return (1, $self->msg('emaile1')) if !$line;
17
18 $user = DXUser::get_current($call);
19 if ($user) {
20         $user->email(\@f);
21         $user->wantemail(1);
22         $user->put();
23         return (1, $self->msg('emaila', $line));
24 } else {
25         return (1, $self->msg('namee2', $call));
26 }
27