diff --git a/PBot/Commands.pm b/PBot/Commands.pm index 2049384b..9b6ec5d1 100644 --- a/PBot/Commands.pm +++ b/PBot/Commands.pm @@ -81,7 +81,7 @@ sub exists { my ($keyword) = @_; foreach my $ref (@{ $self->{handlers} }) { - return 1 if $ref->{name} eq $keyword; + return 1 if $ref->{name} eq lc $keyword; } return 0; } @@ -97,6 +97,8 @@ sub interpreter { my $level = defined $admin ? $admin->{level} : 0; + my $keyword = lc $keyword; + foreach my $ref (@{ $self->{handlers} }) { if($ref->{name} eq $keyword) { if($level >= $ref->{level}) {