116 |
$args->{limit} ||= 10; |
$args->{limit} ||= 10; |
117 |
|
|
118 |
$args->{fmt} ||= { |
$args->{fmt} ||= { |
119 |
|
date => '[%s] ', |
120 |
time => '{%s} ', |
time => '{%s} ', |
121 |
time_channel => '{%s %s} ', |
time_channel => '{%s %s} ', |
122 |
nick => '%s: ', |
nick => '%s: ', |
203 |
|
|
204 |
$row->{time} =~ s#\.\d+##; |
$row->{time} =~ s#\.\d+##; |
205 |
|
|
|
my $t; |
|
|
$t = $row->{date} . ' ' if ($last_row->{date} ne $row->{date}); |
|
|
$t .= $row->{time}; |
|
|
|
|
206 |
my $msg = ''; |
my $msg = ''; |
207 |
|
|
208 |
|
$msg = sprintf($args->{fmt}->{date}, $row->{date}) . ' ' if ($last_row->{date} ne $row->{date}); |
209 |
|
my $t = $row->{time}; |
210 |
|
|
211 |
if ($last_row->{channel} ne $row->{channel}) { |
if ($last_row->{channel} ne $row->{channel}) { |
212 |
$msg .= sprintf($args->{fmt}->{time_channel}, $t, $row->{channel}); |
$msg .= sprintf($args->{fmt}->{time_channel}, $t, $row->{channel}); |
213 |
} else { |
} else { |
487 |
my $style = <<'_END_OF_STYLE_'; |
my $style = <<'_END_OF_STYLE_'; |
488 |
p { margin: 0; padding: 0.1em; } |
p { margin: 0; padding: 0.1em; } |
489 |
.time, .channel { color: #808080; font-size: 60%; } |
.time, .channel { color: #808080; font-size: 60%; } |
490 |
|
.date { float: right; background: #404040; color: #e0e0e0; font-size: 120%; padding: 0.5em; border-top: 1px dashed #e0e0e0; } |
491 |
.nick { color: #000000; font-size: 80%; padding: 2px; font-family: courier, courier new, monospace ; } |
.nick { color: #000000; font-size: 80%; padding: 2px; font-family: courier, courier new, monospace ; } |
492 |
.message { color: #000000; font-size: 100%; } |
.message { color: #000000; font-size: 100%; } |
493 |
.search { float: right; } |
.search { float: right; } |
532 |
limit => $q->param('last') || 100, |
limit => $q->param('last') || 100, |
533 |
search => $q->param('search') || $q->param('grep') || undef, |
search => $q->param('search') || $q->param('grep') || undef, |
534 |
fmt => { |
fmt => { |
535 |
|
date => '<hr size="1"/><div class="date">%s</div> ', |
536 |
time => '<span class="time">%s</span> ', |
time => '<span class="time">%s</span> ', |
537 |
time_channel => '<span class="channel">%s %s</span> ', |
time_channel => '<span class="channel">%s %s</span> ', |
538 |
nick => '%s: ', |
nick => '%s: ', |