--- trunk/irc-logger.pl 2006/06/16 21:28:46 30 +++ trunk/irc-logger.pl 2006/06/17 17:23:26 31 @@ -83,6 +83,7 @@ }); my $tags; +my $tag_regex = '\b([\w-_]+)//'; =head2 get_from_log @@ -501,10 +502,11 @@ my $m = $arg->{message}; from_to('UTF-8', 'iso-8859-2', $m) if (is_utf8($m)); - while ($m =~ s#\b([\w-_]+)//##s) { + while ($m =~ s#$tag_regex##s) { my $tag = $1; next if (! $tag || $tag =~ m/https?:/i); push @{ $tags->{$tag} }, $arg->{id}; + warn "+tag $tag: $arg->{id}\n"; } } @@ -551,6 +553,8 @@ .col-2 { background: #99ff99 } .col-3 { background: #ff9999 } .col-4 { background: #ff66ff } +a:link.tag, a:visited.tag { border: 1px dashed #ccc; backgound: #ccc; text-decoration: none } +a:hover.tag { border: 1px solid #eee } _END_OF_STYLE_ my $max_color = 4; @@ -584,7 +588,7 @@ } . - qq{
} . $cloud->html(500) . qq{
} . + $cloud->html(500) . qq{

} . join("

", get_from_log( @@ -604,6 +608,7 @@ my $m = shift || return; $m =~ s/($escape_re)/$escape{$1}/gs; $m =~ s#($RE{URI}{HTTP})#$1#gs; + $m =~ s#$tag_regex#$1#g; return $m; }, nick => sub {