git://git.furryclan.net
/
furrycat
/
catbot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
406bc82
)
ASAP announcements might not play.
author
CMDR furrycat
<elite@furrycat.net>
Fri, 4 Nov 2016 22:35:45 +0000
(22:35 +0000)
committer
CMDR furrycat
<elite@furrycat.net>
Fri, 4 Nov 2016 22:35:45 +0000
(22:35 +0000)
plugin/announcements/announcements.py
patch
|
blob
|
history
diff --git
a/plugin/announcements/announcements.py
b/plugin/announcements/announcements.py
index
648936c
..
70d4490
100644
(file)
--- a/
plugin/announcements/announcements.py
+++ b/
plugin/announcements/announcements.py
@@
-859,7
+859,10
@@
class Announcements(DBConnection):
else:
log.info('Dryrun: Not posting announcement {} to {}: {}'.format(announcement['id'], channel, logtext))
else:
- announce = random.random() <= announcement['probability'] if not already_posted else 0
+ announce = False
+ if not already_posted:
+ if random.random() <= announcement['probability']:
+ announce = True
if announce:
if voice_only:
yield from bot.wake_up()