3 # Database update routine
5 # Copyright (c) 1999 Dirk Koopman G1TLH
7 my ($self, $line) = @_;
8 my @f = split /\s+/, $line;
11 my $name = shift @f if @f;
12 my $db = DXDb::getdesc($name);
13 return (1, $self->msg('db3', $name)) unless $db;
17 push @db, @{$db->chain} if $db->chain;
21 $db = DXDb::getdesc($n);
22 return (1, $self->msg('db3', $n)) unless $db;
27 unless (Route::Node::get($db->remote) || DXChannel->get($db->remote)) {
28 push @out, $self->msg('db4', uc $name, $db->remote);
32 push @out, $self->msg('db11', $db->remote);
33 push @f, " " unless @f;
35 my $n = DXDb::newstream($self->call);
36 DXProt::route(undef, $db->remote, DXProt::pc44($main::mycall, $db->remote, $n, uc $db->name,uc $_, $self->call));
41 # local databases can chain to remote ones
43 push @out, $db->print('pre');
46 # push @out, $db->name . " $_";
47 my $value = $db->getkey($_) || "";
48 push @out, $db->name . ": $_ :";
50 push @out, split /\n/, $value;
53 push @out, $self->msg('db2', uc $_, uc $db->{name});
57 push @out, $db->print('post');