start of AnyEvent conversion
[spider.git] / cmd / shutdown.pl
index 1b3d8bb2432ad4f423e11c8909e57433d4059bcd..cfed8d400ad5e2741f765c7aaa0dd71e2b771950 100644 (file)
@@ -1,19 +1,17 @@
 #
 # the shutdown command
 # 
-# $Id$
+#
 #
 my $self = shift;
 my $call = $self->call;
 my $ref;
 return (1, $self->msg('e5')) unless $self->priv >= 5;
 foreach $ref (DXChannel::get_all()) {
-       $ref->send_now("D", DXProt::pc39($main::mycall, "Shutdown by $call")) if $ref->is_node  && $ref != $DXProt::me; 
-       $ref->send_now("D", $self->msg('shutting')) if $ref->is_user;
+       $ref->send($self->msg('shutting')) if $ref->is_user;
 }
     
 # give some time for the buffers to empty and then shutdown (see cluster.pl)
-$main::decease = 250;
-       
+$main::decease->send;
 
-return (1, $self->msg('shutting'));
+return (1);