From 4ef62c2dc8f01dcbb696c4c2e87737e79c2a2780 Mon Sep 17 00:00:00 2001 From: gpkvt Date: Thu, 11 Aug 2022 00:09:06 +0200 Subject: [PATCH] Bugfix: Add config options, disabled webserver logging --- config-dist.yml | 2 ++ tts.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/config-dist.yml b/config-dist.yml index 12c7c1c..1929c0d 100644 --- a/config-dist.yml +++ b/config-dist.yml @@ -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" diff --git a/tts.py b/tts.py index 79d14d0..775264f 100644 --- a/tts.py +++ b/tts.py @@ -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']