flashy module uses new url constructor api

This commit is contained in:
reality 2013-04-13 21:08:23 +00:00
parent cd3b468ada
commit c1f642084d

View File

@ -28,11 +28,8 @@ var flashy = function(dbot) {
var text = event.input[2].trim().toUpperCase();
if(_.has(this.colourMap, colour)) {
event.reply(dbot.t('url', {
'host': dbot.config.web.webHost,
'port': dbot.config.web.webPort,
'path': 'flashy/' + colour + '/' + encodeURIComponent(text)
}));
event.reply(dbot.api.web.getUrl('flashy/' + colour + '/' +
encodeURIComponent(text)));
} else {
var possibleColours = _.keys(this.colourMap).join(', ') + '.';
event.reply('No such colour, brah. Available colours are: ' + possibleColours);