added email forwarding
[spider.git] / cmd / unset / email.pl
diff --git a/cmd/unset/email.pl b/cmd/unset/email.pl
new file mode 100644 (file)
index 0000000..2829a19
--- /dev/null
@@ -0,0 +1,21 @@
+#
+# unset the email address  of the user
+#
+# Copyright (c) 2001 - Dirk Koopman G1TLH
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my $call = $self->call;
+my $user;
+
+$user = DXUser->get_current($call);
+if ($user) {
+       $user->wantemail(0);
+       $user->put();
+       return (1, $self->msg('emaila', $line));
+} else {
+       return (1, $self->msg('namee2', $call));
+}
+