Bugfix: Add config options, disabled webserver logging

This commit is contained in:
gpkvt 2022-08-11 00:09:06 +02:00
parent 39460be3de
commit 2dc0ab9e8b
2 changed files with 6 additions and 0 deletions

View File

@ -18,7 +18,9 @@ messages:
too_long: "Sorry, your TTS message is too long."
disabled: "Sorry, TTS is disabled right now."
denied: "Sorry, you are not allowed to use TTS."
whitelist: "Sorry, you are not allowed to use TTS."
subonly: "Sorry, TTS is a sub-only feature."
modonly: "Sorry, TTS is a mod-only feature."
ready: "TTS bot alpha ready!"
says: "says"

4
tts.py
View File

@ -203,6 +203,9 @@ class IRC:
return resp
class HTTPserv(BaseHTTPRequestHandler):
def log_message(self, format, *args):
return
def do_GET(self):
if self.path == '/':
self.send_response(200)
@ -308,6 +311,7 @@ def load_config():
conf['MESSAGE']['DISABLED'] = cfg['messages']['disabled']
conf['MESSAGE']['DENIED'] = cfg['messages']['denied']
conf['MESSAGE']['SUBONLY'] = cfg['messages']['subonly']
conf['MESSAGE']['MODONLY'] = cfg['messages']['modonly']
conf['MESSAGE']['READY'] = cfg['messages']['ready']
conf['MESSAGE']['WHITELISTONLY'] = cfg['messages']['whitelist']
conf['MESSAGE']['SAYS'] = cfg['messages']['says']