#!/bin/bash

cat | while read line
do
	if [[ "$line" =~ ^/ ]]
	then
		echo "mine $line" > /run/minecraft-server.stdin
	elif [[ "$line" =~ ^msh ]]
	then
		echo "$line" > /run/minecraft-server.stdin
	else
		echo "mine say $line" > /run/minecraft-server.stdin
	fi
done
