From 82f98b9ed11d362b2bf18f3371bb60ff02f024db Mon Sep 17 00:00:00 2001 From: djk Date: Thu, 1 Oct 1998 10:49:50 +0000 Subject: [PATCH] added kill --- cmd/kill.pl | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 cmd/kill.pl diff --git a/cmd/kill.pl b/cmd/kill.pl new file mode 100644 index 00000000..0d787dd6 --- /dev/null +++ b/cmd/kill.pl @@ -0,0 +1,30 @@ +# +# kill or delete a message +# +# Copyright (c) Dirk Koopman G1TLH +# +# $Id$ +# + +my ($self, $line) = @_; +my @f = split /\s+/, $line; +my $msgno; +my @out; +my @body; +my $ref; + +for $msgno (@f) { + $ref = DXMsg::get($msgno); + if (!$ref) { + push @out, "Msg $msgno not found"; + next; + } + if ($ref->private && $self->priv < 9 && $ref->to ne $ref->call) { + push @out, "Msg $msgno not available"; + next; + } + $ref->del_msg; + push @out, "Message $msgno deleted"; +} + +return (1, @out); -- 2.43.0