mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-20 02:49:49 +01:00
BotAdmins: anchor hostmask regex in find_admin()
This commit is contained in:
parent
2a437b479e
commit
c230a2f3b3
@ -153,7 +153,7 @@ sub find_admin {
|
||||
foreach my $channel_regex (keys %{ $self->{admins}->hash }) {
|
||||
if ($from =~ m/^$channel_regex$/i) {
|
||||
foreach my $hostmask_regex (keys %{ $self->{admins}->hash->{$channel_regex} }) {
|
||||
return $self->{admins}->hash->{$channel_regex}->{$hostmask_regex} if $hostmask =~ m/$hostmask_regex/i or $hostmask eq lc $hostmask_regex;
|
||||
return $self->{admins}->hash->{$channel_regex}->{$hostmask_regex} if $hostmask =~ m/^$hostmask_regex$/i or $hostmask eq lc $hostmask_regex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user