]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
mass_hilight_blocker: fix nick quoting
authorTrevor Slocum <redacted>
Wed, 27 Apr 2016 00:27:32 +0000 (17:27 -0700)
committerTrevor Slocum <redacted>
Wed, 27 Apr 2016 01:08:51 +0000 (18:08 -0700)
scripts/mass_hilight_blocker.pl

index a5611a389028a62c9725c107350e10c3a8b61818..99e22fdf2884d7ed916fb3f559f546e3505e73e4 100644 (file)
 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
         }
       
git clone https://git.99rst.org/PROJECT