1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
--- insub.old Wed May 11 00:33:48 2005
+++ insub.pl Wed May 11 00:33:51 2005
@@ -364,19 +364,24 @@
$text =~ s/</</g;
$text =~ s/>/>/g;
- if (defined($prev_bg_color) && $bg_col == $prev_bg_color &&
- defined($prev_fg_color) && $fg_col == $prev_fg_color) {
- $ret = $text;
+ if ((defined($prev_bg_color) && $bg_col != $prev_bg_color) ||
+ (defined($prev_fg_color) && $fg_col != $prev_fg_color)) {
+ $ret .= qq(</span>);
+ }
+
+ if ((defined($prev_bg_color) && $bg_col == $prev_bg_color) &&
+ (defined($prev_fg_color) && $fg_col == $prev_fg_color)) {
+ $ret .= $text;
} elsif ($bg_col == 1) {
# black is assumed because of a div taggy
- $ret = sprintf(
- qq(<span style="color:%s;">%s</span>),
+ $ret .= sprintf(
+ qq(<span style="color:%s;">%s),
$html_map->{$fg_col},
$text,
);
} else {
- $ret = sprintf(
- qq(<span style="color:%s;background-color:%s;">%s</span>),
+ $ret .= sprintf(
+ qq(<span style="color:%s;background-color:%s;">%s),
$html_map->{$fg_col},
$html_map->{$bg_col},
$text,
@@ -916,6 +921,7 @@
}
+ $| = 1 if ($throttle);
foreach my $line (split(/\n/, $text)) {
if ($CONTEXT eq 'irssi') {
$cmd = "msg $sendto" unless $cmd;
|