Added set/prompt (and unset/prompt) command so that Stephan can fool some
[spider.git] / cmd / unset / prompt.pl
diff --git a/cmd/unset/prompt.pl b/cmd/unset/prompt.pl
new file mode 100644 (file)
index 0000000..35d02a0
--- /dev/null
@@ -0,0 +1,22 @@
+#
+# unset the prompt of the user
+#
+# Copyright (c) 2001 - Dirk Koopman
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my $call = $self->call;
+my $user;
+
+$user = DXUser->get_current($call);
+if ($user) {
+       delete $user->{prompt};
+       delete $self->{prompt};
+       $user->put();
+       return (1, $self->msg('pru', $line));
+} else {
+       return (1, $self->msg('namee2', $call));
+}
+