X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fexport_users.pl;h=774d83848a3dbebaab2b83f59b2fba7a74cb6450;hb=102b51ca564ef29e7f84d2cf65d0eaa5fdab671a;hp=4c143ebbf43c80776bff8e65e616513f64f52057;hpb=6c38bca91e6b75002e15cce29c45a894f675e22e;p=spider.git diff --git a/cmd/export_users.pl b/cmd/export_users.pl index 4c143ebb..774d8384 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_asc'; +unless ($fn && $fn eq 'user_asc') { + $fn =~ s|[/\.]||g; + $fn = "/tmp/$fn"; +} +my $strip = $flag eq 'strip'; + +my @out = DXUser::export($fn, $strip); + +return (1, @out); + +