mirror of
https://github.com/reality/dbot.git
synced 2024-12-25 04:02:39 +01:00
web config data now taken from dbot web config
This commit is contained in:
parent
918a3c4540
commit
96312303f0
@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "testressionbot",
|
"name": "testressionbot",
|
||||||
"webHost": "lolcathost",
|
|
||||||
"webPort": 80,
|
|
||||||
"servers": {
|
"servers": {
|
||||||
"freenode": {
|
"freenode": {
|
||||||
"server": "irc.freenode.net",
|
"server": "irc.freenode.net",
|
||||||
|
@ -40,7 +40,8 @@ var poll = function(dbot) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
event.reply(dbot.t('poll_created', {'name': name, 'description': description,
|
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];
|
var name = event.input[1];
|
||||||
if(polls.hasOwnProperty(name)) {
|
if(polls.hasOwnProperty(name)) {
|
||||||
event.reply(dbot.t('poll_describe', {'name': name, 'description': polls[name].description,
|
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 {
|
} else {
|
||||||
event.reply(dbot.t('poll_unexistent', {'name': name}));
|
event.reply(dbot.t('poll_unexistent', {'name': name}));
|
||||||
}
|
}
|
||||||
|
@ -189,8 +189,8 @@ var quotes = function(dbot) {
|
|||||||
var key = event.params[1].trim().toLowerCase();
|
var key = event.params[1].trim().toLowerCase();
|
||||||
if(quotes.hasOwnProperty(key)) {
|
if(quotes.hasOwnProperty(key)) {
|
||||||
event.reply(dbot.t('quote_link', {'category': key,
|
event.reply(dbot.t('quote_link', {'category': key,
|
||||||
'url': dbot.t('url', {'host': dbot.webHost,
|
'url': dbot.t('url', {'host': dbot.config.web.webHost,
|
||||||
'port': dbot.webPort, 'path': 'quotes/' + key})}));
|
'port': dbot.config.web.webPort, 'path': 'quotes/' + key})}));
|
||||||
} else {
|
} else {
|
||||||
event.reply(dbot.t('category_not_found', {'category': key}));
|
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 {
|
return {
|
||||||
'name': 'web',
|
'name': 'web',
|
||||||
|
Loading…
Reference in New Issue
Block a user