Yuvipanda has uploaded a new change for review.
https://gerrit.wikimedia.org/r/150059
Change subject: Randomly pick between multiple configurable messages
......................................................................
Randomly pick between multiple configurable messages
Change-Id: Ie90e352d9f64ba3a2c717006a5adf8b082006a80
---
M DefaultConfig.yaml
M jouncebot.py
2 files changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/bots/jouncebot
refs/changes/59/150059/1
diff --git a/DefaultConfig.yaml b/DefaultConfig.yaml
index fc68c8b..b854225 100644
--- a/DefaultConfig.yaml
+++ b/DefaultConfig.yaml
@@ -17,3 +17,7 @@
logging:
useSyslog: no
+
+messages:
+ - %sDear anthropoid, the time has come. Please deploy %s (%s).
+ - %sRespected human, time to deploy %s (%s). Please do the needful.
diff --git a/jouncebot.py b/jouncebot.py
index 0be499c..fa6af72 100755
--- a/jouncebot.py
+++ b/jouncebot.py
@@ -22,6 +22,7 @@
import sys
from datetime import datetime
import pytz
+import random
class JounceBot(irc.bot.SingleServerIRCBot):
@@ -135,7 +136,8 @@
nicks = "%s: " % (", ".join(event.owners))
else:
nicks = ""
- self.connection.privmsg(self.channel, "%sDear anthropoid, the
time has come. Please deploy %s (%s)." % (
+ message = random.choice(configloader.values['messages'])
+ self.connection.privmsg(self.channel, message % (
nicks,
event.window,
event.url
--
To view, visit https://gerrit.wikimedia.org/r/150059
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie90e352d9f64ba3a2c717006a5adf8b082006a80
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/bots/jouncebot
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits