From 7fd54a2dda4099910afeb80b5445b533a314fe32 Mon Sep 17 00:00:00 2001 From: Jack Allnutt Date: Fri, 25 Nov 2011 03:11:55 +0000 Subject: [PATCH] Fix for outdate rehash code. Config change: flip secure semantics. Rehash code now looks for changes to the 'server' param rather than ports/ssl certs etc to reflect OLD changes in the configuration file format. The configuration file now uses the term "insecure" rather than "secure" to encourage people running KiwiIRC to run secure a secure service. --- server/app.js | 7 ++----- server/config.json | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/server/app.js b/server/app.js index 485879c..36d2213 100644 --- a/server/app.js +++ b/server/app.js @@ -753,7 +753,7 @@ this.websocketListen = function (servers, handler) { _.each(servers, function (server) { var hs, opts; - if (server.secure === true) { + if (server.insecure !== true) { // Start some SSL server up opts = { key: fs.readFileSync(__dirname + '/' + server.ssl_key), @@ -1137,10 +1137,7 @@ this.rehash = function () { kiwi.log('%s config changes: \n', Object.keys(changes).length, changes); for (i in changes) { switch (i) { - case 'ports': - case 'bind_address': - case 'ssl_key': - case 'ssl_cert': + case 'servers': kiwi.websocketListen(kiwi.config.servers, kiwi.httpHandler); delete changes.ports; delete changes.bind_address; diff --git a/server/config.json b/server/config.json index 75a38be..c069c7f 100644 --- a/server/config.json +++ b/server/config.json @@ -1,7 +1,7 @@ { "servers": [ { - "secure": true, + "insecure": false, "port": 7777, "address": "0.0.0.0", @@ -9,7 +9,7 @@ "ssl_cert": "cert.pem" }, { - "secure": false, + "insecure": true, "port": 7778, "address": "0.0.0.0" } -- 2.25.1