From 675a8099b5ef0cec8d0cc1f3567d8cfb6b401a1d Mon Sep 17 00:00:00 2001 From: aewens Date: Mon, 10 Dec 2018 13:27:09 -0500 Subject: [PATCH] Fixed bug in word score detection, added cosmic voyage to RSS feed --- bot/responses.py | 7 ++++--- coroutines/__init__.py | 10 ++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/bot/responses.py b/bot/responses.py index a5d556f..b96a62d 100644 --- a/bot/responses.py +++ b/bot/responses.py @@ -22,8 +22,6 @@ class Responses: if name in users and "blacklist" in users[name]: reason = users[name]["blacklist"]["reason"] - message = "is ignoring {} for reason '{}'".format(name, reason) - self.bot.send_action(source, message) return False last_response = 0 @@ -35,10 +33,13 @@ class Responses: wait = 1 if name != author and last_response > 0 and now - last_response < wait: + reason = "Auto-banished" self.bot.memories["users"][name]["blacklist"] = { - "reason": "Auto-banished", + "reason": reason, "when": now } + message = "is ignoring {} for reason '{}'".format(name, reason) + self.bot.send_action(source, message) return False return True diff --git a/coroutines/__init__.py b/coroutines/__init__.py index 9c27359..67fd216 100644 --- a/coroutines/__init__.py +++ b/coroutines/__init__.py @@ -40,5 +40,15 @@ coroutines = [ "use": "description", "channels": ["#tildeverse"] } + }, + { + "worker": use(RSS), + "interval": 16, + "state": { + "alias": "cosmic", + "source": "https://cosmic.voyage/rss.xml", + "use": "title", + "channels": ["#cosmic"] + } } ] \ No newline at end of file