Ignore messages with zwsp, ^O, or ^B^B in the beginning
This commit is contained in:
parent
ff2b384579
commit
284ca9659b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue