diff --git a/README.md b/README.md index 4381262..4246ecd 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,8 @@ whitelist: ##### messages + * `toff`: The bots reply when `!toff` is used. + * `ton`: The bots reply when `!ton` is used. * `too_long`: The bots reply if message exceeds `message_length` * `disabled`: The bots reply if TTS is disabled * `denied`: The bots reply if the user is not allowed to use TTS diff --git a/tts.py b/tts.py index 7744a12..f140bba 100644 --- a/tts.py +++ b/tts.py @@ -192,6 +192,7 @@ class IRC: msg_queue.clear() msg_queue_raw.clear() self.tts_status = False + self.sendpriv(conf['IRC_CHANNEL'], "@"+str(user), conf['MESSAGE']['TOFF']) return True @@ -200,6 +201,7 @@ class IRC: msg_queue.clear() msg_queue_raw.clear() self.tts_status = True + self.sendpriv(conf['IRC_CHANNEL'], "@"+str(user), conf['MESSAGE']['TON']) return True @@ -379,7 +381,9 @@ def load_config(): conf['HTTP_BIND'] = cfg['http']['bind'] or "localhost" conf['MESSAGE'] = {} - conf['MESSAGE']['TOO_LONG'] = cfg['messages']['too_long'] or "Sorry, your message is too long" + conf['MESSAGE']['TOFF'] = cfg['messages']['toff'] or "TTS is now disabled." + conf['MESSAGE']['TON'] = cfg['messages']['ton'] or "TTS is now active." + conf['MESSAGE']['TOO_LONG'] = cfg['messages']['too_long'] or "Sorry, your message is too long." conf['MESSAGE']['DISABLED'] = cfg['messages']['disabled'] or "Sorry, TTS is disabled." conf['MESSAGE']['DENIED'] = cfg['messages']['denied'] or "Sorry, you're not allowed to use TTS." conf['MESSAGE']['SUBONLY'] = cfg['messages']['subonly'] or "Sorry, TTS is sub-only."