diff --git a/modules/web.js b/modules/web.js index 7628272..2f7c1f0 100644 --- a/modules/web.js +++ b/modules/web.js @@ -1,5 +1,6 @@ var express = require('express'); +// Web interface module using the express framework var webInterface = function(dbot) { var dbot = dbot; diff --git a/run.js b/run.js index 7a523aa..95b201e 100644 --- a/run.js +++ b/run.js @@ -3,9 +3,7 @@ var timers = require('./timer'); var jsbot = require('./jsbot'); require('./snippets'); -var modules = [ 'js', 'admin', 'karma', 'kick', 'modehate', 'quotes', 'puns', 'spelling', 'user', 'web', 'youare' ]; - -var DBot = function(dModules, timers) { +var DBot = function(timers) { this.config = JSON.parse(fs.readFileSync('config.json', 'utf-8')); this.db = JSON.parse(fs.readFileSync('db.json', 'utf-8')); @@ -15,6 +13,7 @@ var DBot = function(dModules, timers) { this.nickserv = this.config.nickserv || 'zippy'; this.server = this.config.server || 'elara.ivixor.net'; this.port = this.config.port || 6667; + this.moduleNames = this.config.modules || [ 'js', 'admin', 'karma', 'kick', 'modehate', 'quotes', 'puns', 'spelling', 'user', 'web', 'youare' ]; this.timers = timers.create(); this.waitingForKarma = false; @@ -27,7 +26,6 @@ var DBot = function(dModules, timers) { } }.bind(this), this.nickserv, this.password); - this.moduleNames = dModules; this.reloadModules(); this.instance.connect(); };