3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 14:29:29 +01:00

Commenting additions and moved module list specification into the config file.

This commit is contained in:
Luke Slater 2012-02-11 16:02:16 +00:00
parent 5ef21027ea
commit e79854638a
2 changed files with 3 additions and 4 deletions

View File

@ -1,5 +1,6 @@
var express = require('express');
// Web interface module using the express framework
var webInterface = function(dbot) {
var dbot = dbot;

6
run.js
View File

@ -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();
};