1
0
Fork 0

Merge branch 'master' of cybre.tech:chr/matrix-appservice-minecraft

This commit is contained in:
khr 2020-04-03 05:54:55 +02:00
commit 150fab65ff
1 changed files with 5 additions and 1 deletions

View File

@ -28,6 +28,7 @@ class ProcessWrapper:
def send(self, msg):
self.proc.stdin.write(msg)
self.proc.stdin.flush()
def wait(self):
return self.proc.wait()
@ -55,9 +56,12 @@ def send_process_output(
def relay_queue_input(
process: ProcessWrapper, msg_queue: message_queue.MessageQueue
):
log = LOG.getChild("relay_input")
for message in msg_queue:
log.debug(message)
if "command" in message:
process.send(message["command"])
log.debug("forwarding to process")
process.send(message["command"] + "\n")
else:
LOG.debug(message)