1 package Xchat::XPI::Utils;
11 my ($nick, $col) = ($_[0], 0);
12 $col += ord for split //, $nick;
13 my @rcolors = (nickcmp(get_info('version'), '2.4.0') < 0)
14 ? (3, 4, 6, 8, 9, 10, 11, 12, 13)
15 : (19, 20, 22, 24, 25, 26, 27, 28, 29);
17 return sprintf "\003%d%s", $rcolors[$col], $nick;
20 use base qw<Exporter>;
23 our %EXPORT_TAGS = ('funcs' => [ qw<dye_nick> ]);
24 our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
25 $EXPORT_TAGS{'all'} = [ @EXPORT_OK ];