diff --git a/index.js b/index.js index 8c5a00d..4c7e958 100644 --- a/index.js +++ b/index.js @@ -67,6 +67,18 @@ var M = new mastodon({ }); var iclient = new irc.Client(irc_server, irc_nick, { channels: [irc_channel], + userName: 'vxmppb', + realName: 'nodeJS IRC vXMPPb', + debug: 'true', + secure: 'true', + port: '6697', + selfSigned: true, + certExpired: true, + webirc: { + pass: '', + ip: '', + host: '' + }, }); // Once we're online, we'll send a message alerting admins @@ -74,11 +86,10 @@ xmpp.on('online', function(data, to) { console.log('Connected with JID: ' + data.jid.user); xmpp.send(user_jid, "[ONLINE]", false); client.publish(mqtt_topic, mqtt_message); - iclient.join(irc_channel); - iclient.say(irc_channel, '[ONLINE]'); M.post('statuses', { status: `${mastodon_toot}` }); app.get('/', (req, res) => res.send("Bot Online!

Bot Online!

")); app.listen(app_port, () => console.log(`Listening on ${app_port}!`)); + iclient.say(irc_sendto, '[ONLINE]'); }); xmpp.on('chat', function(from, message) {