summaryrefslogtreecommitdiff
path: root/Echolot/Pinger/CPunk.pm
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2002-07-02 18:03:55 +0000
committerPeter Palfrader <peter@palfrader.org>2002-07-02 18:03:55 +0000
commitbcb4b53f7c2aec7062fac9f468496381a257ad82 (patch)
tree0cb2a6507df952e4788c78d35a726f8d6c20d660 /Echolot/Pinger/CPunk.pm
parent6319ed28454066f9530ab9c758ce85faedb6d6f9 (diff)
ping cpunk without pgponly in clear too
Diffstat (limited to 'Echolot/Pinger/CPunk.pm')
-rw-r--r--Echolot/Pinger/CPunk.pm21
1 files changed, 12 insertions, 9 deletions
diff --git a/Echolot/Pinger/CPunk.pm b/Echolot/Pinger/CPunk.pm
index 2c80d4d..90b8b8a 100644
--- a/Echolot/Pinger/CPunk.pm
+++ b/Echolot/Pinger/CPunk.pm
@@ -1,7 +1,7 @@
package Echolot::Pinger::CPunk;
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: CPunk.pm,v 1.3 2002/07/02 14:21:38 weasel Exp $
+# $Id: CPunk.pm,v 1.4 2002/07/02 18:03:55 weasel Exp $
#
=pod
@@ -196,14 +196,17 @@ sub ping($$$$$) {
"Anon-To: $to\n".
"\n".
$msg;
- my $encrypted = encrypt_to($msg, $hop->{'keyid'}, $keys, $pgp2compat);
- (defined $encrypted) or
- cluck("Encrypted is undefined"),
- return undef;
- $msg = "::\n".
- "Encrypted: PGP\n".
- "\n".
- $encrypted;
+
+ if ($hop->{'encrypt'}) {
+ my $encrypted = encrypt_to($msg, $hop->{'keyid'}, $keys, $pgp2compat);
+ (defined $encrypted) or
+ cluck("Encrypted is undefined"),
+ return undef;
+ $msg = "::\n".
+ "Encrypted: PGP\n".
+ "\n".
+ $encrypted;
+ };
$to = $hop->{'address'};
}