diff --git a/tts.py b/tts.py index ffb7b12..ecabd3e 100644 --- a/tts.py +++ b/tts.py @@ -63,6 +63,8 @@ class IRC: try: self.irc.send(bytes("JOIN " + channel + "\r\n", "UTF-8")) except ConnectionResetError: + logging.warn('JOIN was refused, will try again in 5 seconds.') + time.sleep(5) self.irc.send(bytes("JOIN " + channel + "\r\n", "UTF-8")) def sendpriv(self, channel, user, msg): @@ -175,10 +177,12 @@ class IRC: if msg.startswith('!toff'): logging.info('TTS is now turned off') msg_queue.clear() + msg_queue_raw.clear() self.tts_status = False if msg.startswith('!ton'): logging.info('TTS is now turned on') msg_queue.clear() + msg_queue_raw.clear() self.tts_status = True if msg.startswith('!tts'):