return urlcomplaints[z]
#(?:) is a regexp that doesn't group
-urlre = re.compile("((?:(?:http)|(?:nsfw))s?://[^ ]+)( |$)")
-hturlre= re.compile("(http)(s?://[^ ]+)( |$)")
+urlre = re.compile(r"((?:(?:http)|(?:nsfw))s?://[^ ]+)( |$)")
+hturlre= re.compile(r"(http)(s?://[^ ]+)( |$)")
+#matches \bre\:?\s+ before a regexp; (?i)==case insensitive match
+shibboleth = re.compile(r"(?i)\bre\:?\s+((?:(?:http)|(?:nsfw))s?://[^ ]+)( |$)")
urlcomplaints = ["a contemporary","an interesting","a fascinating","an overused","a vastly overused"]
### Deal with /msg bot url or ~url in channel
T=urldb[urlstring]
message="observes %s URL, first mentioned %s by %s" % \
(T.urltype(),T.firstmen(),T.nick)
- conn.action(bot.channel, message)
+ if shibbloleth.search(command)==None:
+ conn.action(bot.channel, message)
T.lastseen=time.time()
T.count+=1
else: