From 29b66ff0ec6bdd67c7c3168c383efe00bf94f75f Mon Sep 17 00:00:00 2001 From: Mattias Erming Date: Mon, 6 Apr 2015 10:40:12 -0700 Subject: [PATCH] Ignore localhost links --- src/plugins/irc-events/link.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/irc-events/link.js b/src/plugins/irc-events/link.js index 0481f444..6d350ad2 100644 --- a/src/plugins/irc-events/link.js +++ b/src/plugins/irc-events/link.js @@ -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);