Use .lower() on nickname, as we're using that on s and nickname_lower uses

special irc casemapping (github)
This commit is contained in:
jesopo 2019-01-26 10:53:28 +00:00
parent 506aef6366
commit ed44e6f78b

View file

@ -342,9 +342,9 @@ class Module(ModuleManager.BaseModule):
def _prevent_highlight(self, channel, s): def _prevent_highlight(self, channel, s):
for user in channel.users: for user in channel.users:
while user.nickname_lower in s.lower(): while user.nickname.lower() in s.lower():
index = s.lower().index(user.nickname_lower) index = s.lower().index(user.nickname.lower())
length = len(user.nickname_lower) length = len(user.nickname.lower())
original = s[index:index+length] original = s[index:index+length]
original = utils.prevent_highlight(original) original = utils.prevent_highlight(original)