From 00aabe26346ba253df553d18fd847c7aac240d64 Mon Sep 17 00:00:00 2001 From: xfnw Date: Fri, 24 Jul 2020 01:31:31 +0000 Subject: [PATCH] stricter invite ignoring --- modules/invite.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/invite.py b/modules/invite.py index ec2b68c..467ea34 100644 --- a/modules/invite.py +++ b/modules/invite.py @@ -1,10 +1,13 @@ import time async def invite(self, channel, by): + + if self.db['invite'].find_one(blacklist=channel): + print('{} invited me to {}, a blacklisted channel'.format(by,channel)) + return + if self.db['invite'].find_one(enabled='true'): - if self.db['invite'].find_one(blacklist=channel): - print('{} invited me to {}, a blacklisted channel'.format(by,channel)) - return + print('{} invited me to {}!'.format(by, channel)) self.t = time.time()+1 await self.join(channel)