From 9733fa6185fafa724651302d70915edc8bae1540 Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 18 Sep 2014 03:33:40 +0000 Subject: [PATCH] pls --- modules/radio/radio.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/radio/radio.js b/modules/radio/radio.js index 50428d7..d2239c0 100644 --- a/modules/radio/radio.js +++ b/modules/radio/radio.js @@ -21,13 +21,15 @@ var radio = function(dbot) { stream.on('response', function(res) { this.data = res.headers; - _.each(this.config.announce, function(a) { - dbot.say(a.server, a.name, dbot.t('now_online', { - 'name': res.headers['icy-name'], - 'desc': res.headers['icy-description'], - 'url': res.headers['icy-url'] - })); - }); + if(res.headers['icy-name']) { + _.each(this.config.announce, function(a) { + dbot.say(a.server, a.name, dbot.t('now_online', { + 'name': res.headers['icy-name'], + 'desc': res.headers['icy-description'], + 'url': res.headers['icy-url'] + })); + }); + } }.bind(this)); stream.on('metadata', function(metadata) {