web config data now taken from dbot web config

This commit is contained in:
Luke Slater 2012-12-12 18:36:12 +00:00
parent 918a3c4540
commit 96312303f0
4 changed files with 7 additions and 7 deletions

View File

@ -1,7 +1,5 @@
{
"name": "testressionbot",
"webHost": "lolcathost",
"webPort": 80,
"servers": {
"freenode": {
"server": "irc.freenode.net",

View File

@ -40,7 +40,8 @@ var poll = function(dbot) {
}
event.reply(dbot.t('poll_created', {'name': name, 'description': description,
'url': dbot.t('url', {'host': dbot.webHost, 'port': dbot.webPort, 'path': 'polls/' + name})}));
'url': dbot.t('url', {'host': dbot.config.web.webHost,
'port': dbot.config.web.webPort, 'path': 'polls/' + name})}));
}
}
},
@ -141,7 +142,8 @@ var poll = function(dbot) {
var name = event.input[1];
if(polls.hasOwnProperty(name)) {
event.reply(dbot.t('poll_describe', {'name': name, 'description': polls[name].description,
'url': dbot.t('url', {'host': dbot.webHost, 'port': dbot.webPort, 'path': 'polls/' + name})}));
'url': dbot.t('url', {'host': dbot.config.web.webHost, 'port':
dbot.config.web.webPort, 'path': 'polls/' + name})}));
} else {
event.reply(dbot.t('poll_unexistent', {'name': name}));
}

View File

@ -189,8 +189,8 @@ var quotes = function(dbot) {
var key = event.params[1].trim().toLowerCase();
if(quotes.hasOwnProperty(key)) {
event.reply(dbot.t('quote_link', {'category': key,
'url': dbot.t('url', {'host': dbot.webHost,
'port': dbot.webPort, 'path': 'quotes/' + key})}));
'url': dbot.t('url', {'host': dbot.config.web.webHost,
'port': dbot.config.web.webPort, 'path': 'quotes/' + key})}));
} else {
event.reply(dbot.t('category_not_found', {'category': key}));
}

View File

@ -113,7 +113,7 @@ var webInterface = function(dbot) {
}
});
app.listen(dbot.webPort);
app.listen(dbot.config.web.webPort);
return {
'name': 'web',