Reverting to pre-irc

This commit is contained in:
Stephen Vanderwarker 2021-08-10 20:38:45 -04:00
parent e2fbd57e41
commit f23678713a
1 changed files with 13 additions and 2 deletions

View File

@ -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("<!DOCTYPE html><html><head><title>Bot Online!</title><meta name='viewport' content='width=device-width, initial-scale=1.0'/></head><body><p>Bot Online!</p></body></html>"));
app.listen(app_port, () => console.log(`Listening on ${app_port}!`));
iclient.say(irc_sendto, '[ONLINE]');
});
xmpp.on('chat', function(from, message) {