use strict;
use warnings;
-our $VERSION = '0.3.7'; # 6edfe656246780e
+our $VERSION = '0.4.0'; # 6edfe656246780e
our %IRSSI = (
authors => 'Nei',
name => 'nickcolor_expando',
my @action_protos = qw(irc silc xmpp);
my (%set_colour, %avoid_colour, %has_colour, %last_time, %netchan_hist);
-my ($expando, $ignore_re, $ignore_setting, $global_colours, $retain_colour_time, @colours, $exited, $session_load_time);
+my ($expando, $iexpando, $ignore_re, $ignore_setting, $global_colours, $retain_colour_time, @colours, $exited, $session_load_time);
+($expando, $iexpando) = ('', ''); # Initialise to empty
# the numbers for the scoring system, highest colour value will be chosen
my %scores = (
return $expando;
}
+sub expando_neatcolour_inv {
+ return $iexpando;
+}
+
# one-at-a-time hash
sub simple_hash {
use integer;
$nick = $nickobj->{nick} if $nickobj;
my $colour = colourise_nt($srv->{tag}.'/'.$obj->{name}, $nick);
$expando = $colour ? format_expand('%X'.$colour) : '';
+ $iexpando = $colour ? format_expand('%x'.$colour) : '';
}
sub msg_line_tag_xmppaction {
sub clear_ref {
$expando = '';
+ $iexpando = '';
}
sub nicklist_changed {
"message $_ own_action" => 'none')
} @action_protos),
});
-
+
+Irssi::expando_create('inickcolor', \&expando_neatcolour_inv, {
+ 'message public' => 'none',
+ 'message own_public' => 'none',
+ (map { ("message $_ action" => 'none',
+ "message $_ own_action" => 'none')
+ } @action_protos),
+ });
+
Irssi::signal_add({
'message public' => 'msg_line_tag',
'message own_public' => 'msg_line_clear',
# Changelog
# =========
+# 0.4.0
+# - Allow usage of the colour as a background (using $inickcolor)
# 0.3.7
# - fix crash if xmpp action signal is not registered (just ignore it)
# 0.3.6