From 444401d899ee674e1c1672347fdb65a9d24f1999 Mon Sep 17 00:00:00 2001 From: Doug Freed Date: Thu, 16 Apr 2015 07:54:57 +0400 Subject: Fix whoGotHit to anchor properly --- modules/event.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/event.pl b/modules/event.pl index 79441f5..65c8674 100644 --- a/modules/event.pl +++ b/modules/event.pl @@ -613,7 +613,7 @@ sub whoGotHit my $regex = $cvt->convert($div[0]); foreach my $nick (keys %::sn) { next unless defined($::sn{$nick}{user}); - if (lc ($nick.'!'.$::sn{$nick}{user}.'@'.$::sn{$nick}{host}) =~ lc $regex) { + if (lc ($nick.'!'.$::sn{$nick}{user}.'@'.$::sn{$nick}{host}) =~ /^$regex$/i) { push @affected, $nick if defined($::sc{$chan}{users}{$nick}); } } @@ -622,7 +622,7 @@ sub whoGotHit my $regex = $cvt->convert($div[0]); foreach my $nick (keys %::sn) { next unless defined($::sn{$nick}{account}); - if (lc ($::sn{$nick}{account}) =~ lc $regex) { + if (lc ($::sn{$nick}{account}) =~ /^$regex$/i) { push @affected, $nick if defined($::sc{$chan}{users}{$nick}); } } -- cgit v1.2.3