--- trunk/irc-logger.pl 2006/05/20 10:12:19 25 +++ trunk/irc-logger.pl 2006/05/20 10:30:45 26 @@ -116,6 +116,7 @@ $args->{limit} ||= 10; $args->{fmt} ||= { + date => '[%s] ', time => '{%s} ', time_channel => '{%s %s} ', nick => '%s: ', @@ -202,12 +203,11 @@ $row->{time} =~ s#\.\d+##; - my $t; - $t = $row->{date} . ' ' if ($last_row->{date} ne $row->{date}); - $t .= $row->{time}; - my $msg = ''; + $msg = sprintf($args->{fmt}->{date}, $row->{date}) . ' ' if ($last_row->{date} ne $row->{date}); + my $t = $row->{time}; + if ($last_row->{channel} ne $row->{channel}) { $msg .= sprintf($args->{fmt}->{time_channel}, $t, $row->{channel}); } else { @@ -487,6 +487,7 @@ my $style = <<'_END_OF_STYLE_'; p { margin: 0; padding: 0.1em; } .time, .channel { color: #808080; font-size: 60%; } +.date { float: right; background: #404040; color: #e0e0e0; font-size: 120%; padding: 0.5em; border-top: 1px dashed #e0e0e0; } .nick { color: #000000; font-size: 80%; padding: 2px; font-family: courier, courier new, monospace ; } .message { color: #000000; font-size: 100%; } .search { float: right; } @@ -531,6 +532,7 @@ limit => $q->param('last') || 100, search => $q->param('search') || $q->param('grep') || undef, fmt => { + date => '
%s
', time => '%s ', time_channel => '%s %s ', nick => '%s: ',