ignore_case fix

This commit is contained in:
Alex 2023-01-24 20:26:31 +02:00
parent fad45c66aa
commit a049416b2d

View file

@ -164,7 +164,12 @@ class Command(Filter):
result = allowed_command.match(command.command)
if result:
return replace(command, regexp_match=result)
elif command.command == allowed_command: # String
command_name = command.command
if self.ignore_case:
command_name, allowed_command = map(str.casefold, (command_name, allowed_command))
if command_name == allowed_command: # String
return command
raise CommandException("Command did not match pattern")