wordbot: Fix latest wordbot patch (whoopsie)
Last patch was creating a set of the list of all matches, instead of a set of all matches. This fixes that, and also makes the regex a raw string. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -235,7 +235,7 @@ class Wordbot(Plugin):
|
|||||||
if not self.db.is_game_active(channel):
|
if not self.db.is_game_active(channel):
|
||||||
# Don't try to score words for inactive games
|
# Don't try to score words for inactive games
|
||||||
return
|
return
|
||||||
words_in_line = {re.findall("[a-z0-9-]+", line.lower())}
|
words_in_line = set(re.findall(r"[a-z0-9-]+", line.lower()))
|
||||||
matches = words_in_line & self.db.unmatched_words(channel)
|
matches = words_in_line & self.db.unmatched_words(channel)
|
||||||
for word in matches:
|
for word in matches:
|
||||||
self.send_to(
|
self.send_to(
|
||||||
|
|||||||
Reference in New Issue
Block a user