#!/bin/bash

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