Ignore localhost links
This commit is contained in:
parent
544c281bf6
commit
29b66ff0ec
|
@ -16,6 +16,9 @@ module.exports = function(irc, network) {
|
||||||
var links = [];
|
var links = [];
|
||||||
var split = data.message.split(" ");
|
var split = data.message.split(" ");
|
||||||
_.each(split, function(w) {
|
_.each(split, function(w) {
|
||||||
|
if (w.match(/^(http|https):\/\/localhost/g)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
var match = w.indexOf("http://") === 0 || w.indexOf("https://") === 0;
|
var match = w.indexOf("http://") === 0 || w.indexOf("https://") === 0;
|
||||||
if (match) {
|
if (match) {
|
||||||
links.push(w);
|
links.push(w);
|
||||||
|
|
Loading…
Reference in New Issue