put dx.pl into an explicit handle sub
[spider.git] / cmd / shutdown.pl
index 43b6fb7531a24887dea609cb7f39a7fc095e9dfa..d90cfeeafe90cb384d141d7c4ff3b9beb585b372 100644 (file)
@@ -1,10 +1,16 @@
 #
 # the shutdown command
 # 
-# $Id$
+#
 #
 my $self = shift;
-if ($self->priv >= 5) {
-  &main::cease();
+my $call = $self->call;
+my $ref;
+return (1, $self->msg('e5')) unless $self->priv >= 5;
+foreach $ref (DXChannel::get_all()) {
+       $ref->send($self->msg('shutting')) if $ref->is_user;
 }
-return (0);
+    
+$main::ending = 10;
+
+return (1);