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} }) {