X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshutdown.pl;h=1bcbcb70ce845341287ed38022d99893119ff357;hb=6b904a6db275029dd6d7a5cf0a48c1f0770ea8c2;hp=695748aa0df793aa32bd212493b737109f6f4140;hpb=f155969d600561b9ef151a7ce2494a0c89aed033;p=spider.git diff --git a/cmd/shutdown.pl b/cmd/shutdown.pl index 695748aa..1bcbcb70 100644 --- a/cmd/shutdown.pl +++ b/cmd/shutdown.pl @@ -1,20 +1,16 @@ # # the shutdown command # -# $Id$ +# # my $self = shift; my $call = $self->call; my $ref; - -if ($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; - } - - # give some time for the buffers to empty and then shutdown (see cluster.pl) - $main::decease = 250; +return (1, $self->msg('e5')) unless $self->priv >= 5; +foreach $ref (DXChannel::get_all()) { + $ref->send($self->msg('shutting')) if $ref->is_user; } + +main::cease(); + return (1);