2 # Functions for parsing this module's logs
6 # parse_webmin_log(user, script, action, type, object, ¶ms)
7 # Converts logged information from this module into human-readable form
10 local ($user, $script, $action, $type, $object, $p, $long) = @_;
11 if ($type eq 'alias' || $type eq 'virtuser' || $type eq 'mailer' ||
12 $type eq 'generic' || $type eq 'domain' || $type eq 'access') {
13 return &text("log_${type}_${action}",
14 "<tt>".&html_escape($object)."</tt>");
16 elsif ($type eq 'aliases' || $type eq 'virtusers' || $type eq 'mailers' ||
17 $type eq 'generics' || $type eq 'domains' || $type eq 'accesses') {
18 return &text("log_${action}_${type}", $object);
20 elsif ($type eq 'feature') {
21 return &text("log_feature_${action}",
22 "<tt>".&html_escape($p->{'text'})."</tt>");
24 elsif ($action eq 'delmailq') {
26 return &text("log_delmailq",
27 &html_escape(&extract_email($p->{'from'})));
30 return &text("log_delmailqs", $p->{'count'});
33 elsif ($action eq 'delmail') {
34 local @d = split(/\0/, $p->{'d'});
35 return &text("log_delmail", scalar(@d), "<tt>$p->{'user'}</tt>");
37 elsif ($action eq 'movemail') {
38 local @d = split(/\0/, $p->{'d'});
39 local $to = $p->{'move1'} ? $p->{'moveto1'} : $p->{'moveto2'};
40 return &text("log_movemail", scalar(@d), "<tt>$p->{'user'}</tt>",
43 elsif ($action eq 'send') {
44 return &text('log_send', &html_escape(&extract_email($p->{'to'})));
46 elsif ($text{"log_$action"}) {
47 return $text{"log_$action"};
56 if ($_[0] =~ /([^<>"' \(\)]+\@[^<>"' \(\)]+)/) {
59 elsif ($_[0] =~ /<(\S+)>/) {