3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 19:52:36 +01:00

i am tired

This commit is contained in:
Luke Slater 2012-04-14 06:21:38 +01:00
parent 1924d28952
commit e1833017b0

View File

@ -10,16 +10,16 @@ var autoshorten = function(dbot) {
if(urlMatches !== null) {
var url = urlMatches[0]; // Only doing one, screw you.
var options = {
'host': 'nc.no.de',
'port': 80,
'path': '/mkurl?url=' + escape(url)
};
var site = http.createClient(80, 'nc.no.de');
var request = site.request("GET", 'mkurl', { 'host' : 'nc.no.de/',
'url': url});
request.end();
request.on('response', function(response) {
http.get(options, function(response) {
dbot.say(data.channel, 'Shortened link from ' + data.user + ': ' + response.surl);
});
}
},