X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fservice;h=10fbbc0a2488c3abc6f772e790bb2e0b5231e21f;hb=1a1fa6f0af2be9d4076d9aad5f5a84c5fb3d9a8a;hp=20a0219d2a9c76f35b6199ceaecf05ceaac97be6;hpb=ad30a96a3281439d4284f8ca54942d26c945279e;p=debbugs.git
diff --git a/scripts/service b/scripts/service
index 20a0219..10fbbc0 100755
--- a/scripts/service
+++ b/scripts/service
@@ -7,6 +7,9 @@
use warnings;
use strict;
+use locale;
+use POSIX qw(strftime locale_h);
+setlocale(LC_TIME, "C");
use Debbugs::Config qw(:globals :config);
@@ -473,11 +476,13 @@ END
transcript => $transcript,
debug => $debug,
ok => \$ok,
+ replyto => $replyto,
);
if ($terminate_control) {
last;
}
} else {
+ print {$transcript} "Unknown command or malformed arguments to command.\n";
$errors++;
if (++$unknowns >= 5) {
print {$transcript} "Too many unknown commands, stopping here.\n\n";
@@ -499,30 +504,17 @@ my @maintccs = determine_recipients(recipients => \%recipients,
address_only => 1,
cc => 1,
);
-my $maintccs = 'Cc: '.join(",\n ",
- determine_recipients(recipients => \%recipients,
- cc => 1,
- )
- )."\n";
-
-my $packagepr = '';
-$packagepr = "X-${gProject}-PR-Package: " . join(keys %affected_packages) . "\n" if keys %affected_packages;
-
-# Add Bcc's to subscribed bugs
-# now handled by Debbugs::Recipients
-#push @bcc, map {"bugs=$_\@$gListDomain"} keys %bug_affected;
-
if (!defined $header{'subject'} || $header{'subject'} eq "") {
$header{'subject'} = "your mail";
}
# Error text here advertises how many errors there were
-my $error_text = $errors > 0 ? " (with $errors errors)":'';
+my $error_text = $errors > 0 ? " (with $errors error" . ($errors > 1 ? "s" : "") . ")" : "";
my @common_headers;
push @common_headers, 'X-Loop',$gMaintainerEmail;
-my $temp_transcript = ${transcript_scalar};
+my $temp_transcript = $transcript_scalar;
eval{
$temp_transcript = decode("utf8",$temp_transcript,Encode::FB_CROAK);
};
@@ -555,19 +547,6 @@ my $repliedshow= join(', ',$replyto,
)
);
-# -1 is the service.in log
-&filelock("lock/-1");
-open(AP,">>db-h/-1.log") || die "open db-h/-1.log: $!";
-print(AP
- "\2\n$repliedshow\n\5\n$reply\n\3\n".
- "\6\n".
- "Request received from ".
- html_escape($header{'from'})."
\n".
- "to ".html_escape($controlrequestaddr)."
\n".
- "\3\n".
- "\7\n",escape_log(@log),"\n\3\n") || die "writing db-h/-1.log: $!";
-close(AP) || die "open db-h/-1.log: $!";
-&unfilelock;
utime(time,time,"db-h");
&sendmailmessage($reply,