Bugfix: Check if user is on allowed list before removing him

This commit is contained in:
gpkvt 2022-08-11 00:43:09 +02:00
parent 9e6691779e
commit 7a4a134990
1 changed files with 2 additions and 0 deletions

2
tts.py
View File

@ -128,6 +128,8 @@ class IRC:
if user not in self.tts_denied: if user not in self.tts_denied:
logging.info("Adding "+str(user)+" to deny list") logging.info("Adding "+str(user)+" to deny list")
self.tts_denied.append(user) self.tts_denied.append(user)
if user in self.tts_allowed:
logging.info("Removing "+str(user)+" from allowed list")
self.tts_allowed.remove(user) self.tts_allowed.remove(user)
if msg.startswith('!ptts'): if msg.startswith('!ptts'):