X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=blobdiff_plain;f=cmd%2Fshutdown.pl;h=c2350de0f197df34f70f58fe51d4173f5be72650;hp=43b6fb7531a24887dea609cb7f39a7fc095e9dfa;hb=b060a0a3ee72530aa3f10d453186a662b66d7efe;hpb=3d29b1a4d4aab997da2deff10470068601744530 diff --git a/cmd/shutdown.pl b/cmd/shutdown.pl index 43b6fb75..c2350de0 100644 --- a/cmd/shutdown.pl +++ b/cmd/shutdown.pl @@ -4,7 +4,17 @@ # $Id$ # my $self = shift; +my $call = $self->call; +my $ref; + if ($self->priv >= 5) { - &main::cease(); + foreach $ref (DXChannel::get_all()) { + $ref->send_now("D", DXProt::pc39($main::mycall, "Shutdown by $call")) + if $ref->is_ak1a && $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 (0); +return (1);