diff --git a/modules/radio/config.json b/modules/radio/config.json index 3cb4868..2eeff65 100644 --- a/modules/radio/config.json +++ b/modules/radio/config.json @@ -1,5 +1,5 @@ { - "stream": "", - "announce": [ { "server": "aberwiki", "name": "#dbot" } ], + "stream": "http://tripsit.fm:8000", + "announce": [ { "server": "tripsit", "name": "#tripbot" } ], "outputPrefix": "\u00033radio\u000f" } diff --git a/modules/radio/radio.js b/modules/radio/radio.js index e628815..b302be0 100644 --- a/modules/radio/radio.js +++ b/modules/radio/radio.js @@ -51,11 +51,18 @@ var radio = function(dbot) { '~request': function(event){ var dj = this.data['icy-description'], song = event.input[1]; - dbot.say(event.server, dj, dbot.t('radio_request',{ - 'user': event.user, - 'song': song - })); - event.reply('Song requested!'); + + dbot.api.users.resolveUser(event.server, dj, function(user) { + if(user) { + dbot.say(event.server, user.currentNick, dbot.t('radio_request',{ + 'user': event.user, + 'song': song + })); + event.reply('Song request sent to DJ ' + user.currentNick + '!'); + } else { + event.reply('Couldn\'t find DJ ' + dj + ' on IRC :('); + } + }); } }; this.commands['~request'].regex = [/^request ([\d\w\s-]*)/, 2];