Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

filter out IRC color codes

  • Loading branch information...
commit 5c62225177a136a688d94feab87fdb645413bbdd 1 parent 0cefd59
Moritz Lenz authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/IrcLog/WWW.pm
7 lib/IrcLog/WWW.pm
View
@@ -342,6 +342,11 @@ sub irc_channel_links {
}
my %output_chain = (
+ irc_color_codes => {
+ re => qr/\03\d{2}/,
+ match => '',
+ rest => 'ansi_color_codes',
+ },
ansi_color_codes => {
re => qr{$color_start.*?(?:$color_reset|\z)}s,
match => \&ansi_color_codes,
@@ -487,7 +492,7 @@ sub message_line {
TIME => format_time($args_ref->{timestamp}),
MESSAGE => output_process(my_decode(
$args_ref->{message}),
- "ansi_color_codes",
+ "irc_color_codes",
$args_ref->{channel},
$args_ref->{nick},
),
Please sign in to comment.
Something went wrong with that request. Please try again.