mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-23 18:44:33 +01:00
find_admin: Fix anchored hostmask regex for global channel
This commit is contained in:
parent
52d3ab024b
commit
103780cf0b
@ -151,7 +151,7 @@ sub find_admin {
|
|||||||
foreach my $channel_regex (keys %{ $self->{admins}->hash }) {
|
foreach my $channel_regex (keys %{ $self->{admins}->hash }) {
|
||||||
if($from !~ m/^#/) {
|
if($from !~ m/^#/) {
|
||||||
foreach my $hostmask_regex (keys %{ $self->{admins}->hash->{$channel_regex} }) {
|
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) {
|
} elsif($from =~ m/^$channel_regex$/i) {
|
||||||
foreach my $hostmask_regex (keys %{ $self->{admins}->hash->{$channel_regex} }) {
|
foreach my $hostmask_regex (keys %{ $self->{admins}->hash->{$channel_regex} }) {
|
||||||
|
Loading…
Reference in New Issue
Block a user