diff options
-rw-r--r-- | NEWS | 2 | ||||
-rwxr-xr-x | pingd | 39 |
2 files changed, 22 insertions, 19 deletions
@@ -6,6 +6,8 @@ Changes in version XXXXX - 2004 and reliability information anyway. * Increase the number of remailers that need to list an address before it is added to 6. It was 3 previously. + * Make set fetch=<value> work again. + * Make disable and enable actually work. Changes in version 2.1.4 - 2004-06-10 * Have new disable and enable commands which are shortcut @@ -421,7 +421,7 @@ sub command_set(@) { my @argv = @_; my @settings; - while (scalar @argv && $argv[0] =~ /^(show(?:it)?|ping(?:it)?|fetch(?:it))=(on|off)$/) { + while (scalar @argv && $argv[0] =~ /^(show(?:it)?|ping(?:it)?|fetch(?:it)?)=(on|off)$/) { my $name = $1; my $value = $2; @@ -446,22 +446,6 @@ sub command_set(@) { }; }; -sub command_setremailercaps(@) { - my @argv = @_; - - my @caps; - for my $caps (@argv) { - my ($remailer_nick, $remailer_address) = ($caps =~ /^\s* \$remailer{"(.*)"} \s*=\s* "<(.*@.*)>.*"; \s*$/ix); - die ("caps '$caps' is not a valid remailer caps line\n") unless (defined $remailer_nick && defined $remailer_address); - push @caps, { - address => $remailer_address, - caps => $caps }; - }; - for my $caps (@caps) { - Echolot::Commands::addCommand("setremailercaps ".$caps->{'address'}." ".$caps->{'caps'}); - }; -}; - sub command_enabledisable (@) { my @argv = @_; @@ -476,9 +460,26 @@ sub command_enabledisable (@) { }; my @cmd = ("showit=$value", "pingit=$value", "fetch=$value"); push @cmd, @argv; - command_setremailercaps(@argv); + command_set(@cmd); } + +sub command_setremailercaps(@) { + my @argv = @_; + + my @caps; + for my $caps (@argv) { + my ($remailer_nick, $remailer_address) = ($caps =~ /^\s* \$remailer{"(.*)"} \s*=\s* "<(.*@.*)>.*"; \s*$/ix); + die ("caps '$caps' is not a valid remailer caps line\n") unless (defined $remailer_nick && defined $remailer_address); + push @caps, { + address => $remailer_address, + caps => $caps }; + }; + for my $caps (@caps) { + Echolot::Commands::addCommand("setremailercaps ".$caps->{'address'}." ".$caps->{'caps'}); + }; +}; + sub command_deleteremailercaps(@) { my @argv = @_; @@ -774,7 +775,7 @@ if ($COMMAND eq 'add' || $COMMAND eq 'delete') { command_set(@ARGV); hup_if_wanted($params->{'nohup'}); } elsif ($COMMAND eq 'enable' || $COMMAND eq 'disable') { - command_enabledisable(@ARGV); + command_enabledisable($COMMAND, @ARGV); hup_if_wanted($params->{'nohup'}); } elsif ($COMMAND eq 'deleteremailercaps') { command_deleteremailercaps(@ARGV); |