X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=cmd%2Funset%2Fnode.pl;fp=cmd%2Funset%2Fnode.pl;h=bd0a29efa8c95d517377d4b783fb3b6a60bcb2ce;hb=0f8cb479221e09bae8e03447c78527604cf69be4;hp=0000000000000000000000000000000000000000;hpb=3643ef870e040d437448632209039477eac4e52c;p=spider.git diff --git a/cmd/unset/node.pl b/cmd/unset/node.pl new file mode 100644 index 00000000..bd0a29ef --- /dev/null +++ b/cmd/unset/node.pl @@ -0,0 +1,33 @@ +# +# 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; + +return (0) if $self->priv < 5; + +foreach $call (@args) { + $call = uc $call; + my $chan = DXChannel->get($call); + if ($chan) { + push @out, $self->msg('nodee1', $call); + } else { + $user = DXUser->get($call); + return (1, $self->msg('usernf', $call)) if !$user; + $user->sort('U'); + $user->close(); + push @out, $self->msg('nodeu', $call); + } +} +return (1, @out);