diff --git a/config.json.sample b/config.json.sample index 8603c24..b1454ce 100644 --- a/config.json.sample +++ b/config.json.sample @@ -1,5 +1,7 @@ { "name": "testressionbot", + "webUrl": "http://localhost", + "webPort": 80, "servers": { "freenode": { "server": "irc.freenode.net", diff --git a/modules/poll.js b/modules/poll.js index 5b016d1..8016d01 100644 --- a/modules/poll.js +++ b/modules/poll.js @@ -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})); } diff --git a/modules/quotes.js b/modules/quotes.js index 12465d1..371241b 100644 --- a/modules/quotes.js +++ b/modules/quotes.js @@ -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')); } diff --git a/run.js b/run.js index 4797e6d..72858ad 100644 --- a/run.js +++ b/run.js @@ -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