reality/jsbot — pull request #9 by JohnMaguire2013 (2013-03-18 22:05:04+00:00)
Title: adding TLS (SSL) support to jsbot

It is worth noting this defaults rejectUnauthorized to false, allowing technically invalid TLS certificates to connect anyway. this is insecure.

Quoting node.js documentation:
`rejectUnauthorized`: If `true`, the server certificate is verified against the list of supplied CAs. An 'error' event is emitted if verification fails. Default: `true`.

This patch effectively bypasses this and sets the default to `false`, due to many IRC networks having broken SSL implementations (unpopular CAs, self-signed certificates, expired certificates.) To change back to true, you can use the tlsOptions parameter that has been added to the end of the JSBot.prototype.addConnection argument list.