27Jul00=======================================================================
1. made sure that 'en' is the default language on new users.
+2. issue error message if shutdown is attempted by a low privileged user.
+3. Make sure a privilege is defined for all users (even if it is 0).
26Jul00=======================================================================
1. added wantgrid (to control display of grid square info on DX Broadcasts)
2. added lastoper for controlling periodic demands for user info from other
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_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;
}
-return (1);
+
+# give some time for the buffers to empty and then shutdown (see cluster.pl)
+$main::decease = 250;
+
+
+return (1, $self->msg('shutting'));
$self->send($self->msg('l2',$self->{name}));
$self->send_file($main::motd) if (-e $main::motd);
$self->state('prompt'); # a bit of room for further expansion, passwords etc
- $self->{priv} = $user->priv;
+ $self->{priv} = $user->priv || 0;
$self->{lang} = $user->lang || 'en';
$self->{pagelth} = $user->pagelth || 20;
$self->{priv} = 0 if $line =~ /^(ax|te)/; # set the connection priv to 0 - can be upgraded later
# remember type of connection
$self->{consort} = $line;
$self->{outbound} = $sort eq 'O';
- $self->{priv} = $user->priv;
+ $self->{priv} = $user->priv || 1; # other clusters can always be 'normal' users
$self->{lang} = $user->lang || 'en';
$self->{isolate} = $user->{isolate};
$self->{consort} = $line; # save the connection type