From 103780cf0b1edba77aa48bf7fad693cca5588bbe Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 3 Dec 2017 10:04:03 -0800 Subject: [PATCH] find_admin: Fix anchored hostmask regex for global channel --- PBot/BotAdmins.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PBot/BotAdmins.pm b/PBot/BotAdmins.pm index 6fdc380a..a1b1cac2 100644 --- a/PBot/BotAdmins.pm +++ b/PBot/BotAdmins.pm @@ -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} }) {