From: Dan Boger Date: Mon, 16 Mar 2009 06:15:50 +0000 (-0700) Subject: r555 - Fix hilighting given @service, again X-Git-Url: https://git.sommitrealweird.co.uk/twirssi-net-twitter-lite.git/commitdiff_plain/e37690d9d648b1455f48129a5860b763da42d177?ds=sidebyside;hp=--cc r555 - Fix hilighting given @service, again --- e37690d9d648b1455f48129a5860b763da42d177 diff --git a/twirssi.pl b/twirssi.pl index cc7c055..4bb7078 100644 --- a/twirssi.pl +++ b/twirssi.pl @@ -11,7 +11,7 @@ $Data::Dumper::Indent = 1; use vars qw($VERSION %IRSSI); $VERSION = "2.1.3beta"; -my ($REV) = '$Rev: 554 $' =~ /(\d+)/; +my ($REV) = '$Rev: 555 $' =~ /(\d+)/; %IRSSI = ( authors => 'Dan Boger', contact => 'zigdon@gmail.com', @@ -20,7 +20,7 @@ my ($REV) = '$Rev: 554 $' =~ /(\d+)/; . 'Can optionally set your bitlbee /away message to same', license => 'GNU GPL v2', url => 'http://twirssi.com', - changed => '$Date: 2009-03-15 23:09:56 -0700 (Sun, 15 Mar 2009) $', + changed => '$Date: 2009-03-15 23:15:33 -0700 (Sun, 15 Mar 2009) $', ); my $window; @@ -938,7 +938,9 @@ sub monitor_child { my $hilight_color = $irssi_to_mirc_colors{ Irssi::settings_get_str("hilight_color") }; - if ( $_ eq '@'.substr($meta{account}, 0, index($meta{account}, "@")) + my $nick = + '@' . substr( $meta{account}, 0, index( $meta{account}, "@" ) ); + if ( $_ =~ /\Q$nick\E(?:\W|$)/i and Irssi::settings_get_bool("twirssi_hilights") ) { $meta{nick} = "\cC$hilight_color$meta{nick}\cO";