Skip to content

Commit

Permalink
copyedit
Browse files Browse the repository at this point in the history
  • Loading branch information
ikedas committed Jun 16, 2023
1 parent fbe7f7f commit 57f1ef3
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions src/cgi/wwsympa.fcgi.in
Original file line number Diff line number Diff line change
Expand Up @@ -1808,30 +1808,19 @@ Sympa::Spool::Listmaster->instance->flush(purge => 1);
## Write to log
sub wwslog {
my $facility = shift;

my $msg = shift;
my $remote = $ENV{'REMOTE_HOST'} || $ENV{'REMOTE_ADDR'};
my $wwsmsg = '';

$wwsmsg = "[list $param->{'list'}] " . $wwsmsg
if $param->{'list'};

$wwsmsg = "[user $param->{'user'}{'email'}] " . $wwsmsg
if $param->{'user'}{'email'};

$wwsmsg = "[rss] " . $wwsmsg
if $rss;

$wwsmsg = "[bot] " . $wwsmsg
if $session->{'is_a_crawler'};

$wwsmsg = "[client $remote] " . $wwsmsg
if $remote;

$wwsmsg = "[session $session->{'id_session'}] " . $wwsmsg
if $session;

$wwsmsg = "[robot $robot] " . $wwsmsg;
my $wwsmsg = join ' ',
grep {defined} (
"[robot $robot]",
($session and "[session $session->{'id_session'}]"),
($remote and "[client $remote]"),
($session->{'is_a_crawler'} and "[bot]"),
($rss and "[rss]"),
($param->{'user'}{'email'} and "[user $param->{'user'}{'email'}]"),
($param->{'list'} and "[list $param->{'list'}]")
);

push @_, $wwsmsg;
if ($msg =~ /^([(][^)]*[)])\s*(.*)/s) {
Expand Down

0 comments on commit 57f1ef3

Please sign in to comment.