Skip to content

Instantly share code, notes, and snippets.

@invisiblek
Created October 4, 2016 00:51
Show Gist options
  • Save invisiblek/537922cc1bfd41a5375c0ee62f6a4730 to your computer and use it in GitHub Desktop.
Save invisiblek/537922cc1bfd41a5375c0ee62f6a4730 to your computer and use it in GitHub Desktop.
diff --git a/lib/bot.js b/lib/bot.js
index d6c3555..98ebdee 100644
--- a/lib/bot.js
+++ b/lib/bot.js
@@ -139,6 +139,7 @@ class Bot {
if (ircChannel) {
const username = author.username;
let text = this.parseText(message);
+ if (!(author.username == "|sgs3bot|" && (text.startsWith("http://bit.ly") || text.startsWith("http://jmp.to") || text.startsWith("http://bitly.com") || text.startsWith("http://amzn.to"))) {
let displayUsername = username;
if (this.ircNickColor) {
const colorIndex = (username.charCodeAt(0) + username.length) % NICK_COLORS.length;
@@ -164,6 +165,7 @@ class Bot {
});
}
}
+ }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment