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 my $pre = $db->print('pre');
44 push @out, $pre if defined $pre;
47 push @out, $db->name . " $_";
48 my $value = $db->getkey($_) || "";
49 # push @out, $db->name . ": $_ :";
51 push @out, split /\n/, $value;
54 push @out, $self->msg('db2', uc $_, uc $db->{name});
58 my $post = $db->print('post');
59 push @out, $post if $post;