diff --git a/botcmd.py b/botcmd.py index ea7c68d..9192b91 100644 --- a/botcmd.py +++ b/botcmd.py @@ -115,6 +115,11 @@ def sanitize(title): # irc is the IRC API object # All strings are bytestrings def handle_message(*, prefix, message, nick, channel, irc): + # Ignore messages with a zwsp, ^O, or ^B^B in the beginning + for ignored in (b'\xe2\x80\x8b', b'\x0f', b'\x02\x02'): + if message[:len(ignored)] == ignored: + return + urls = find_urls(message.decode('utf-8')) # Don't titlebot >3 urls