diff options
author | Eric Wong <e@80x24.org> | 2017-06-16 02:03:32 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-06-16 02:03:32 +0000 |
commit | ef9ce6f2dfc9fcbb91e3cec0b7a2b7f7e359be5d (patch) | |
tree | 4db5b56762cf95c2164fb3815ee4d12fca7c6803 /lib/PublicInbox/Config.pm | |
parent | 61196e5b0645eb58b415b4c679fc36ecf602ad16 (diff) | |
download | public-inbox-ef9ce6f2dfc9fcbb91e3cec0b7a2b7f7e359be5d.tar.gz |
This is lightly-tested and seems to work. I'm still hesitant to support this, but the alternative of receiving death threats for displaying unobfuscated addresses seems to be not worth it.
Diffstat (limited to 'lib/PublicInbox/Config.pm')
-rw-r--r-- | lib/PublicInbox/Config.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index 323f8a1a..0597a527 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -140,6 +140,17 @@ sub _fill { my $v = $self->{"$pfx.$k"}; $rv->{$k} = $v if defined $v; } + foreach my $k (qw(obfuscate)) { + my $v = $self->{"$pfx.$k"}; + defined $v or next; + if ($v =~ /\A(?:false|no|off|0)\z/) { + $rv->{$k} = 0; + } elsif ($v =~ /\A(?:true|yes|on|1)\z/) { + $rv->{$k} = 1; + } else { + warn "Ignoring $pfx.$k=$v in config, not boolean\n"; + } + } # TODO: more arrays, we should support multi-value for # more things to encourage decentralization |