#!/bin/sh
#
# Script posted by HF-Tor on linuxhlds forums.
#
# This will (cleanly) shut down your hlds_run server through halfd,
# preventing halfd from thinking that a server crash occurred.
#
# usage: stopserver <port>
#		 where <port> = port halfd is running on.
#
# e.g: stopserver 3000
#
# Make sure you change "yourpasswordhere" to your ADMINISTRATOR password.
#
( echo yourpasswordhere
sleep 2
echo TEXT
echo quit
sleep 30
echo BYE ) | telnet localhost $1
