def run(self):
while self.running:
message = s_queue.get()
if 'timestamp' not in message:
message['timestamp'] = datetime.datetime.now().isoformat()
if message['type'] in HISTORY_TYPES:
cherrypy.engine.publish('add-history', message)
elif message['type'] == 'command':
cherrypy.engine.publish('process-command', message['command'], message)
if message['type'] == 'system_message' and not self.settings['chat']['keys'].get('show_system_msg', True):
continue
log.debug("%s", message)
self.send_message(message, 'chat')
self.send_message(message, 'gui')
log.info("Messaging thread stopping")
评论列表
文章目录