mirror of https://gitlab.com/gpvkt/twitchtts.git
Empty raw queue at !toff/!ton
This commit is contained in:
parent
7a0a1d4c03
commit
884e5c3a10
4
tts.py
4
tts.py
|
@ -63,6 +63,8 @@ class IRC:
|
||||||
try:
|
try:
|
||||||
self.irc.send(bytes("JOIN " + channel + "\r\n", "UTF-8"))
|
self.irc.send(bytes("JOIN " + channel + "\r\n", "UTF-8"))
|
||||||
except ConnectionResetError:
|
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"))
|
self.irc.send(bytes("JOIN " + channel + "\r\n", "UTF-8"))
|
||||||
|
|
||||||
def sendpriv(self, channel, user, msg):
|
def sendpriv(self, channel, user, msg):
|
||||||
|
@ -175,10 +177,12 @@ class IRC:
|
||||||
if msg.startswith('!toff'):
|
if msg.startswith('!toff'):
|
||||||
logging.info('TTS is now turned off')
|
logging.info('TTS is now turned off')
|
||||||
msg_queue.clear()
|
msg_queue.clear()
|
||||||
|
msg_queue_raw.clear()
|
||||||
self.tts_status = False
|
self.tts_status = False
|
||||||
if msg.startswith('!ton'):
|
if msg.startswith('!ton'):
|
||||||
logging.info('TTS is now turned on')
|
logging.info('TTS is now turned on')
|
||||||
msg_queue.clear()
|
msg_queue.clear()
|
||||||
|
msg_queue_raw.clear()
|
||||||
self.tts_status = True
|
self.tts_status = True
|
||||||
|
|
||||||
if msg.startswith('!tts'):
|
if msg.startswith('!tts'):
|
||||||
|
|
Loading…
Reference in New Issue