diff options
author | Peter Palfrader <peter@palfrader.org> | 2002-07-03 00:54:40 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2002-07-03 00:54:40 +0000 |
commit | 8e615cad321491bade30622b120a4a6fbeff02b3 (patch) | |
tree | 2c73db6f31587b76c33e385a6e4a177f60420851 /Echolot/Storage/File.pm | |
parent | bd239ed35a3f31a75689a204ba92043c86bc29db (diff) |
Implemented command delete
Implemented command getkeyconfs
Diffstat (limited to 'Echolot/Storage/File.pm')
-rw-r--r-- | Echolot/Storage/File.pm | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/Echolot/Storage/File.pm b/Echolot/Storage/File.pm index 26b7ed8..cca5015 100644 --- a/Echolot/Storage/File.pm +++ b/Echolot/Storage/File.pm @@ -1,7 +1,7 @@ package Echolot::Storage::File; # (c) 2002 Peter Palfrader <peter@palfrader.org> -# $Id: File.pm,v 1.19 2002/07/03 00:36:14 weasel Exp $ +# $Id: File.pm,v 1.20 2002/07/03 00:54:40 weasel Exp $ # =pod @@ -915,6 +915,30 @@ sub expire($) { }; +sub delete_remailer($$) { + my ($self, $address) = @_; + + unless (defined $self->{'METADATA'}->{'addresses'}->{$address}) { + delete $self->{'METADATA'}->{'addresses'}->{$address} + } else { + cluck("Remailer $address does not exist in addresses") + }; + + unless (defined $self->{'METADATA'}->{'remailers'}->{$address}) { + + for my $type ( keys %{$self->{'METADATA'}->{'remailers'}->{$address}->{'keys'}} ) { + for my $key ( keys %{$self->{'METADATA'}->{'remailers'}->{$address}->{'keys'}->{$type}} ) { + $self->pingdata_close_one($address, $type, $key, 'delete'); + }; + }; + + delete $self->{'METADATA'}->{'remailers'}->{$address} + } else { + cluck("Remailer $address does not exist in addresses") + }; +}; + + # sub convert($) { # my ($self) = @_; |