Skip to content

Instantly share code, notes, and snippets.

@japhb
Created January 21, 2013 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save japhb/4590650 to your computer and use it in GitHub Desktop.
Save japhb/4590650 to your computer and use it in GitHub Desktop.
--- ansi_color.pl~ 2011-05-23 16:41:43.000000000 -0700
+++ ansi_color.pl 2013-01-21 15:41:54.497720468 -0800
@@ -6,15 +6,17 @@
register(
"ANSI Color Converter",
- "0.000001",
+ "0.000002",
"Attempt to convert ANSI color codes",
);
#qw(black red green yelllow blue magenta cyan white);
my @colors = (qw(01 05 09 08 02 13 11), '');
-hook_print( "Channel Message", \&convert_ansi, { data => "Channel Message" } );
-hook_print( "Channel Action", \&convert_ansi, { data => "Channel Action" } );
+for my $event ('Channel Action', 'Channel Action Hilight', 'Channel Message', 'Channel Msg Hilight',
+ 'Private Action', 'Private Action to Dialog', 'Private Message', 'Private Message to Dialog') {
+ hook_print($event, \&convert_ansi, { data => $event });
+}
sub convert_ansi {
my ($nick, $text, $mode, $id_text) = @{$_[0]};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment