summaryrefslogtreecommitdiffstats
path: root/news/newsbot.js
diff options
context:
space:
mode:
Diffstat (limited to 'news/newsbot.js')
-rw-r--r--news/newsbot.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/news/newsbot.js b/news/newsbot.js
index a422d867..80bb95b1 100644
--- a/news/newsbot.js
+++ b/news/newsbot.js
@@ -12,6 +12,7 @@ var master_nick = 'knews'
var news_channel = '#news'
var feeds_file = 'new_feeds'
var feedbot_loop_delay = 60 * 1000 // [ms]
+var feedbot_create_delay = 200 // [ms]
var url_shortener_host = 'go'
var slaves = {}
@@ -51,7 +52,7 @@ function main () {
.filter(function (line) {
return line.length > 0
})
- .forEach(function (line) {
+ .forEach(function (line, i) {
var parts = line.split('|')
if (parts.length !== 3) {
console.log('bad new_feeds line ' + lines + ': ' + line)
@@ -62,7 +63,9 @@ function main () {
var uri = parts[1]
var channels = parts[2].split(' ')
- return create_feedbot(nick, uri, channels)
+ setTimeout(function () {
+ return create_feedbot(nick, uri, channels)
+ }, i*feedbot_create_delay)
})
})
}