dont bother with titles if they are too long

This commit is contained in:
reality 2013-02-20 10:28:47 +00:00
parent e648068b1c
commit 57977ac182

View File

@ -14,7 +14,7 @@ var link = function(dbot) {
if(!error && response.statusCode == 200) {
body = body.replace(/(\r\n|\n\r|\n)/gm, " ");
var title = body.valMatch(/<title>(.*)<\/title>/, 2);
if(title) {
if(title && title.length < 140) {
event.reply(title[1]);
}
}