From 453f6a9a4a32ddf1c5b1aa8351fd8419b0bf0a3b Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Fri, 8 Jan 2016 18:22:50 -0500 Subject: More work on server list --- servers.sh | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/servers.sh b/servers.sh index 31835c1..4e26413 100644 --- a/servers.sh +++ b/servers.sh @@ -1,10 +1,22 @@ -./cgi/bashlib.sh +. /usr/local/bin/bashlib -param +servername=`param hostname` +gamemodename=`param gamemode` +add=`pram online` +#It seems quotes are enough,see +#https://stackoverflow.com/questions/4273074/sanitize-user-input-in-bash-for-security-purposes +if ( $add -eq "true" ) then + cat "$servername" >> servers.txt +fi -#echo "Content-type: text/html" -#echo "" -#echo "

Servers currently running Winter Survival 2 - Anarchy:
" +echo "Content-type: text/html" +echo "" + +cat ./fileparts/header.html +echo "" +echo "

Servers currently running Winter Survival 2 - Anarchy:
" +echo "" +cat ./fileparts/footer.html -- cgit v1.2.3-70-g09d2