added the state filtering stuff
[spider.git] / cmd / load / usdb.pl
index 2ca209a3be80b997050db5a517f609854b3a65bc..bd45547d106e8d5cd7c52a8fd054c58d7c4afe89 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));
+USDB::init() unless @OUT;
 @out = ($self->msg('ok')) unless @out;
 return (1, @out);