]> dxcluster.org Git - spider.git/blob - cmd/dbremove.pl
part of making rcmd work again for async cmds
[spider.git] / cmd / dbremove.pl
1 #!/usr/bin/perl
2 #
3 # Database update routine
4 #
5 # Copyright (c) 1999 Dirk Koopman G1TLH
6 #
7 my ($self, $line) = @_;
8 my ($name) = split /\s+/, $line;
9 my @out;
10
11 return (1, $self->msg('e5')) if $self->priv < 9;
12 my $db = DXDb::getdesc($name);
13
14 return (1, $self->msg('db3', $name)) unless $db;
15 $db->delete;
16 push @out, $self->msg('db9', $name);
17
18 return (1, @out);