Fixed bug in word score detection, added cosmic voyage to RSS feed
This commit is contained in:
parent
7d44bfad19
commit
675a8099b5
|
@ -22,8 +22,6 @@ class Responses:
|
||||||
|
|
||||||
if name in users and "blacklist" in users[name]:
|
if name in users and "blacklist" in users[name]:
|
||||||
reason = users[name]["blacklist"]["reason"]
|
reason = users[name]["blacklist"]["reason"]
|
||||||
message = "is ignoring {} for reason '{}'".format(name, reason)
|
|
||||||
self.bot.send_action(source, message)
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
last_response = 0
|
last_response = 0
|
||||||
|
@ -35,10 +33,13 @@ class Responses:
|
||||||
wait = 1
|
wait = 1
|
||||||
|
|
||||||
if name != author and last_response > 0 and now - last_response < wait:
|
if name != author and last_response > 0 and now - last_response < wait:
|
||||||
|
reason = "Auto-banished"
|
||||||
self.bot.memories["users"][name]["blacklist"] = {
|
self.bot.memories["users"][name]["blacklist"] = {
|
||||||
"reason": "Auto-banished",
|
"reason": reason,
|
||||||
"when": now
|
"when": now
|
||||||
}
|
}
|
||||||
|
message = "is ignoring {} for reason '{}'".format(name, reason)
|
||||||
|
self.bot.send_action(source, message)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -40,5 +40,15 @@ coroutines = [
|
||||||
"use": "description",
|
"use": "description",
|
||||||
"channels": ["#tildeverse"]
|
"channels": ["#tildeverse"]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"worker": use(RSS),
|
||||||
|
"interval": 16,
|
||||||
|
"state": {
|
||||||
|
"alias": "cosmic",
|
||||||
|
"source": "https://cosmic.voyage/rss.xml",
|
||||||
|
"use": "title",
|
||||||
|
"channels": ["#cosmic"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
Loading…
Reference in New Issue