3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-28 05:32:50 +01:00
This commit is contained in:
reality 2014-09-18 03:33:40 +00:00
parent 6b52141245
commit 9733fa6185

View File

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