Only highlight if the entire nick is mentioned, not just individual words.
Closes #1038
This commit is contained in:
parent
0e7630fc85
commit
af826817fc
|
@ -999,9 +999,10 @@ current room topic.') % command, room_jid)
|
|||
'''checks text to see whether any of the words in muc_highlight_words
|
||||
appear'''
|
||||
|
||||
words = gajim.config.get('muc_highlight_words') + ' ' + nick
|
||||
words = gajim.config.get('muc_highlight_words').split()
|
||||
words.append(nick)
|
||||
|
||||
for word in words.split():
|
||||
for word in words:
|
||||
pattern = r'\b(' + sre.escape(word) + r')+\b'
|
||||
if sre.search(pattern, text, sre.IGNORECASE | sre.UNICODE):
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue