1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-25 14:47:29 +00:00

Compressed temp blacklist creation

This commit is contained in:
Myned 2017-11-08 23:48:12 -05:00
parent 7a6ea6907f
commit 8e9c37b092

View file

@ -568,12 +568,9 @@ class MsG:
blacklist = set() blacklist = set()
# Creates temp blacklist based on context # Creates temp blacklist based on context
for tag in self.blacklists['global_blacklist']: for bl in (self.blacklists['global_blacklist'], self.blacklists['guild_blacklist'].get(guild.id, {}).get(ctx.channel.id, set()), self.blacklists['user_blacklist'].get(ctx.author.id, set())):
blacklist.update(list(self.aliases[tag]) + [tag]) for tag in bl:
for tag in self.blacklists['guild_blacklist'].get(guild.id, {}).get(ctx.channel.id, set()): blacklist.update([tag] + list(self.aliases[tag]))
blacklist.update(list(self.aliases[tag]) + [tag])
for tag in self.blacklists['user_blacklist'].get(ctx.author.id, set()):
blacklist.update(list(self.aliases[tag]) + [tag])
# Checks for, assigns, and removes first order in tags if possible # Checks for, assigns, and removes first order in tags if possible
order = [tag for tag in tags if 'order:' in tag] order = [tag for tag in tags if 'order:' in tag]
if order: if order: