3
0
mirror of https://github.com/reality/dbot.git synced 2025-02-17 14:01:04 +01:00
dbot/modules/project/project.js

51 lines
1.5 KiB
JavaScript
Raw Normal View History

2013-04-18 11:06:13 +00:00
/**
* Module Name: Project
* Description: Web page which shows git status and other various stats about
* the dbot.
2013-04-18 11:06:13 +00:00
*/
2013-04-20 17:42:34 +00:00
_ = require('underscore'),
exec = require('child_process').exec;
2013-04-18 11:06:13 +00:00
var project = function(dbot) {
2013-04-20 17:42:34 +00:00
this.onLoad = function() {
var configList = function(){
var list = [];
if(_.has(dbot.modules,'dent')){
configList.push(dbot.t("dent-account", {
"username": dbot.config.dent.username
}));
}
if(dbot.config.dent.dentQuotes) {
configList.push(dbot.t("dent-push"));
}
if(_.has(dbot.modules,'link')){
if(dbot.config.link.autoTitle){
configList.push(dbot.t("link-autotitle"));
}
}
if(_.has(dbot.modules,'quotes')){
configList.push(dbot.t("quote-rmlimit", {
"limit": dbot.config.quotes.rmLimit
}));
}
if(_.has(dbot.modules,'report')){
if(dbot.config.report.notifyVoice){
configList.push(dbot.t("report-notifyvoice"));
}
}
if(_.has(dbot.modules,'web')){
configList.push(dbot.t("web-port", {
"port": dbot.config.web.webPort
}));
}
return list;
}.bind(this);
}.bind(this);
}
exports.fetch = function(dbot){
2013-04-18 11:06:13 +00:00
return new project(dbot);
}