From 3f2320f85e6bd19bf3b4f6bbd4f07b5ae1e731c8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 17 Mar 2014 02:10:39 +0100 Subject: newsbot.js: save really connected channels --- news/newsbot.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'news') diff --git a/news/newsbot.js b/news/newsbot.js index 55564f0f..28ab52ea 100644 --- a/news/newsbot.js +++ b/news/newsbot.js @@ -76,7 +76,6 @@ function create_feedbot (nick, uri, channels) { client: client, nick: nick, uri: uri, - channels: channels, } // say text in every joined channel @@ -247,7 +246,7 @@ methods.save = function (params, callback) { return [ slave.nick, slave.uri, - slave.channels.join(' '), + Object.keys(client.chans).join(' '), ].join('|') }).join('\n') + '\n' return FS.writeFile(feeds_file, feeds, function (error) { -- cgit v1.2.3 From adb33710bf3b9c3c1634d13125f39a7697294b1a Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 17 Mar 2014 02:36:38 +0100 Subject: newsbot.js: join after invite --- news/newsbot.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'news') diff --git a/news/newsbot.js b/news/newsbot.js index 28ab52ea..35e99c59 100644 --- a/news/newsbot.js +++ b/news/newsbot.js @@ -88,6 +88,10 @@ function create_feedbot (nick, uri, channels) { client.once('registered', loop_feedparser) client.once('registered', deaf_myself) + client.on('invite', function (channel, from, message) { + client.join(channel, null) + }) + client.on('error', function (error) { console.log('Error:', error) }) -- cgit v1.2.3 From 44c648c68cdb58662f9e2d7232d26e59f5ddf662 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 17 Mar 2014 02:37:09 +0100 Subject: newsbot.js: fix save --- news/newsbot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'news') diff --git a/news/newsbot.js b/news/newsbot.js index 35e99c59..f01f1c59 100644 --- a/news/newsbot.js +++ b/news/newsbot.js @@ -250,7 +250,7 @@ methods.save = function (params, callback) { return [ slave.nick, slave.uri, - Object.keys(client.chans).join(' '), + Object.keys(slave.client.chans).join(' '), ].join('|') }).join('\n') + '\n' return FS.writeFile(feeds_file, feeds, function (error) { -- cgit v1.2.3 From 43764e34447da5abf8da71c0e795ce07d20dc1c7 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 17 Mar 2014 02:41:57 +0100 Subject: newsbot.js: stay kicked --- news/newsbot.js | 1 + 1 file changed, 1 insertion(+) (limited to 'news') diff --git a/news/newsbot.js b/news/newsbot.js index f01f1c59..c1d36f9b 100644 --- a/news/newsbot.js +++ b/news/newsbot.js @@ -70,6 +70,7 @@ function main () { function create_feedbot (nick, uri, channels) { var client = new IRC.Client(irc_server, nick, { channels: channels, + autoRejoin: false, }) slaves[nick] = { -- cgit v1.2.3