diff options
author | Peter Palfrader <peter@palfrader.org> | 2004-04-24 12:06:41 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2004-04-24 12:06:41 +0000 |
commit | 82c0bb931633d67a7e60bddb756264edcd4620b6 (patch) | |
tree | b810dfe5ae097f5ed0a8f69fa88cb1e77f21198c | |
parent | c81ff6b6a0c58e927c61d59b03f142f400e31ef4 (diff) |
And fix a few syntax errors
-rw-r--r-- | Echolot/Conf.pm | 4 | ||||
-rw-r--r-- | Echolot/Storage/File.pm | 6 | ||||
-rwxr-xr-x | pingd | 10 |
3 files changed, 10 insertions, 10 deletions
diff --git a/Echolot/Conf.pm b/Echolot/Conf.pm index 83f53cc..53340eb 100644 --- a/Echolot/Conf.pm +++ b/Echolot/Conf.pm @@ -317,10 +317,10 @@ sub parse_mix_key($$$) { my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime(); my $today = sprintf("%04d-%02d-%02d", $year+1900, $mon+1, $mday); (defined $mixmasters{$keyid}->{'created'} && ($today lt $mixmasters{$keyid}->{'created'})) and - Echolot::Log::info("Mixmaster key for $remailer_address created in the future ($today < $created)."), + Echolot::Log::info("Mixmaster key for $remailer_address created in the future ($today < ".$mixmasters{$keyid}->{'created'}.")."), next; (defined $mixmasters{$keyid}->{'expires'} && ($mixmasters{$keyid}->{'expires'} lt $today)) and - Echolot::Log::info("Mixmaster key for $remailer_address expired ($expires < $today)."), + Echolot::Log::info("Mixmaster key for $remailer_address expired (".$mixmasters{$keyid}->{'expires'}." < $today)."), next; if ($remailer->{'address'} ne $remailer_address) { diff --git a/Echolot/Storage/File.pm b/Echolot/Storage/File.pm index 1c80471..55ed5ba 100644 --- a/Echolot/Storage/File.pm +++ b/Echolot/Storage/File.pm @@ -1246,7 +1246,7 @@ sub set_caps($$$$$$;$) { (defined $address) or Echolot::Log::cluck ("$address not defined in set_key."); - if (! defined $self->{'metadata'}->{'remailers'}->{$address} ) + if (! defined $self->{'metadata'}->{'remailers'}->{$address} ) { $self->{'metadata'}->{'remailers'}->{$address} = {}; }; @@ -1305,7 +1305,7 @@ sub set_key($$$$$$$$$) { (defined $address) or Echolot::Log::cluck ("$address not defined in set_key."); - if (! defined $self->{'metadata'}->{'remailers'}->{$address} ) + if (! defined $self->{'metadata'}->{'remailers'}->{$address} ) { $self->{'metadata'}->{'remailers'}->{$address} = {}; }; @@ -1574,7 +1574,7 @@ sub expire($) { next unless exists $self->{'METADATA'}->{'remailers'}->{$remailer_addr}->{'keys'}; - for my $type keys( keys %{$self->{'METADATA'}->{'remailers'}->{$remailer_addr}->{'keys'}} ) { + for my $type ( keys %{$self->{'METADATA'}->{'remailers'}->{$remailer_addr}->{'keys'}} ) { next unless exists $self->{'METADATA'}->{'remailers'}->{$remailer_addr}->{'keys'}->{$type}; for my $key ( keys %{$self->{'METADATA'}->{'remailers'}->{$remailer_addr}->{'keys'}->{$type}} ) { my @out = grep {$_ > $expire_pings} $self->get_pings($remailer_addr, $type, $key, 'out'); @@ -406,8 +406,8 @@ sub command_set(@) { my @settings; while (scalar @argv && $argv[0] =~ /^(show(?:it)?|ping(?:it)?|fetch(?:it))=(on|off)$/) { - $name = $1; - $value = $2; + my $name = $1; + my $value = $2; $name = 'showit' if ($name eq 'show'); $name = 'pingit' if ($name eq 'ping'); @@ -453,11 +453,11 @@ sub command_enabledisable (@) { my $value; if ($command eq 'enable') { $value='on'; - elsif ($command eq 'disable') { + } elsif ($command eq 'disable') { $value='off'; - else + } else { die ("argument $command is not enable or disable. Shouldn't even be here.\n"); - } + }; my @cmd = ("showit=$value", "pingit=$value", "fetch=$value"); push @cmd, @argv; command_setremailercaps(@argv); |