forked from GitHub/dbot
Commenting additions and moved module list specification into the config file.
This commit is contained in:
parent
5ef21027ea
commit
e79854638a
@ -1,5 +1,6 @@
|
|||||||
var express = require('express');
|
var express = require('express');
|
||||||
|
|
||||||
|
// Web interface module using the express framework
|
||||||
var webInterface = function(dbot) {
|
var webInterface = function(dbot) {
|
||||||
var dbot = dbot;
|
var dbot = dbot;
|
||||||
|
|
||||||
|
6
run.js
6
run.js
@ -3,9 +3,7 @@ var timers = require('./timer');
|
|||||||
var jsbot = require('./jsbot');
|
var jsbot = require('./jsbot');
|
||||||
require('./snippets');
|
require('./snippets');
|
||||||
|
|
||||||
var modules = [ 'js', 'admin', 'karma', 'kick', 'modehate', 'quotes', 'puns', 'spelling', 'user', 'web', 'youare' ];
|
var DBot = function(timers) {
|
||||||
|
|
||||||
var DBot = function(dModules, timers) {
|
|
||||||
this.config = JSON.parse(fs.readFileSync('config.json', 'utf-8'));
|
this.config = JSON.parse(fs.readFileSync('config.json', 'utf-8'));
|
||||||
this.db = JSON.parse(fs.readFileSync('db.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.nickserv = this.config.nickserv || 'zippy';
|
||||||
this.server = this.config.server || 'elara.ivixor.net';
|
this.server = this.config.server || 'elara.ivixor.net';
|
||||||
this.port = this.config.port || 6667;
|
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.timers = timers.create();
|
||||||
this.waitingForKarma = false;
|
this.waitingForKarma = false;
|
||||||
@ -27,7 +26,6 @@ var DBot = function(dModules, timers) {
|
|||||||
}
|
}
|
||||||
}.bind(this), this.nickserv, this.password);
|
}.bind(this), this.nickserv, this.password);
|
||||||
|
|
||||||
this.moduleNames = dModules;
|
|
||||||
this.reloadModules();
|
this.reloadModules();
|
||||||
this.instance.connect();
|
this.instance.connect();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user