diff --git a/PBot/BlackList.pm b/PBot/BlackList.pm index 8c2024f6..7991a764 100644 --- a/PBot/BlackList.pm +++ b/PBot/BlackList.pm @@ -153,7 +153,7 @@ sub check_blacklist { } elsif ($flag eq 'r' && defined $gecos && $gecos =~ /$black_hostmask_escaped/i) { $self->{pbot}->{logger}->log("$hostmask GECOS $gecos blacklisted in channel $channel (matches [\$r:$black_hostmask] host and [$black_channel] channel)\n"); return 1; - } elsif ($flag eq '' && $channel =~ /$black_channel_escaped/i && $hostmask =~ /$black_hostmask_escaped/i) { + } elsif ($flag eq '' && $channel =~ /^$black_channel_escaped$/i && $hostmask =~ /$black_hostmask_escaped/i) { $self->{pbot}->{logger}->log("$hostmask blacklisted in channel $channel (matches [$black_hostmask] host and [$black_channel] channel)\n"); return 1; }