From a04604614a88d98479fa0ceb253c5044aca8e0ed Mon Sep 17 00:00:00 2001 From: Innectic Date: Fri, 10 Feb 2017 22:33:14 -0800 Subject: [PATCH 1/2] Add filter for D.va --- cactusbot/handlers/spam.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cactusbot/handlers/spam.py b/cactusbot/handlers/spam.py index 84a997c..d661c76 100644 --- a/cactusbot/handlers/spam.py +++ b/cactusbot/handlers/spam.py @@ -85,4 +85,4 @@ def check_emoji(self, packet): def contains_urls(self, packet): """Check for URLs in the message.""" return not self.config["allow_urls"] and any( - chunk.type == "url" for chunk in packet) + chunk.type == "url" and not chunk.text.strip() == "d.va" for chunk in packet) From 7ee7e75d896450986fb2b1865343709afb21a14b Mon Sep 17 00:00:00 2001 From: Innectic Date: Fri, 10 Feb 2017 22:48:37 -0800 Subject: [PATCH 2/2] Fix build --- cactusbot/handlers/spam.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cactusbot/handlers/spam.py b/cactusbot/handlers/spam.py index d661c76..1940423 100644 --- a/cactusbot/handlers/spam.py +++ b/cactusbot/handlers/spam.py @@ -85,4 +85,5 @@ def check_emoji(self, packet): def contains_urls(self, packet): """Check for URLs in the message.""" return not self.config["allow_urls"] and any( - chunk.type == "url" and not chunk.text.strip() == "d.va" for chunk in packet) + chunk.type == "url" and not + chunk.text.strip() == "d.va" for chunk in packet)