Skip to content

Commit cee617d

Browse files
committed
Convert ANSI colors to IRC (mIRC) colors
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).
1 parent 72360a4 commit cee617d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

evalbot.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ =head1 AUTHOR
3838
use FindBin;
3939
use lib 'lib';
4040
use EvalbotExecuter;
41+
use IRC::FromANSI::Tiny;
4142
use utf8;
4243

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

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

0 commit comments

Comments
 (0)