3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-04 18:38:47 +02:00

find_admin: Fix anchored hostmask regex for global channel

This commit is contained in:
Pragmatic Software 2017-12-03 10:04:03 -08:00
parent 52d3ab024b
commit 103780cf0b

View File

@ -151,7 +151,7 @@ sub find_admin {
foreach my $channel_regex (keys %{ $self->{admins}->hash }) {
if($from !~ m/^#/) {
foreach my $hostmask_regex (keys %{ $self->{admins}->hash->{$channel_regex} }) {
return $self->{admins}->hash->{$channel_regex}->{$hostmask_regex} if $hostmask =~ m/$hostmask_regex/i;
return $self->{admins}->hash->{$channel_regex}->{$hostmask_regex} if $hostmask =~ m/$hostmask_regex/i or $hostmask eq lc $hostmask_regex;
}
} elsif($from =~ m/^$channel_regex$/i) {
foreach my $hostmask_regex (keys %{ $self->{admins}->hash->{$channel_regex} }) {