net = require('net'),
http = require('http'),
https = require('https'),
+ node_static = require('node-static'),
fs = require('fs'),
url = require('url'),
dns = require('dns'),
app = null;
app = require(__dirname + '/app.js');
- var objs = {tls:tls, net:net, http:http, https:https, fs:fs, url:url, dns:dns, crypto:crypto, events:events, util:util, ws:ws, jsp:jsp, pro:pro, _:_, starttls:starttls};
+ var objs = {tls:tls, net:net, http:http, https:https, node_static:node_static, fs:fs, url:url, dns:dns, crypto:crypto, events:events, util:util, ws:ws, jsp:jsp, pro:pro, _:_, starttls:starttls};
app.init(objs);
+ app.rebindIRCCommands();
return true;
}
*/
if (this.config.handle_http) {
this.fileServer = new (require('node-static').Server)(__dirname + this.config.public_http);
- this.jade = require('jade');
this.cache = {alljs: '', html: []};
}
this.httpServers = [];
this.websocketMessage = function (msg, callback) {
return app.websocketMessage(this, msg, callback);
}
+this.websocketKiwiMessage = function (msg, callback) {
+ return app.websocketKiwiMessage(this, msg, callback);
+}
this.websocketIRCConnect = function (nick, host, port, ssl, callback) {
return app.websocketIRCConnect(this, nick, host, port, ssl, callback);
}
return app.IRCConnection.call(this, websocket, nick, host, port, ssl, password, callback);
}
util.inherits(this.IRCConnection, events.EventEmitter);
+
this.bindIRCCommands = function (irc_connection, websocket) {
return app.bindIRCCommands.call(this, irc_connection, websocket);
}
-
+this.rebindIRCCommands = function () {
+ return app.rebindIRCCommands.call(this);
+}
// Make sure Kiwi doesn't simply quit on an exception
-/*process.on('uncaughtException', function (e) {
+process.on('uncaughtException', function (e) {
console.log('[Uncaught exception] ' + e);
-});*/
+});
// Start the server up
this.websocketListen(this.config.servers, this.httpHandler);