3
0
mirror of https://github.com/pragma-/pbot.git synced 2025-01-23 10:34:52 +01:00

Anchor blacklist regexes

This commit is contained in:
Pragmatic Software 2018-05-12 02:51:23 -07:00
parent ad368c9108
commit 4e041f94fa

View File

@ -154,13 +154,13 @@ sub check_blacklist {
next if $channel !~ /^$black_channel_escaped$/;
if ($flag eq 'a' && defined $nickserv && $nickserv =~ /$black_hostmask_escaped/i) {
if ($flag eq 'a' && defined $nickserv && $nickserv =~ /^$black_hostmask_escaped$/i) {
$self->{pbot}->{logger}->log("$hostmask nickserv $nickserv blacklisted in channel $channel (matches [\$a:$black_hostmask] host and [$black_channel] channel)\n");
return 1;
} elsif ($flag eq 'r' && defined $gecos && $gecos =~ /$black_hostmask_escaped/i) {
} 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 '' && $hostmask =~ /$black_hostmask_escaped/i) {
} elsif ($flag eq '' && $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;
}