spider/cmd/unset/node.pl

34 lines
642 B
Perl
Raw Normal View History

#
# set user type BACK TO 'U' (user)
#
# Please note that this is only effective if the user is not on-line
#
# Copyright (c) 1998 - Dirk Koopman
#
# $Id$
#
my ($self, $line) = @_;
my @args = split /\s+/, $line;
my $call;
my @out;
my $user;
my $create;
1999-11-24 18:37:27 +00:00
return (1, $self->msg('e5')) if $self->priv < 5;
foreach $call (@args) {
1999-11-24 18:37:27 +00:00
$call = uc $call;
my $chan = DXChannel->get($call);
if ($chan) {
push @out, $self->msg('nodee1', $call);
} else {
$user = DXUser->get_exact($call);
return (1, $self->msg('usernf', $call)) if !$user;
$user->sort('U');
$user->close();
push @out, $self->msg('nodeu', $call);
}
}
return (1, @out);