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", "name": "testressionbot",
"webUrl": "http://localhost",
"webPort": 80,
"servers": { "servers": {
"freenode": { "freenode": {
"server": "irc.freenode.net", "server": "irc.freenode.net",

View File

@ -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}));
} }

View File

@ -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
View File

@ -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