Correctly reading restrict_server_ssl from config
authorDarren <darren@darrenwhitlen.com>
Thu, 22 Aug 2013 19:48:15 +0000 (20:48 +0100)
committerDarren <darren@darrenwhitlen.com>
Thu, 22 Aug 2013 19:48:15 +0000 (20:48 +0100)
server/client.js

index 3caef07bc95ce42bc695cd56661fb5588992d571..0ae4f50dcab978c1a6479d5e4450c468be1b3ff1 100755 (executable)
@@ -118,7 +118,9 @@ function kiwiCommand(command, callback) {
                 this.state.connect(
                     (global.config.restrict_server || command.hostname),
                     (global.config.restrict_server_port || command.port),
-                    (global.config.restrict_server_ssl || command.ssl),
+                    (typeof global.config.restrict_server_ssl !== 'undefined' ?
+                        global.config.restrict_server_ssl :
+                        command.ssl),
                     command.nick,
                     {hostname: this.websocket.handshake.revdns, address: this.websocket.handshake.real_address},
                     (global.config.restrict_server_password || command.password),