removed obsolete arguments and logfile

This commit is contained in:
gpkvt 2022-10-02 02:41:36 +02:00
parent 8a8272e2ba
commit 29e92582be
2 changed files with 2 additions and 9 deletions

BIN
tts.exe

Binary file not shown.

11
tts.py
View File

@ -262,7 +262,7 @@ class IRC:
if msg.startswith('!smartquote') or msg.startswith('!sq'): if msg.startswith('!smartquote') or msg.startswith('!sq'):
logging.debug("!smartquote command detected") logging.debug("!smartquote command detected")
self.__quotecmd(tags, msg) self.__quotecmd(msg)
return return
def __priviledged_commands(self, message, tags): def __priviledged_commands(self, message, tags):
@ -693,7 +693,7 @@ class IRC:
user = f"@{user}" user = f"@{user}"
self.sendmsg(CONF['IRC_CHANNEL'], user, CONF['MESSAGE']['WIKI_NO_RESULT']) self.sendmsg(CONF['IRC_CHANNEL'], user, CONF['MESSAGE']['WIKI_NO_RESULT'])
def __quotecmd(self, tags, msg = False): def __quotecmd(self, msg = False):
""" !smartquote command """ !smartquote command
Gets a line from quotes.txt. If a number if given as msg Gets a line from quotes.txt. If a number if given as msg
@ -706,7 +706,6 @@ class IRC:
""" """
try: try:
user = tags['user']
query = msg.replace('!smartquote', '').strip() query = msg.replace('!smartquote', '').strip()
query = msg.replace('!sq', '').strip() query = msg.replace('!sq', '').strip()
@ -1609,12 +1608,6 @@ if __name__ == "__main__":
format='%(asctime)s %(module)s %(threadName)s %(levelname)s: %(message)s' format='%(asctime)s %(module)s %(threadName)s %(levelname)s: %(message)s'
) )
file_handler = logging.FileHandler('tts.log')
file_handler.setLevel(logging.ERROR)
file_handler.setFormatter(formatter)
logger.addHandler(file_handler)
sys.tracebacklimit = 3 sys.tracebacklimit = 3
VERSION = "1.7.1" VERSION = "1.7.1"