fixed basic usdb stuff
[spider.git] / cmd / load / usdb.pl
index 2ca209a3be80b997050db5a517f609854b3a65bc..7ed76067a9dc4082ca2b8820597ba4cf698d28e7 100644 (file)
 # $Id$
 #
 
-my $self = shift;
+my ($self, $line) = @_;
 my @out;
 return (1, $self->msg('e5')) if $self->priv < 9;
-push @out, (USDB::load());
+return (1, $self->msg('e3', "load/usdb", $line)) if $line && !-r $line;
+$line = "$main::data/usdbraw" unless $line;
+push @out, (USDB::load($line));
 @out = ($self->msg('ok')) unless @out;
 return (1, @out);