Merge branch 'master' of cybre.tech:chr/matrix-appservice-minecraft
This commit is contained in:
commit
150fab65ff
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue