summaryrefslogtreecommitdiff
path: root/Echolot/Pinger/CPunk.pm
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2003-02-17 14:44:15 +0000
committerPeter Palfrader <peter@palfrader.org>2003-02-17 14:44:15 +0000
commit8008d99c22778c8735d4ad24352a61e2d7c17d84 (patch)
treeb0aa01892ca439b02fe54026add3b0ead36c4934 /Echolot/Pinger/CPunk.pm
parent3103f9137c65eeba6a21899a286c957483559860 (diff)
Collect From: header lines
Diffstat (limited to 'Echolot/Pinger/CPunk.pm')
-rw-r--r--Echolot/Pinger/CPunk.pm14
1 files changed, 11 insertions, 3 deletions
diff --git a/Echolot/Pinger/CPunk.pm b/Echolot/Pinger/CPunk.pm
index 6f6e950..3878cff 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.14 2003/02/15 23:35:16 weasel Exp $
+# $Id: CPunk.pm,v 1.15 2003/02/17 14:44:15 weasel Exp $
#
=pod
@@ -175,15 +175,23 @@ sub encrypt_to($$$$) {
return $result;
};
-sub ping($$$$) {
- my ($body, $to, $chain, $keys) = @_;
+sub ping($$$$$) {
+ my ($body, $to, $with_from, $chain, $keys) = @_;
my $msg = $body;
for my $hop (reverse @$chain) {
+ my $header = '';
+ if ($with_from) {
+ my $address = Echolot::Config::get()->{'my_localpart'} . '@' .
+ Echolot::Config::get()->{'my_domain'};
+ $header = "##\nFrom: Echolot Pinger <$address>\n\n";
+ $with_from = 0;
+ };
$msg = "::\n".
"Anon-To: $to\n".
"\n".
+ $header.
$msg;
if ($hop->{'encrypt'}) {