Created
January 21, 2013 23:43
-
-
Save japhb/4590650 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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