X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fcreate%2Fuser.pl;h=3b30f2fff33af6dd6c576e7d959ea8bbf4fc1c3e;hb=ab811a0c902225075a9bd69749f65594079433a9;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=6b6a8002929017b6d4217f68fa492a2d728ee1fe;p=spider.git diff --git a/cmd/create/user.pl b/cmd/create/user.pl index e69de29b..3b30f2ff 100644 --- a/cmd/create/user.pl +++ b/cmd/create/user.pl @@ -0,0 +1,43 @@ +# +# create a user +# +# Please note that this is only effective if the user is not on-line +# +# Copyright (c) 1998 - Dirk Koopman +# +# +# + +my ($self, $line) = @_; +my @args = split /\s+/, $line; +my $call; +my @out; +my $user; +my $create; + +return (1, $self->msg('e5')) if $self->priv < 9 || $self->remotecmd; + +foreach $call (@args) { + $call = uc $call; + $user = DXUser::get($call); + unless ($user) { + $user = DXUser->new($call); + $user->sort('U'); + $user->homenode($main::mycall); + $user->close(); + push @out, $self->msg('creuser', $call); + } else { + push @out, $self->msg('hasha', $call, 'Users'); + } +} +return (1, @out); + + + + + + + + + +