Merge branch 'backbone_ui' of https://github.com/M2Ys4U/KiwiIRC into backbone_ui
[KiwiIRC.git] / server / irc / connection.js
index cb4b4f2dd9e17153a0839cd2ab530698877685f3..3d7c7ca35d82414fdf16870ce6305b50c29c685d 100644 (file)
@@ -10,7 +10,7 @@ var IrcConnection = function (hostname, port, ssl, nick, user, pass) {
     events.EventEmitter.call(this);
     
     if (ssl) {
-        this.socket = tls.connect(port, hostname, {}, connect_handler);
+        this.socket = tls.connect({host: hostname, port: port, rejectUnauthorized: global.config.reject_unauthorised_certificates}, connect_handler);
     } else {
         this.socket = net.createConnection(port, hostname);
         this.socket.on('connect', function () {