2 # Defines editors for logging user agents
4 sub mod_log_agent_directives
6 $rv = [ [ 'AgentLog', 0, 3, 'virtual' ] ];
7 return &make_directives($rv, $_[0], "mod_log_agent");
13 $rv = sprintf "<input type=radio name=AgentLog_mode value=0 %s> $text{'mod_log_agent_default'}\n",
14 $_[0] ? "" : "checked";
15 $rv .= sprintf "<input type=radio name=AgentLog_mode value=1 %s> $text{'mod_log_agent_file'}",
16 $_[0] && $_[0]->{'value'} !~ /^\|/ ? "checked" : "";
17 $rv .= sprintf "<input type=radio name=AgentLog_mode value=2 %s> $text{'mod_log_agent_program'}",
18 $_[0]->{'value'} =~ /^\|/ ? "checked" : "";
19 $rv .= sprintf "<input name=AgentLog size=20 value=\"%s\">\n",
20 $_[0]->{'value'} =~ /^\|(.*)$/ ? $1 : $_[0]->{'value'};
21 return (1, "$text{'mod_log_agent_log'}", $rv);
25 if ($in{'AgentLog_mode'} == 0) { return ( [ ] ); }
26 $in{'AgentLog'} =~ /^\S+$/ ||
27 &error(&text('mod_log_agent_efile', $in{'AgentLog'}));
28 if ($in{'AgentLog_mode'} == 1) { return ( [ $in{'AgentLog'} ] ); }
29 else { return ( [ "|$in{'AgentLog'}" ] ); }