release 1.5
[spider.git] / cmd / shutdown.pl
1 #
2 # the shutdown command
3
4 # $Id$
5 #
6 my $self = shift;
7 my $call = $self->call;
8 my $ref;
9
10 if ($self->priv >= 5) {
11         foreach $ref (DXChannel::get_all()) {
12                 $ref->send_now("D", DXProt::pc39($main::mycall, "Shutdown by $call")) 
13                         if $ref->is_ak1a  && $ref != $DXProt::me; 
14                 $ref->send_now("D", $self->msg('shutting')) if $ref->is_user;
15         }
16     
17     # give some time for the buffers to empty and then shutdown (see cluster.pl)
18         $main::decease = 250;
19 }
20 return (1);