From: Darren Date: Sat, 16 Jul 2011 22:38:41 +0000 (+0100) Subject: Merge git://github.com/M2Ys4U/KiwiIRC into dev X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b9c9cceba029186dd59183a9ff9163c2d5726b0e;p=KiwiIRC.git Merge git://github.com/M2Ys4U/KiwiIRC into dev Conflicts: index.php --- b9c9cceba029186dd59183a9ff9163c2d5726b0e diff --cc index.php index b7e340b,857983c..e96e89d --- a/index.php +++ b/index.php @@@ -54,8 -55,6 +54,7 @@@ + - diff --cc node/config.json index 0000000,a1ac706..580c19e mode 000000,100644..100644 --- a/node/config.json +++ b/node/config.json @@@ -1,0 -1,8 +1,8 @@@ + { + "port": 7777, - "listen_ssl": true, ++ "listen_ssl": false, + "ssl_key": "server.key", + "ssl_cert": "cert.pem", + "quit_message": "KiwiIRC", + "cap_options": [] + } diff --cc node/kiwi.js index f46eed5,3ba24d0..7d6263b --- a/node/kiwi.js +++ b/node/kiwi.js @@@ -7,6 -8,8 +8,8 @@@ var tls = require('tls') _ = require('./lib/underscore.min.js'), starttls = require('./lib/starttls.js'); -var config = JSON.parse(fs.readFileSync('config.json', 'ascii')); ++var config = JSON.parse(fs.readFileSync(__dirname+'/config.json', 'ascii')); + var ircNumerics = { RPL_WELCOME: '001', RPL_ISUPPORT: '005', @@@ -256,7 -271,11 +271,11 @@@ var ircSocketDataHandler = function (da }; //setup websocket listener - var io = ws.listen(7777, {secure: true}); + if (config.listen_ssl) { - var io = ws.listen(config.port, {secure: true, key: fs.readFileSync(config.ssl_key), cert: fs.readFileSync(config.ssl_cert)}); ++ var io = ws.listen(config.port, {secure: true, key: fs.readFileSync(__dirname+'/'+config.ssl_key), cert: fs.readFileSync(__dirname+'/'+config.ssl_cert)}); + } else { + var io = ws.listen(config.port, {secure: false}); + } io.sockets.on('connection', function (websocket) { websocket.on('irc connect', function (nick, host, port, ssl, callback) { var ircSocket;