summaryrefslogtreecommitdiff
path: root/Echolot/Conf.pm
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2002-07-03 12:09:03 +0000
committerPeter Palfrader <peter@palfrader.org>2002-07-03 12:09:03 +0000
commit2da43c3148d7ae67554de9cdf51fd2d0d03884a4 (patch)
treec04e0cdbbd9e9d6186a9de267ddfa6fd3294199f /Echolot/Conf.pm
parentf9a1bf5f001280fb7a22ba9f9613255fff35161d (diff)
reworked the no expire stuff for manual caps
Diffstat (limited to 'Echolot/Conf.pm')
-rw-r--r--Echolot/Conf.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/Echolot/Conf.pm b/Echolot/Conf.pm
index bc14f84..68f1030 100644
--- a/Echolot/Conf.pm
+++ b/Echolot/Conf.pm
@@ -1,7 +1,7 @@
package Echolot::Conf;
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: Conf.pm,v 1.10 2002/07/03 11:08:21 weasel Exp $
+# $Id: Conf.pm,v 1.11 2002/07/03 12:09:03 weasel Exp $
#
=pod
@@ -42,8 +42,8 @@ sub send_requests() {
Echolot::Globals::get()->{'storage'}->enable_commit();
};
-sub remailer_conf($$$) {
- my ($conf, $token, $time) = @_;
+sub remailer_conf($$$;$) {
+ my ($conf, $token, $time, $dontexpire) = @_;
my ($id) = $token =~ /^conf\.(\d+)$/;
(defined $id) or
@@ -68,7 +68,7 @@ sub remailer_conf($$$) {
Echolot::Globals::get()->{'storage'}->add_prospective_address($remailer_address, 'self-capsstring-conf', $remailer_address);
} else {
Echolot::Globals::get()->{'storage'}->restore_ttl( $remailer->{'address'} );
- Echolot::Globals::get()->{'storage'}->set_caps($remailer_type, $remailer_caps, $remailer_nick, $remailer_address, $time);
+ Echolot::Globals::get()->{'storage'}->set_caps($remailer_type, $remailer_caps, $remailer_nick, $remailer_address, $time, $dontexpire);
# if remailer is cpunk and not pgponly
if (($remailer_caps =~ /\bcpunk\b/) && !($remailer_caps =~ /\bpgponly\b/)) {
@@ -145,7 +145,7 @@ sub set_caps_manually($$) {
my $token = 'conf.'.$id;
my $conf = "Remailer-Type: set-manually\n$caps";
- remailer_conf($conf, $token, time + 10 * 365 * 24 * 60 * 60); # FIXME: Y2036
+ remailer_conf($conf, $token, time, 1);
return 1;
};