Ignore localhost links

This commit is contained in:
Mattias Erming 2015-04-06 10:40:12 -07:00
parent 544c281bf6
commit 29b66ff0ec
1 changed files with 3 additions and 0 deletions

View File

@ -16,6 +16,9 @@ module.exports = function(irc, network) {
var links = [];
var split = data.message.split(" ");
_.each(split, function(w) {
if (w.match(/^(http|https):\/\/localhost/g)) {
return;
}
var match = w.indexOf("http://") === 0 || w.indexOf("https://") === 0;
if (match) {
links.push(w);