Index: scripts/etc/7dtd.conf
===================================================================
--- scripts/etc/7dtd.conf	(revision 66)
+++ scripts/etc/7dtd.conf	(revision 67)
@@ -10,4 +10,5 @@
 # Backup options
 export SDTD_BACKUP_ROOT=/home/sdtd/backup
+export SDTD_BACKUP_SAVEWORLD=true
 export SDTD_BACKUP_MIN_BACKUPS_KEEP=
 export SDTD_BACKUP_MAX_BACKUPS=
Index: scripts/home/sdtd/templates/admins.xml
===================================================================
--- scripts/home/sdtd/templates/admins.xml	(revision 66)
+++ scripts/home/sdtd/templates/admins.xml	(revision 67)
@@ -59,4 +59,5 @@
         <permission cmd="cc" permission_level="0" />
         <permission cmd="sc" permission_level="0" />
+        <permission cmd="saveworld" permission_level="0" />
     </permissions>
 
Index: scripts/usr/local/lib/7dtd/VERSION
===================================================================
--- scripts/usr/local/lib/7dtd/VERSION	(revision 66)
+++ scripts/usr/local/lib/7dtd/VERSION	(revision 67)
@@ -1,2 +1,2 @@
-Version: 24
-Release: 2014-07-08
+Version: 25
+Release: 2014-07-10
Index: scripts/usr/local/lib/7dtd/commands/backup.sh
===================================================================
--- scripts/usr/local/lib/7dtd/commands/backup.sh	(revision 66)
+++ scripts/usr/local/lib/7dtd/commands/backup.sh	(revision 67)
@@ -9,4 +9,12 @@
 	if [ ! -d "$SDTD_BASE/instances" ]; then
 		return
+	fi
+
+	if [ "$SDTD_BACKUP_SAVEWORLD" == "true" ]; then
+		for I in $(getInstanceList); do
+			if [ $(isRunning $I) -eq 1 ]; then
+				telnetCommand $I saveworld 2
+			fi
+		done
 	fi
 
Index: scripts/usr/local/lib/7dtd/commands/start.sh
===================================================================
--- scripts/usr/local/lib/7dtd/commands/start.sh	(revision 66)
+++ scripts/usr/local/lib/7dtd/commands/start.sh	(revision 67)
@@ -26,6 +26,8 @@
 		fi
 		
-		setAllPlayersOffline $1
-		rm -f $(getInstancePath $1)/output_log.txt
+		if [ ! -d "$(getInstancePath $1)/logs" ]; then
+			mkdir "$(getInstancePath $1)/logs"
+		fi
+		rm -f $(getInstancePath $1)/logs/output_log.txt
 		
 		for H in $(getHooksFor serverPreStart); do
@@ -36,7 +38,7 @@
 		SSD_DAEMON="--background --no-close"
 		SSD_USER="--chuid $SDTD_USER:$SDTD_GROUP --user $SDTD_USER"
-		OPTS="-logfile $(getInstancePath $1)/output_log.txt -configfile=$(getInstancePath $1)/config.xml -dedicated"
+		OPTS="-logfile $(getInstancePath $1)/logs/output_log.txt -configfile=$(getInstancePath $1)/config.xml -dedicated"
 		
-		LD_LIBRARY_PATH=$SDTD_BASE/linux_files $SSD --start $SSD_PID $SSD_DAEMON $SSD_USER --chdir $SDTD_BASE/engine --exec $SDTD_BASE/engine/7DaysToDie.x86 -- $OPTS > $(getInstancePath $1)/stdout.log 2>&1
+		LD_LIBRARY_PATH=$SDTD_BASE/linux_files $SSD --start $SSD_PID $SSD_DAEMON $SSD_USER --chdir $SDTD_BASE/engine --exec $SDTD_BASE/engine/7DaysToDie.x86 -- $OPTS > $(getInstancePath $1)/logs/stdout.log 2>&1
 		sleep 1
 
Index: scripts/usr/local/lib/7dtd/common.sh
===================================================================
--- scripts/usr/local/lib/7dtd/common.sh	(revision 66)
+++ scripts/usr/local/lib/7dtd/common.sh	(revision 67)
@@ -299,5 +299,4 @@
 
 . /usr/local/lib/7dtd/help.sh
-. /usr/local/lib/7dtd/playerlog.sh
 . /usr/local/lib/7dtd/serverconfig.sh
 for M in /usr/local/lib/7dtd/commands/*.sh; do
Index: scripts/usr/local/lib/7dtd/monitor-log.sh
===================================================================
--- scripts/usr/local/lib/7dtd/monitor-log.sh	(revision 66)
+++ scripts/usr/local/lib/7dtd/monitor-log.sh	(revision 67)
@@ -2,4 +2,5 @@
 
 . /usr/local/lib/7dtd/common.sh
+. /usr/local/lib/7dtd/playerlog.sh
 
 if [ $(isValidInstance $1) -eq 0 ]; then
@@ -9,6 +10,6 @@
 
 INSTANCE=$1
-LOG=$(getInstancePath $INSTANCE)/output.log
-CHATLOG=$(getInstancePath $INSTANCE)/chat.log
+LOG=$(getInstancePath $INSTANCE)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_output.log
+CHATLOG=$(getInstancePath $INSTANCE)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_chat.log
 
 timestamp() {
@@ -49,4 +50,10 @@
 }
 
+if [ ! -d "$(getInstancePath $INSTANCE)/logs" ]; then
+	mkdir "$(getInstancePath $INSTANCE)/logs"
+fi
+
+setAllPlayersOffline
+
 echo >> $LOG
 echo >> $LOG
@@ -62,4 +69,5 @@
 $NOBUF tr -d '\r' |
 $NOBUF grep -v "^(Filename: " |
+$NOBUF sed -r 's/^[0-9]+,[0-9]+ (.*)$/\1/' |
 while read line ; do
 	if [ -n "$line" ]; then
Index: scripts/usr/local/lib/7dtd/playerlog.sh
===================================================================
--- scripts/usr/local/lib/7dtd/playerlog.sh	(revision 66)
+++ scripts/usr/local/lib/7dtd/playerlog.sh	(revision 67)
@@ -1,3 +1,6 @@
 #!/bin/bash
+
+PLAYERSXML=$(getInstancePath $1)/players.xml
+PLAYERSLOG=$(getInstancePath $1)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_players.log
 
 timestamp() {
@@ -6,22 +9,16 @@
 
 # Create empty player list if not existing
-# Params:
-#   1: Instance name
 createPlayerList() {
-	PLAYERLIST=$(getInstancePath $1)/players.xml
-	if [ ! -f $PLAYERLIST ]; then
-		echo "<Players/>" > $PLAYERLIST
+	if [ ! -f $PLAYERSXML ]; then
+		echo "<Players/>" > $PLAYERSXML
 	fi
 }
 
 # Set all players for an instance to offline (on startup/shutdown)
-# Params:
-#   1: Instance name
 setAllPlayersOffline() {
-	PLAYERLIST=$(getInstancePath $1)/players.xml
-	createPlayerList "$1"
+	createPlayerList
 	$XMLSTARLET ed -L \
 		-u "/Players/Player/@online" -v "false" \
-		$PLAYERLIST
+		$PLAYERSXML
 }
 
@@ -33,17 +30,15 @@
 #   4: Nick name
 logPlayerConnect() {
-	PLAYERLOG=$(getInstancePath $1)/players.log
-	PLAYERLIST=$(getInstancePath $1)/players.xml
 	ENTITYID="$2"
 	STEAMID="$3"
 	NICKNAME="$4"
 
-	echo "$(timestamp) +++ $ENTITYID $NICKNAME $STEAMID" >> $PLAYERLOG
+	echo "$(timestamp) +++ $ENTITYID $NICKNAME $STEAMID" >> $PLAYERSLOG
 
-	createPlayerList "$1"
+	createPlayerList
 	
 	XPATHBASE="/Players/Player[@steamid='$STEAMID']"
 
-	if [ -z $($XMLSTARLET sel -t -v "$XPATHBASE/@steamid" $PLAYERLIST) ]; then
+	if [ -z $($XMLSTARLET sel -t -v "$XPATHBASE/@steamid" $PLAYERSXML) ]; then
 		$XMLSTARLET ed -L \
 			-s "/Players" -t elem -n "Player" -v "" \
@@ -55,7 +50,7 @@
 			-i "$XPATHBASE" -t attr -n "online" -v "true" \
 			-i "$XPATHBASE" -t attr -n "entityid" -v "$ENTITYID" \
-			$PLAYERLIST
+			$PLAYERSXML
 	else
-		LOGINS=$($XMLSTARLET sel -t -v "$XPATHBASE/@logins" $PLAYERLIST)
+		LOGINS=$($XMLSTARLET sel -t -v "$XPATHBASE/@logins" $PLAYERSXML)
 		(( LOGINS++ ))
 		$XMLSTARLET ed -L \
@@ -64,5 +59,5 @@
 			-u "$XPATHBASE/@entityid" -v "$ENTITYID" \
 			-u "$XPATHBASE/@logins" -v "$LOGINS" \
-			$PLAYERLIST
+			$PLAYERSXML
 	fi
 }
@@ -73,18 +68,16 @@
 #   2: Entity ID
 logPlayerDisconnect() {
-	PLAYERLOG=$(getInstancePath $1)/players.log
-	PLAYERLIST=$(getInstancePath $1)/players.xml
 	ENTITYID="$2"
 
-	createPlayerList "$1"
+	createPlayerList
 
 	XPATHBASE="/Players/Player[@entityid='$ENTITYID'][@online='true']"
 
-	if [ -f $PLAYERLIST ]; then
-		if [ ! -z $($XMLSTARLET sel -t -v "$XPATHBASE/@steamid" $PLAYERLIST) ]; then
-			NICKNAME=$($XMLSTARLET sel -t -v "$XPATHBASE/@nick" $PLAYERLIST)
-			STEAMID=$($XMLSTARLET sel -t -v "$XPATHBASE/@steamid" $PLAYERLIST)
-			LOGINTIME=$($XMLSTARLET sel -t -v "$XPATHBASE/@lastlogin" $PLAYERLIST)
-			PLAYTIME=$($XMLSTARLET sel -t -v "$XPATHBASE/@playtime" $PLAYERLIST)
+	if [ -f $PLAYERSXML ]; then
+		if [ ! -z $($XMLSTARLET sel -t -v "$XPATHBASE/@steamid" $PLAYERSXML) ]; then
+			NICKNAME=$($XMLSTARLET sel -t -v "$XPATHBASE/@nick" $PLAYERSXML)
+			STEAMID=$($XMLSTARLET sel -t -v "$XPATHBASE/@steamid" $PLAYERSXML)
+			LOGINTIME=$($XMLSTARLET sel -t -v "$XPATHBASE/@lastlogin" $PLAYERSXML)
+			PLAYTIME=$($XMLSTARLET sel -t -v "$XPATHBASE/@playtime" $PLAYERSXML)
 			NOW=$(date '+%s')
 			PLAYTIME=$(( PLAYTIME + NOW - LOGINTIME ))
@@ -92,9 +85,9 @@
 				-u "$XPATHBASE/@playtime" -v "$PLAYTIME" \
 				-u "$XPATHBASE/@online" -v "false" \
-				$PLAYERLIST
+				$PLAYERSXML
 		fi
 	fi
 
-	echo "$(timestamp) --- $ENTITYID $NICKNAME $STEAMID" >> $PLAYERLOG
+	echo "$(timestamp) --- $ENTITYID $NICKNAME $STEAMID" >> $PLAYERSLOG
 }
 
Index: scripts/usr/local/lib/7dtd/serverconfig.sh
===================================================================
--- scripts/usr/local/lib/7dtd/serverconfig.sh	(revision 66)
+++ scripts/usr/local/lib/7dtd/serverconfig.sh	(revision 67)
@@ -684,4 +684,29 @@
 
 
+serverconfig_MaxSpawnedZombies_QueryName() {
+	echo "Maximum number of concurrent zombies"
+}
+serverconfig_MaxSpawnedZombies_Type() {
+	echo "number"
+}
+serverconfig_MaxSpawnedZombies_Default() {
+	echo "60"
+}
+
+
+serverconfig_VACEnabled_QueryName() {
+	echo "Enable Valve Anti Cheat"
+}
+serverconfig_VACEnabled_Type() {
+	echo "boolean"
+}
+serverconfig_VACEnabled_Default() {
+	echo "true"
+}
+serverconfig_VACEnabled_ErrorMessage() {
+	echo "Not a valid boolean given (true/false or yes/no or y/n)."
+}
+
+
 
 
@@ -696,5 +721,5 @@
 	for CV in \
 			ServerName ServerPassword ServerIsPublic ServerPort ServerMaxPlayerCount \
-			DisableNAT \
+			DisableNAT VACEnabled MaxSpawnedZombies \
 			; do
 		$1 $CV
