1 package Xchat::XPI::Utils;
8 use lib get_info 'xchatdir';
9 use Xchat::XPI qw/register init/;
11 our $VERSION = '0.01';
16 my ($nick, $col) = ($_[0], 0);
17 $col += ord for split //, $nick;
18 my @rcolors = (nickcmp(get_info('version'), '2.4.0') < 0)
19 ? (3, 4, 6, 8, 9, 10, 11, 12, 13)
20 : (19, 20, 22, 24, 25, 26, 27, 28, 29);
22 return sprintf "\003%d%s", $rcolors[$col], $nick;
25 use base qw/Exporter/;
28 our %EXPORT_TAGS = ('funcs' => [ qw/dye_nick/ ]);
29 our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
30 $EXPORT_TAGS{'all'} = [ @EXPORT_OK ];
32 $ph = Xchat::XPI->new(
33 name => 'Extended Xchat Perl Interface :: Utils',
35 desc => 'Utility functions',
36 author => 'Vincent Pit (VPIT)',
37 email => 'perl@profvince.com',
38 url => 'http://www.profvince.com',