forked from GitHub/dbot
web config data now taken from dbot web config
This commit is contained in:
parent
918a3c4540
commit
96312303f0
@ -1,7 +1,5 @@
|
||||
{
|
||||
"name": "testressionbot",
|
||||
"webHost": "lolcathost",
|
||||
"webPort": 80,
|
||||
"servers": {
|
||||
"freenode": {
|
||||
"server": "irc.freenode.net",
|
||||
|
@ -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}));
|
||||
}
|
||||
|
@ -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}));
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ var webInterface = function(dbot) {
|
||||
}
|
||||
});
|
||||
|
||||
app.listen(dbot.webPort);
|
||||
app.listen(dbot.config.web.webPort);
|
||||
|
||||
return {
|
||||
'name': 'web',
|
||||
|
Loading…
Reference in New Issue
Block a user