X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fexport_users.pl;h=3a07d23a79899409a22bfcbc1eed4e34975fe85d;hb=fda536aef281e0f6fc68a02c537d18650bd5505f;hp=4c143ebbf43c80776bff8e65e616513f64f52057;hpb=6c38bca91e6b75002e15cce29c45a894f675e22e;p=spider.git diff --git a/cmd/export_users.pl b/cmd/export_users.pl index 4c143ebb..3a07d23a 100644 --- a/cmd/export_users.pl +++ b/cmd/export_users.pl @@ -1,9 +1,22 @@ # # 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)); + +my ($fn, $flag) = split /\s+/, $line; +$fn ||= 'user_json'; +unless ($fn && $fn eq 'user_json') { + $fn =~ s|[/\.]||g; + $fn = "/tmp/$fn"; +} +my $strip = $flag eq 'strip'; + +my @out = DXUser::export(); # for now + +return (1, @out); + +