forked from GitHub/dbot
Attempt to fix Issue #54
This commit is contained in:
parent
5e71be8601
commit
757344d580
@ -1,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "testressionbot",
|
"name": "testressionbot",
|
||||||
|
"webUrl": "http://localhost",
|
||||||
|
"webPort": 80,
|
||||||
"servers": {
|
"servers": {
|
||||||
"freenode": {
|
"freenode": {
|
||||||
"server": "irc.freenode.net",
|
"server": "irc.freenode.net",
|
||||||
|
@ -40,7 +40,7 @@ var poll = function(dbot) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
event.reply(dbot.t('poll_created', {'name': name, 'description': description}) +
|
event.reply(dbot.t('poll_created', {'name': name, 'description': description}) +
|
||||||
' - http://nourishedcloud.com:8080/polls/' + name);
|
' - ' + dbot.webUrl + ':' + dbot.webPort + '/polls/' + name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -140,7 +140,7 @@ var poll = function(dbot) {
|
|||||||
'~pdesc': function(event) {
|
'~pdesc': function(event) {
|
||||||
var name = event.input[1];
|
var name = event.input[1];
|
||||||
if(polls.hasOwnProperty(name)) {
|
if(polls.hasOwnProperty(name)) {
|
||||||
event.reply(name + ': ' + polls[name].description + ' - http://nourishedcloud.com:8080/polls/' + name);
|
event.reply(name + ': ' + polls[name].description + ' - ' + dbot.webUrl + ':' + dbot.webPort + '/polls/' + name);
|
||||||
} else {
|
} else {
|
||||||
event.reply(dbot.t('poll_unexistent', {'name': name}));
|
event.reply(dbot.t('poll_unexistent', {'name': name}));
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ var quotes = function(dbot) {
|
|||||||
'~link': function(event) {
|
'~link': function(event) {
|
||||||
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}) + ' - http://nc.no.de:443/quotes/' + key);
|
event.reply(dbot.t('quote_link', {'category': key}) + ' - ' dbot.webUrl + ':' dbot.webPort + '/quotes/' + key);
|
||||||
} else {
|
} else {
|
||||||
event.reply(dbot.t('category_not_found'));
|
event.reply(dbot.t('category_not_found'));
|
||||||
}
|
}
|
||||||
|
1
run.js
1
run.js
@ -58,6 +58,7 @@ var DBot = function(timers) {
|
|||||||
this.admin = this.config.admin || [ 'reality' ];
|
this.admin = this.config.admin || [ 'reality' ];
|
||||||
this.moduleNames = this.config.modules || [ 'ignore', 'admin', 'command', 'dice', 'js', 'kick', 'puns', 'quotes', 'spelling', 'youare' ];
|
this.moduleNames = this.config.modules || [ 'ignore', 'admin', 'command', 'dice', 'js', 'kick', 'puns', 'quotes', 'spelling', 'youare' ];
|
||||||
this.language = this.config.language || 'english';
|
this.language = this.config.language || 'english';
|
||||||
|
this.webUrl = this.config.webUrl || 'http://lolcathost';
|
||||||
this.webPort = this.config.webPort || 80;
|
this.webPort = this.config.webPort || 80;
|
||||||
|
|
||||||
// It's the user's responsibility to fill this data structure up properly in
|
// It's the user's responsibility to fill this data structure up properly in
|
||||||
|
Loading…
Reference in New Issue
Block a user