Handle hostnames with upper-case letters
[webmin.git] / sshd / log_parser.pl
1 # log_parser.pl
2 # Functions for parsing this module's logs
3
4 do 'sshd-lib.pl';
5
6 # parse_webmin_log(user, script, action, type, object, &params)
7 # Converts logged information from this module into human-readable form
8 sub parse_webmin_log
9 {
10 local ($user, $script, $action, $type, $object, $p) = @_;
11 if ($type eq "host") {
12         if ($object eq "*") {
13                 return $text{"log_${action}_all"};
14                 }
15         else {
16                 return &text("log_${action}_host",
17                              "<tt>".&html_escape($object)."</tt>");
18                 }
19         }
20 elsif ($action eq "manual") {
21         return &text("log_${action}", "<tt>$object</tt>");
22         }
23 else {
24         return $text{"log_${action}"};
25         }
26 }
27