Merge git://github.com/M2Ys4U/KiwiIRC into dev
authorDarren <darren@darrenwhitlen.com>
Sat, 16 Jul 2011 22:38:41 +0000 (23:38 +0100)
committerDarren <darren@darrenwhitlen.com>
Sat, 16 Jul 2011 22:38:41 +0000 (23:38 +0100)
Conflicts:
index.php

1  2 
index.php
js/gateway.js
node/config.json
node/kiwi.js

diff --cc index.php
index b7e340b7e171cdc467172e98722627f482da96df,857983c30c201d003d8c859538456c74dee919f3..e96e89d7d023be8711ccaaef9fcf62d28ece9c26
+++ b/index.php
@@@ -54,8 -55,6 +54,7 @@@
  <script type="text/javascript" src="js/util.js"></script>\r
  <script type="text/javascript" src="js/gateway.js"></script>\r
  <script type="text/javascript" src="js/front.js"></script>\r
- <script type="text/javascript" src="assets.php?js=jquery.json-2.2.min,util,gateway,front,iscroll"></script>\r
 +<script type="text/javascript" src="js/iscroll.js"></script>\r
  \r
  <?php if(in_array($agent, array("android", "ipad", "iphone", "ipad"))){ ?>\r
  <script type="text/javascript" src="js/touchscreen_tweaks.js"></script>\r
diff --cc js/gateway.js
Simple merge
index 0000000000000000000000000000000000000000,a1ac70618c398a9a66602d6c484cd46052f769cf..580c19ef873188faf3c4766b9620d863671571d4
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,8 +1,8 @@@
 -    "listen_ssl":     true,
+ {
+     "port":           7777,
++    "listen_ssl":     false,
+     "ssl_key":        "server.key",
+     "ssl_cert":       "cert.pem",
+     "quit_message":   "KiwiIRC",
+     "cap_options":    []
+ }
diff --cc node/kiwi.js
index f46eed5376c2f5ca45084c19e0b444c01e186ae5,3ba24d0aadfba6a74d95d6e7f22abcff68072302..7d6263b2fa4fa13f95535bde93f44bca7116ca39
@@@ -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;