summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrevor Slocum2016-04-26 17:27:32 -0700
committerTrevor Slocum2016-04-26 18:08:51 -0700
commit6ad5ab8474f188c453b3dbeb91ccd427a6419fb7 (patch)
tree152db4596eae9124ae0ff0193e15ea9ea6af7ba0
parent91c8e2ec878d6942b11f61daa5cfef1d211de0d9 (diff)
downloadscripts.irssi.org-6ad5ab8474f188c453b3dbeb91ccd427a6419fb7.tar.bz2
mass_hilight_blocker: fix nick quoting
-rw-r--r--scripts/mass_hilight_blocker.pl7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/mass_hilight_blocker.pl b/scripts/mass_hilight_blocker.pl
index a5611a3..99e22fd 100644
--- a/scripts/mass_hilight_blocker.pl
+++ b/scripts/mass_hilight_blocker.pl
@@ -18,14 +18,14 @@
use strict;
use Irssi;
use vars qw($VERSION %IRSSI);
-$VERSION = "0.2";
+$VERSION = "0.3";
%IRSSI = (
authors => "Uli Baumann",
contact => "f-zappa\@irc-muenster.de",
name => "mass_hilight_blocker",
description => "Disables hilighting for messages containing a lot of nicknames",
license => "GPL",
- changed => "Tue Jun 1 13:32:20 CEST 2004",
+ changed => "Wed Apr 27 02:30:00 CEST 2016",
);
@@ -43,8 +43,7 @@ sub sig_printtext {
foreach my $nick ($channel->nicks()) # walk through nicks
{
$nick = $nick->{nick};
- $nick =~ s/([\]\[])/\\$1/g; # ']' and '[' need masking
- if ($text =~ /$nick/) # does line contain this nick?
+ if ($text =~ /\Q$nick/) # does line contain this nick?
{$num_nicks++;} # then increase counter
}