X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fexport_users.pl;h=c9d7e7845887f261269c4c77ac7d535ce1d59c87;hb=ee55bc4f9cf0763f17c9698ab4c7d47a4e7008ce;hp=4c143ebbf43c80776bff8e65e616513f64f52057;hpb=6c38bca91e6b75002e15cce29c45a894f675e22e;p=spider.git diff --git a/cmd/export_users.pl b/cmd/export_users.pl index 4c143ebb..c9d7e784 100644 --- a/cmd/export_users.pl +++ b/cmd/export_users.pl @@ -1,9 +1,21 @@ # # the export the user file to ascii command # -# $Id$ +# # my $self = shift; +my $line = shift;; return (1, $self->msg('e5')) unless $self->priv >= 9; -my $line = shift || "$main::data/user_asc"; -return (1, DXUser::export($line)); + +$line ||= 'user_json'; +my ($fn) = split /\s+/, $line; +unless ($fn && $fn eq 'user_json') { + $fn =~ s|[/\.]||g; + $fn = "/tmp/$fn"; +} + +my @out = DXUser::export($fn); + +return (1, @out); + +