From 7c4d840106225e36c60dcc9362606a40d262d7ff Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 13 Jul 2002 19:59:16 +0000 Subject: Only show valid remailers in Thesaurus --- Echolot/Thesaurus.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Echolot/Thesaurus.pm b/Echolot/Thesaurus.pm index be97446..230b322 100644 --- a/Echolot/Thesaurus.pm +++ b/Echolot/Thesaurus.pm @@ -1,7 +1,7 @@ package Echolot::Thesaurus; # (c) 2002 Peter Palfrader -# $Id: Thesaurus.pm,v 1.6 2002/07/10 16:22:49 weasel Exp $ +# $Id: Thesaurus.pm,v 1.7 2002/07/13 19:59:16 weasel Exp $ # =pod @@ -91,8 +91,12 @@ sub build_thesaurus() { for my $addr (keys (%$data)) { my $nick = Echolot::Globals::get()->{'storage'}->get_nick($addr); - $data->{$addr}->{'nick'} = defined $nick ? $nick : 'N/A'; - $data->{$addr}->{'address'} = $addr; + if (defined $nick) { + $data->{$addr}->{'nick'} = $nick; + $data->{$addr}->{'address'} = $addr; + } else { + delete $data->{$addr}; + }; }; my @data = map {$data->{$_}} (sort { $data->{$a}->{'nick'} cmp $data->{$b}->{'nick'} } keys (%$data)); -- cgit v1.2.3