kiwiirc / irc-framework

🛠️ A better IRC framework for node.js. For bots and full clients.
MIT License
180 stars 62 forks source link

TLS Connect #378

Closed SheiylaDev closed 2 months ago

SheiylaDev commented 2 months ago

Hi, I would like to know how to connect the bot on the tls port of my unrealircd server?

Thanks

ItsOnlyBinary commented 2 months ago

This really could do with being in the documentation somewhere :(

bot.connect({
    host: 'irc.freenode.net',
    port: 6697,
    tls: true,
    nick: 'prawnsbot'
});
SheiylaDev commented 2 months ago

I have tested but the bot does not connect and I have no message.

SheiylaDev commented 2 months ago

can you give me an example of a bot to see if I did well on my side?

ItsOnlyBinary commented 2 months ago

https://gist.github.com/ItsOnlyBinary/a171695cd33685eedfaab64a00bcc3cb

maybe also want to listen for 'close' or 'socket close' events or maybe 'error' events

https://github.com/kiwiirc/irc-framework/blob/master/docs/events.md

SheiylaDev commented 2 months ago

I tested with an empty project and your bot and in normal it launched but not in tls.

brunnre8 commented 2 months ago

can you like hop into the #kiwiirc on libera.chat ? The issue tracker isn't really the right format for this conversation.

Would cut down the roundtrip times considerably

SheiylaDev commented 2 months ago

1715721266015 [S] ERROR :NON-TLS command received on TLS-only port. Check your connection settings.

SheiylaDev commented 2 months ago

rejectUnauthorized: false, tls: true,

Done :)