Skip to content

Commit

Permalink
Convert ANSI colors to IRC (mIRC) colors
Browse files Browse the repository at this point in the history
This makes things more readable for folks with non-console clients,
as well as the IRClog (which strips IRC colors, but leaves the ANSI
codes in place as garbage).
  • Loading branch information
arodland committed Feb 18, 2015
1 parent 72360a4 commit cee617d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions evalbot.pl
Expand Up @@ -38,6 +38,7 @@ =head1 AUTHOR
use FindBin;
use lib 'lib';
use EvalbotExecuter;
use IRC::FromANSI::Tiny;
use utf8;

# $ENV{LD_LIBRARY_PATH} = '/usr/local/lib/';
Expand Down Expand Up @@ -306,6 +307,7 @@ package Evalbot;
my $null = "\N{SYMBOL FOR NULL}";
$response =~ s/\n/$newline/g;
$response =~ s/\x00/$null/g;
$response = IRC::FromANSI::Tiny::convert($response);

my $format_len = length(encode_utf8(sprintf $format_res, $prefix, ''));
if (length(encode_utf8($response)) + $format_len > $max_output_len){
Expand Down

0 comments on commit cee617d

Please sign in to comment.