62429ffebf2d2bcf7123dd727b036ac7b48d5b29
[spider.git] / cmd / export_users.pl
1 #
2 # the export the user file to ascii command
3 #
4 #
5 #
6 my $self = shift;
7 my $line = shift;;
8 return (1, $self->msg('e5')) unless $self->priv >= 9;
9
10 $line ||= 'user_json';
11 my ($fn, $flag) = split /\s+/, $line;
12 unless ($fn && $fn eq 'user_json') {
13         $fn =~ s|[/\.]||g;
14         $fn = "/tmp/$fn";
15 }
16 my $strip = $flag && $flag eq 'strip';
17
18 my @out = DXUser::export($fn, $strip);
19
20 return (1, @out);
21
22