diff options
author | Peter Palfrader <peter@palfrader.org> | 2003-01-03 00:28:54 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2003-01-03 00:28:54 +0000 |
commit | 4a495038f9dd452fd5d37f2774bdb71272ef9ed6 (patch) | |
tree | 2695e1275eddc621410acb4f1dd523e63e67ae56 /Echolot | |
parent | 9fa08eda8b3df551daf90363a8148ac1679b8c1b (diff) |
Reset metadata if status is not defined.
Diffstat (limited to 'Echolot')
-rw-r--r-- | Echolot/Storage/File.pm | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Echolot/Storage/File.pm b/Echolot/Storage/File.pm index b09bd13..f0942a4 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.42 2002/11/11 02:24:58 weasel Exp $ +# $Id: File.pm,v 1.43 2003/01/03 00:28:54 weasel Exp $ # =pod @@ -722,15 +722,13 @@ sub not_a_remailer($$) { sub set_caps($$$$$$;$) { my ($self, $type, $caps, $nick, $address, $timestamp, $dont_expire) = @_; - if (! defined $self->{'METADATA'}->{'remailers'}->{$address}) { + if (! defined $self->{'METADATA'}->{'remailers'}->{$address} || + ! defined $self->{'METADATA'}->{'remailers'}->{$address}->{'status'} ) { $self->{'METADATA'}->{'remailers'}->{$address} = { status => 'active' }; } else { - defined ($self->{'METADATA'}->{'remailers'}->{$address}->{'status'}) or - cluck ("$address does exist in Metadata remailer list but does not have status defined"), - return 0; $self->{'METADATA'}->{'remailers'}->{$address}->{'status'} = 'active' if ($self->{'METADATA'}->{'remailers'}->{$address}->{'status'} eq 'expired'); }; |