3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-30 16:09:27 +01:00

Attempt to fix Issue #54

This commit is contained in:
Sam Nicholls 2012-12-05 19:05:19 +00:00
parent 5e71be8601
commit 757344d580
4 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,7 @@
{
"name": "testressionbot",
"webUrl": "http://localhost",
"webPort": 80,
"servers": {
"freenode": {
"server": "irc.freenode.net",

View File

@ -40,7 +40,7 @@ var poll = function(dbot) {
}
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) {
var name = event.input[1];
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 {
event.reply(dbot.t('poll_unexistent', {'name': name}));
}

View File

@ -186,7 +186,7 @@ var quotes = function(dbot) {
'~link': function(event) {
var key = event.params[1].trim().toLowerCase();
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 {
event.reply(dbot.t('category_not_found'));
}

1
run.js
View File

@ -58,6 +58,7 @@ var DBot = function(timers) {
this.admin = this.config.admin || [ 'reality' ];
this.moduleNames = this.config.modules || [ 'ignore', 'admin', 'command', 'dice', 'js', 'kick', 'puns', 'quotes', 'spelling', 'youare' ];
this.language = this.config.language || 'english';
this.webUrl = this.config.webUrl || 'http://lolcathost';
this.webPort = this.config.webPort || 80;
// It's the user's responsibility to fill this data structure up properly in