diff --git a/tts.py b/tts.py index 52c92cc..645f689 100644 --- a/tts.py +++ b/tts.py @@ -208,7 +208,7 @@ class IRC: self.sendmsg(conf['IRC_CHANNEL'], "@chat", conf['MESSAGE']['VOTEEND']) self.sendmsg(conf['IRC_CHANNEL'], "*", conf['MESSAGE']['VOTENOBODY']) - msg = { + raw_msg = { "TTS": True, "msg": conf['MESSAGE']['VOTENOBODY'], "badges": True, @@ -219,7 +219,8 @@ class IRC: "queuetime": datetime.datetime.now(), "timestamp": str(time.time_ns()) } - msg_queue_raw.append(msg) + msg_queue[raw_msg['timestamp']] = [raw_msg['user'], raw_msg['msg']] + logging.info('The result is: %s', conf['MESSAGE']['VOTENOBODY']) logging.debug('Votemsg: %s', msg) @@ -234,9 +235,9 @@ class IRC: logging.debug(count) - msg = { + raw_msg = { "TTS": True, - "msg": conf['MESSAGE']['VOTERESULT'] +" "+ str(count[0]), + "msg": conf['MESSAGE']['VOTERESULT'] +" "+ str(count[0][0].replace('#','')), "badges": True, "subscriber": True, "msgid": True, @@ -245,7 +246,8 @@ class IRC: "queuetime": datetime.datetime.now(), "timestamp": str(time.time_ns()) } - msg_queue_raw.append(msg) + msg_queue[raw_msg['timestamp']] = [raw_msg['user'], raw_msg['msg']] + logging.info('The result is: %s', conf['MESSAGE']['VOTERESULT'] +" "+ str(count[0])) logging.debug('Votemsg: %s', msg)