diff --git a/PBot/BotAdmins.pm b/PBot/BotAdmins.pm index 346b4540..382ba602 100644 --- a/PBot/BotAdmins.pm +++ b/PBot/BotAdmins.pm @@ -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; }