Skip to content

factoids.py case sensitivity #103

@edwardslabs

Description

@edwardslabs

In the regex hook for factoids.py the keyword is forced to lower case as seen below.
https://github.com/CloudBotIRC/CloudBot/blob/master/plugins/factoids.py#L140

However in the remember command adding a keyword with caps is allowed and it is not forced to .lower().

This makes it possible to add a fact that can never be retrieved. If the goal is to keep the keywords case insensitive then https://github.com/CloudBotIRC/CloudBot/blob/master/plugins/factoids.py#L77-81 should add word = word.lower().

If case sensitive factoids should be allowed than .lower should be removed from https://github.com/CloudBotIRC/CloudBot/blob/master/plugins/factoids.py#L140

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions