3 # Database update routine
5 # Copyright (c) 1999 Dirk Koopman G1TLH
7 my ($self, $line) = @_;
8 my ($name, $fn) = split /\s+/, $line;
11 return (1, $self->msg('e5')) if $self->priv < 9;
13 my $db = DXDb::getdesc($name);
14 return (1, $self->msg('db3', $name)) unless $db;
15 return (1, $self->msg('db1', $db->remote )) if $db->remote;
16 return (1, $self->msg('e3', 'dbimport', $fn)) unless -e $fn;
23 open(IMP, $fn) or return (1, "Cannot open $fn $!");
35 } elsif ($state == 1) {
38 } elsif ($key && $value) {
39 $db->putkey($key, $value);
53 push @out, $self->msg('db10', $count, $db->name);