3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 03:33:06 +01:00

Anchor regex in find_admin

This commit is contained in:
Pragmatic Software 2015-06-05 22:27:21 -07:00
parent bf45c6cdde
commit f415d73827

View File

@ -157,7 +157,7 @@ sub find_admin {
return $self->{admins}->hash->{$channel_regex}->{$hostmask_regex} if($from =~ m/$nick/i and $hostmask =~ m/$hostmask_regex/i);
}
} elsif($from =~ m/$channel_regex/i) {
} elsif($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;
}