Index: /binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj
===================================================================
--- /binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj	(revision 129)
+++ /binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj	(revision 130)
@@ -9,4 +9,5 @@
     <OutputType>Library</OutputType>
     <AssemblyName>7dtd-server-fixes</AssemblyName>
+    <RootNamespace>AllocsFixes</RootNamespace>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -44,32 +45,35 @@
     <Compile Include="src\AssemblyInfo.cs" />
     <Compile Include="src\AllocsTelnetConnection.cs" />
-    <Compile Include="src\TelnetCommands\GetTime.cs" />
-    <Compile Include="src\TelnetCommands\ListPlayersExtended.cs" />
-    <Compile Include="src\TelnetCommands\GetGamePrefs.cs" />
-    <Compile Include="src\TelnetCommands\SayToPlayer.cs" />
     <Compile Include="src\AllocsLogFunctions.cs" />
-    <Compile Include="src\TelnetCommands\SetTimeReal.cs" />
     <Compile Include="src\AdminToolsStuff.cs" />
-    <Compile Include="src\TelnetCommands\ShowInventory.cs" />
     <Compile Include="src\PlayerDataStuff.cs" />
     <Compile Include="src\CommandExtensions.cs" />
     <Compile Include="src\CommonMappingFunctions.cs" />
     <Compile Include="src\ConsoleOutputSeparator.cs" />
-    <Compile Include="src\TelnetCommands\PrivateMassageConnections.cs" />
-    <Compile Include="src\TelnetCommands\Reply.cs" />
-    <Compile Include="src\TelnetCommands\Kill.cs" />
-    <Compile Include="src\TelnetCommands\ListLandProtection.cs" />
-    <Compile Include="src\TelnetCommands\RemoveLandProtection.cs" />
-    <Compile Include="src\TelnetCommands\Version.cs" />
-    <Compile Include="src\TelnetCommands\RenderMap.cs" />
-    <Compile Include="src\TelnetCommands\CreativeMenu.cs" />
-    <Compile Include="src\TelnetCommands\Give.cs" />
-    <Compile Include="src\TelnetCommands\ListItems.cs" />
-    <Compile Include="src\MapRendering.cs" />
+    <Compile Include="src\MapRendering\MapRendering.cs" />
+    <Compile Include="src\MapRendering\MapRenderBlockBuffer.cs" />
+    <Compile Include="src\MapRendering\Constants.cs" />
+    <Compile Include="src\CustomCommands\GetTime.cs" />
+    <Compile Include="src\CustomCommands\ListPlayersExtended.cs" />
+    <Compile Include="src\CustomCommands\GetGamePrefs.cs" />
+    <Compile Include="src\CustomCommands\SayToPlayer.cs" />
+    <Compile Include="src\CustomCommands\SetTimeReal.cs" />
+    <Compile Include="src\CustomCommands\ShowInventory.cs" />
+    <Compile Include="src\CustomCommands\PrivateMassageConnections.cs" />
+    <Compile Include="src\CustomCommands\Reply.cs" />
+    <Compile Include="src\CustomCommands\Kill.cs" />
+    <Compile Include="src\CustomCommands\ListLandProtection.cs" />
+    <Compile Include="src\CustomCommands\RemoveLandProtection.cs" />
+    <Compile Include="src\CustomCommands\Version.cs" />
+    <Compile Include="src\CustomCommands\RenderMap.cs" />
+    <Compile Include="src\CustomCommands\CreativeMenu.cs" />
+    <Compile Include="src\CustomCommands\Give.cs" />
+    <Compile Include="src\CustomCommands\ListItems.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <ItemGroup>
     <Folder Include="src\" />
-    <Folder Include="src\TelnetCommands\" />
+    <Folder Include="src\MapRendering\" />
+    <Folder Include="src\CustomCommands\" />
   </ItemGroup>
 </Project>
Index: /binary-improvements/7dtd-server-fixes/src/AdminToolsStuff.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/AdminToolsStuff.cs	(revision 129)
+++ /binary-improvements/7dtd-server-fixes/src/AdminToolsStuff.cs	(revision 130)
@@ -2,83 +2,84 @@
 using System.Collections.Generic;
 
-public class AdminToolsStuff
+namespace AllocsFixes
 {
-	public static string[] GetAllowedCommandsList (AdminTools admTools, string _steamID)
+	public class AdminToolsStuff
 	{
-		List<string> allowed = new List<string> ();
+		public static string[] GetAllowedCommandsList (AdminTools admTools, string _steamID)
+		{
+			List<string> allowed = new List<string> ();
 
-		try {
-			AdminToolsClientInfo tmpInfo = admTools.GetClientCommandInfo (_steamID);
-			if (tmpInfo.SteamID == null || tmpInfo.SteamID.Length == 0)
-			{
-				tmpInfo.PermissionLevel = 1000;
+			try {
+				AdminToolsClientInfo tmpInfo = admTools.GetClientCommandInfo (_steamID);
+				if (tmpInfo.SteamID == null || tmpInfo.SteamID.Length == 0) {
+					tmpInfo.PermissionLevel = 1000;
+				}
+
+				List<AdminToolsCommandPermissions> perms = admTools.commandPermissions;
+				ConsoleSdtd console = CommonMappingFunctions.GetGameManager ().m_GUIConsole;
+
+				foreach (AdminToolsCommandPermissions atcp in perms) {
+					if (tmpInfo.SteamID != null && tmpInfo.SteamID.Length > 0) {
+						if ((atcp.PermissionLevel >= tmpInfo.PermissionLevel) || (atcp.PermissionLevel >= 1000)) {
+							addAllowed (console, allowed, atcp.Command);
+						}
+					} else {
+						if (atcp.PermissionLevel >= 1000) {
+							addAllowed (console, allowed, atcp.Command);
+						}
+					}
+				}
+
+				if (tmpInfo.PermissionLevel <= 0) {
+					List<ConsoleCommand> commands = console.commands;
+					foreach (ConsoleCommand c in commands) {
+						if (!allowed.Contains (c.Names () [0])) {
+							if (!hasPermissionLevel (admTools, c.Names () [0])) {
+								addAllowed (console, allowed, c.Names () [0]);
+							}
+						}
+					}
+				}
+
+			} catch (Exception e) {
+				Log.Out ("Error in GetAllowedCommandsList: " + e);
 			}
 
+
+			return allowed.ToArray ();
+		}
+
+		private static bool hasPermissionLevel (AdminTools admTools, string cmd)
+		{
 			List<AdminToolsCommandPermissions> perms = admTools.commandPermissions;
-			ConsoleSdtd console = CommonMappingFunctions.GetGameManager ().m_GUIConsole;
 
 			foreach (AdminToolsCommandPermissions atcp in perms) {
-				if (tmpInfo.SteamID != null && tmpInfo.SteamID.Length > 0) {
-					if ((atcp.PermissionLevel >= tmpInfo.PermissionLevel) || (atcp.PermissionLevel >= 1000)) {
-						addAllowed (console, allowed, atcp.Command);
-					}
-				} else {
-					if (atcp.PermissionLevel >= 1000) {
-						addAllowed (console, allowed, atcp.Command);
+				foreach (string ccName in getAlternativeNames(cmd)) {
+					if (atcp.Command.ToLower ().Equals (ccName)) {
+						return true;
 					}
 				}
 			}
-
-			if (tmpInfo.PermissionLevel <= 0) {
-				List<ConsoleCommand> commands = console.commands;
-				foreach (ConsoleCommand c in commands) {
-					if (!allowed.Contains (c.Names () [0])) {
-						if (!hasPermissionLevel (admTools, c.Names () [0])) {
-							addAllowed (console, allowed, c.Names () [0]);
-						}
-					}
-				}
-			}
-
-		} catch (Exception e) {
-			Log.Out ("Error in GetAllowedCommandsList: " + e);
+			return false;
 		}
 
-
-		return allowed.ToArray ();
-	}
-
-	private static bool hasPermissionLevel (AdminTools admTools, string cmd)
-	{
-		List<AdminToolsCommandPermissions> perms = admTools.commandPermissions;
-
-		foreach (AdminToolsCommandPermissions atcp in perms) {
+		private static void addAllowed (ConsoleSdtd console, List<string> list, string cmd)
+		{
 			foreach (string ccName in getAlternativeNames(cmd)) {
-				if (atcp.Command.ToLower ().Equals (ccName)) {
-					return true;
+				if (!list.Contains (ccName)) {
+					list.Add (ccName);
 				}
 			}
 		}
-		return false;
-	}
 
-	private static void addAllowed (ConsoleSdtd console, List<string> list, string cmd)
-	{
-		foreach (string ccName in getAlternativeNames(cmd)) {
-			if (!list.Contains (ccName)) {
-				list.Add (ccName);
+		private static string[] getAlternativeNames (string cmd)
+		{
+			ConsoleCommand cc = CommonMappingFunctions.GetGameManager ().m_GUIConsole.getCommand (cmd);
+			if (cc != null) {
+				return cc.Names ();
+			} else {
+				return new string[]{cmd};
 			}
 		}
 	}
-
-	private static string[] getAlternativeNames (string cmd)
-	{
-		ConsoleCommand cc = CommonMappingFunctions.GetGameManager ().m_GUIConsole.getCommand (cmd);
-		if (cc != null) {
-			return cc.Names ();
-		} else {
-			return new string[]{cmd};
-		}
-	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs	(revision 129)
+++ /binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs	(revision 130)
@@ -3,27 +3,30 @@
 using UnityEngine;
 
-public class AllocsLogFunctions
+namespace AllocsFixes
 {
-	public static void RequestToSpawnPlayer (GameManager manager, int _clientId, string _name, string _playerClassname, string _skinTexture, int _chunkViewDim)
+	public class AllocsLogFunctions
 	{
-		try {
-			ClientInfo ci = CommonMappingFunctions.GetClientInfoFromClientID (_clientId);
-			int entityId = CommonMappingFunctions.GetEntityID (ci);
-			EntityPlayer ep = CommonMappingFunctions.GetEntityPlayer (ci);
+		public static void RequestToSpawnPlayer (GameManager manager, int _clientId, string _name, string _playerClassname, string _skinTexture, int _chunkViewDim)
+		{
+			try {
+				ClientInfo ci = CommonMappingFunctions.GetClientInfoFromClientID (_clientId);
+				int entityId = CommonMappingFunctions.GetEntityID (ci);
+				EntityPlayer ep = CommonMappingFunctions.GetEntityPlayer (ci);
 
-			string ip = ci.networkPlayer.ipAddress;
-			string name = string.Empty;
+				string ip = ci.networkPlayer.ipAddress;
+				string name = string.Empty;
 
-			if (ep != null)
-				name = ep.EntityName;
+				if (ep != null)
+					name = ep.EntityName;
 
-			Log.Out ("Player connected, clientid=" + _clientId +
-				", entityid=" + entityId +
-				", name=" + name +
-				", steamid=" + CommonMappingFunctions.GetSteamID (ci) +
-				", ip=" + ip
-			);
-		} catch (Exception e) {
-			Log.Out ("Error in RequestToSpawnPlayer: " + e);
+				Log.Out ("Player connected, clientid=" + _clientId +
+					", entityid=" + entityId +
+					", name=" + name +
+					", steamid=" + CommonMappingFunctions.GetSteamID (ci) +
+					", ip=" + ip
+				);
+			} catch (Exception e) {
+				Log.Out ("Error in RequestToSpawnPlayer: " + e);
+			}
 		}
 	}
Index: /binary-improvements/7dtd-server-fixes/src/AllocsNetTelnetServer.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/AllocsNetTelnetServer.cs	(revision 129)
+++ /binary-improvements/7dtd-server-fixes/src/AllocsNetTelnetServer.cs	(revision 130)
@@ -7,175 +7,175 @@
 using System.Threading;
 
-public class AllocsNetTelnetServer
+namespace AllocsFixes
 {
-	private static ConsoleSdtd console = null;
-	private static Thread telnetThread = null;
-	private static TcpListener listener = null;
-	private static bool closed = false;
-	private static bool authEnabled = false;
-	private static List<AllocsTelnetConnection> connections = new List<AllocsTelnetConnection> ();
+	public class AllocsNetTelnetServer
+	{
+		private static Thread telnetThread = null;
+		private static TcpListener listener = null;
+		private static bool closed = false;
+		private static bool authEnabled = false;
+		private static List<AllocsTelnetConnection> connections = new List<AllocsTelnetConnection> ();
 
-	public static void init (int port)
-	{
-		try {
-			Log.Out ("[7dtd-server-fixes by Alloc] Version: " + Assembly.GetExecutingAssembly ().GetName ().Version);
-			authEnabled = GamePrefs.GetString (EnumGamePrefs.TelnetPassword).Length != 0;
-			if (authEnabled)
-				listener = new TcpListener (IPAddress.Any, port);
-			else
-				listener = new TcpListener (IPAddress.Loopback, port);
-			telnetThread = ThreadMaster.Create ("thread Allocs TelnetListenThread", new ThreadStart (telnetListenThread));
-			telnetThread.Start ();
-			Log.Out ("Started Allocs NetTelnetServer thread on " + port);
-		} catch (Exception e) {
-			Log.Out ("Error in AllocsTelnetServer.init: " + e);
+		public static void init (int port)
+		{
+			try {
+				Log.Out ("[7dtd-server-fixes by Alloc] Version: " + Assembly.GetExecutingAssembly ().GetName ().Version);
+				authEnabled = GamePrefs.GetString (EnumGamePrefs.TelnetPassword).Length != 0;
+				if (authEnabled)
+					listener = new TcpListener (IPAddress.Any, port);
+				else
+					listener = new TcpListener (IPAddress.Loopback, port);
+				telnetThread = ThreadMaster.Create ("thread Allocs TelnetListenThread", new ThreadStart (telnetListenThread));
+				telnetThread.Start ();
+				Log.Out ("Started Allocs NetTelnetServer thread on " + port);
+			} catch (Exception e) {
+				Log.Out ("Error in AllocsTelnetServer.init: " + e);
+			}
 		}
-	}
 
-	private static void telnetListenThread ()
-	{
-		try {
-			Log.Out ("Started thread_Allocs_TelnetListenThread()");
-			listener.Start ();
-			while (!closed) {
-				Thread.Sleep (10);
-				if (listener.Pending ()) {
-					AllocsTelnetConnection c = new AllocsTelnetConnection (listener.AcceptTcpClient (), authEnabled);
-					connections.Add (c);
-					Log.Out ("Telnet connection from: " + c.GetEndPoint ());
-					if (authEnabled) {
-						c.WriteLine ("Please enter password:");
-					} else {
-						LoginMessage (c);
+		private static void telnetListenThread ()
+		{
+			try {
+				Log.Out ("Started thread_Allocs_TelnetListenThread()");
+				listener.Start ();
+				while (!closed) {
+					Thread.Sleep (10);
+					if (listener.Pending ()) {
+						AllocsTelnetConnection c = new AllocsTelnetConnection (listener.AcceptTcpClient (), authEnabled);
+						connections.Add (c);
+						Log.Out ("Telnet connection from: " + c.GetEndPoint ());
+						if (authEnabled) {
+							c.WriteLine ("Please enter password:");
+						} else {
+							LoginMessage (c);
+						}
+					}
+
+					foreach (AllocsTelnetConnection c in connections) {
+						if (c.IsClosed ()) {
+							c.Close ();
+							connections.Remove (c);
+							break;
+						}
+						if (c.Read ()) {
+							string line = lineCorrecter (c.GetLine ());
+							if (!c.IsAuthenticated ()) {
+								if (line.Equals (GamePrefs.GetString (EnumGamePrefs.TelnetPassword))) {
+									c.SetAuthenticated ();
+									c.WriteLine ("Logon successful.");
+									c.WriteLine (string.Empty);
+									c.WriteLine (string.Empty);
+									c.WriteLine (string.Empty);
+									LoginMessage (c);
+								} else {
+									c.WriteLine ("Password incorrect, please enter password:");
+								}
+							} else {
+								if (line.ToLower ().Equals ("exit")) {
+									Log.Out ("Telnet connection closed by client: " + c.GetEndPoint ());
+									c.Close ();
+									connections.Remove (c);
+									break;
+								}
+								Log.Out ("Telnet executed \"" + line + "\" from: " + c.GetEndPoint ());
+								ConsoleOutputSeparator.QueueTelnetCommand (line, c);
+							}
+						}
 					}
 				}
+				Log.Out ("Exited thread_Allocs_TelnetListenThread()");
+				ThreadMaster.Remove (Thread.CurrentThread.Name);
+			} catch (Exception ex) {
+				Log.Out ("Error in Allocs telnetListenThread: " + ex.Message);
+				Log.Out ("Stack Trace: " + ex.StackTrace);
+			}
+		}
 
+		private static void LoginMessage (AllocsTelnetConnection c)
+		{
+			c.WriteLine ("*** Connected with 7DTD server.");
+			c.WriteLine ("*** Dedicated server only build");
+			c.WriteLine ("*** Allocs server fixes loaded");
+			c.WriteLine (string.Empty);
+			c.WriteLine ("Server IP:   " + 
+				((GamePrefs.GetString (EnumGamePrefs.ServerIP) != null && GamePrefs.GetString (EnumGamePrefs.ServerIP).Length != 0) ? GamePrefs.GetString (EnumGamePrefs.ServerIP) : "Any")
+			);
+			c.WriteLine ("Server port: " + GamePrefs.GetInt (EnumGamePrefs.ServerPort));
+			c.WriteLine ("Max players: " + GamePrefs.GetInt (EnumGamePrefs.ServerMaxPlayerCount));
+			c.WriteLine ("Game mode:   " + GamePrefs.GetString (EnumGamePrefs.GameMode));
+			c.WriteLine ("World:       " + GamePrefs.GetString (EnumGamePrefs.GameWorld));
+			c.WriteLine ("Game name:   " + GamePrefs.GetString (EnumGamePrefs.GameName));
+			c.WriteLine ("Difficulty:  " + GamePrefs.GetInt (EnumGamePrefs.GameDifficulty));
+			c.WriteLine (string.Empty);
+			c.WriteLine ("Press 'help' to get a list of all commands. Press 'exit' to end session.");
+			c.WriteLine (string.Empty);
+		}
+
+		private static string lineCorrecter (string line)
+		{
+			string res = "";
+			for (int i = 0; i < line.Length; i++) {
+				if (line [i] >= ' ' && line [i] != '\'' && line [i] <= '~') {
+					res += line [i];
+				}
+			}
+			return res.Trim ();
+		}
+
+		public static void Disconnect ()
+		{
+			try {
+				closed = true;
+				if (listener != null) {
+					listener.Stop ();
+				}
+				foreach (AllocsTelnetConnection c in connections) {
+					c.Close ();
+				}
+				Thread.Sleep (100);
+			} catch (Exception e) {
+				Log.Out ("Error in AllocsTelnetServer.Disconnect: " + e);
+			}
+		}
+
+		public static void SetConsole (ConsoleSdtd console)
+		{
+		}
+
+		private static void RemoveClosedConnections ()
+		{
+			try {
 				foreach (AllocsTelnetConnection c in connections) {
 					if (c.IsClosed ()) {
 						c.Close ();
-						connections.Remove (c);
-						break;
-					}
-					if (c.Read ()) {
-						string line = lineCorrecter (c.GetLine ());
-						if (!c.IsAuthenticated ()) {
-							if (line.Equals (GamePrefs.GetString (EnumGamePrefs.TelnetPassword))) {
-								c.SetAuthenticated ();
-								c.WriteLine ("Logon successful.");
-								c.WriteLine (string.Empty);
-								c.WriteLine (string.Empty);
-								c.WriteLine (string.Empty);
-								LoginMessage (c);
-							} else {
-								c.WriteLine ("Password incorrect, please enter password:");
-							}
-						} else {
-							if (line.ToLower ().Equals ("exit")) {
-								Log.Out ("Telnet connection closed by client: " + c.GetEndPoint ());
-								c.Close ();
-								connections.Remove (c);
-								break;
-							}
-							Log.Out ("Telnet executed \"" + line + "\" from: " + c.GetEndPoint ());
-							ConsoleOutputSeparator.QueueTelnetCommand (line, c);
-						}
 					}
 				}
-			}
-			Log.Out ("Exited thread_Allocs_TelnetListenThread()");
-			ThreadMaster.Remove (Thread.CurrentThread.Name);
-		} catch (Exception ex) {
-			Log.Out ("Error in Allocs telnetListenThread: " + ex.Message);
-			Log.Out ("Stack Trace: " + ex.StackTrace);
-		}
-	}
-
-	private static void LoginMessage (AllocsTelnetConnection c)
-	{
-		c.WriteLine ("*** Connected with 7DTD server.");
-		c.WriteLine ("*** Dedicated server only build");
-		c.WriteLine ("*** Allocs server fixes loaded");
-		c.WriteLine (string.Empty);
-		c.WriteLine ("Server IP:   " + 
-			((GamePrefs.GetString (EnumGamePrefs.ServerIP) != null && GamePrefs.GetString (EnumGamePrefs.ServerIP).Length != 0) ? GamePrefs.GetString (EnumGamePrefs.ServerIP) : "Any")
-		);
-		c.WriteLine ("Server port: " + GamePrefs.GetInt (EnumGamePrefs.ServerPort));
-		c.WriteLine ("Max players: " + GamePrefs.GetInt (EnumGamePrefs.ServerMaxPlayerCount));
-		c.WriteLine ("Game mode:   " + GamePrefs.GetString (EnumGamePrefs.GameMode));
-		c.WriteLine ("World:       " + GamePrefs.GetString (EnumGamePrefs.GameWorld));
-		c.WriteLine ("Game name:   " + GamePrefs.GetString (EnumGamePrefs.GameName));
-		c.WriteLine ("Difficulty:  " + GamePrefs.GetInt (EnumGamePrefs.GameDifficulty));
-		c.WriteLine (string.Empty);
-		c.WriteLine ("Press 'help' to get a list of all commands. Press 'exit' to end session.");
-		c.WriteLine (string.Empty);
-	}
-
-	private static string lineCorrecter (string line)
-	{
-		string res = "";
-		for (int i = 0; i < line.Length; i++) {
-			if (line [i] >= ' ' && line [i] != '\'' && line [i] <= '~') {
-				res += line [i];
+			} catch (Exception e) {
+				Log.Out ("Error in AllocsTelnetServer.RemoveClosedConnections: " + e);
 			}
 		}
-		return res.Trim ();
-	}
 
-	public static void Disconnect ()
-	{
-		try {
-			closed = true;
-			if (listener != null) {
-				listener.Stop ();
+		public static void WriteToClient (string line)
+		{
+			if (line == null) {
+				return;
 			}
+			RemoveClosedConnections ();
 			foreach (AllocsTelnetConnection c in connections) {
-				c.Close ();
+				if (c.IsAuthenticated ())
+					c.WriteLine (line);
 			}
-			Thread.Sleep (100);
-		} catch (Exception e) {
-			Log.Out ("Error in AllocsTelnetServer.Disconnect: " + e);
 		}
-	}
 
-	public static void SetConsole (ConsoleSdtd console)
-	{
-		Log.Out ("Telnet SetConsole called");
-		AllocsNetTelnetServer.console = console;
-	}
-
-	private static void RemoveClosedConnections ()
-	{
-		try {
+		public static void WriteToClient_Single (string line, AllocsTelnetConnection client)
+		{
+			if (line == null) {
+				return;
+			}
+			RemoveClosedConnections ();
 			foreach (AllocsTelnetConnection c in connections) {
-				if (c.IsClosed ()) {
-					c.Close ();
-				}
+				if (c.IsAuthenticated () && (c == client))
+					c.WriteLine (line);
 			}
-		} catch (Exception e) {
-			Log.Out ("Error in AllocsTelnetServer.RemoveClosedConnections: " + e);
-		}
-	}
-
-	public static void WriteToClient (string line)
-	{
-		if (line == null) {
-			return;
-		}
-		RemoveClosedConnections ();
-		foreach (AllocsTelnetConnection c in connections) {
-			if (c.IsAuthenticated ())
-				c.WriteLine (line);
-		}
-	}
-
-	public static void WriteToClient_Single (string line, AllocsTelnetConnection client)
-	{
-		if (line == null) {
-			return;
-		}
-		RemoveClosedConnections ();
-		foreach (AllocsTelnetConnection c in connections) {
-			if (c.IsAuthenticated () && (c == client))
-				c.WriteLine (line);
 		}
 	}
Index: /binary-improvements/7dtd-server-fixes/src/AllocsTelnetConnection.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/AllocsTelnetConnection.cs	(revision 129)
+++ /binary-improvements/7dtd-server-fixes/src/AllocsTelnetConnection.cs	(revision 130)
@@ -3,4 +3,6 @@
 using System.Net.Sockets;
 
+namespace AllocsFixes
+{
 public class AllocsTelnetConnection
 {
@@ -93,2 +95,3 @@
 	}
 }
+}
Index: /binary-improvements/7dtd-server-fixes/src/CommandExtensions.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CommandExtensions.cs	(revision 129)
+++ /binary-improvements/7dtd-server-fixes/src/CommandExtensions.cs	(revision 130)
@@ -1,29 +1,32 @@
+using AllocsFixes.CustomCommands;
 using System;
 using System.Collections.Generic;
 
-public class CommandExtensions
+namespace AllocsFixes
 {
-	public static void InitCommandExtensions (GameManager manager)
+	public class CommandExtensions
 	{
-		try {
-			manager.m_GUIConsole.AddCommand (new CreativeMenu (manager.m_GUIConsole));
-			manager.m_GUIConsole.AddCommand (new GetGamePrefs (manager.m_GUIConsole));
-			manager.m_GUIConsole.AddCommand (new GetTime (manager.m_GUIConsole));
-			manager.m_GUIConsole.AddCommand (new Give (manager.m_GUIConsole));
-			manager.m_GUIConsole.AddCommand (new Kill (manager.m_GUIConsole));
-			manager.m_GUIConsole.AddCommand (new ListItems (manager.m_GUIConsole));
-			manager.m_GUIConsole.AddCommand (new ListLandProtection (manager.m_GUIConsole));
-			manager.m_GUIConsole.AddCommand (new ListPlayersExtended (manager.m_GUIConsole));
-			manager.m_GUIConsole.AddCommand (new RemoveLandProtection (manager.m_GUIConsole));
-			manager.m_GUIConsole.AddCommand (new RenderMap (manager.m_GUIConsole));
-			manager.m_GUIConsole.AddCommand (new Reply (manager.m_GUIConsole));
-			manager.m_GUIConsole.AddCommand (new SayToPlayer (manager.m_GUIConsole));
-			manager.m_GUIConsole.AddCommand (new SetTimeReal (manager.m_GUIConsole));
-			manager.m_GUIConsole.AddCommand (new ShowInventory (manager.m_GUIConsole));
-			manager.m_GUIConsole.AddCommand (new Version (manager.m_GUIConsole));
-		} catch (Exception e) {
-			Log.Out ("Error registering custom commands: " + e);
+		public static void InitCommandExtensions (GameManager manager)
+		{
+			try {
+				manager.m_GUIConsole.AddCommand (new CreativeMenu (manager.m_GUIConsole));
+				manager.m_GUIConsole.AddCommand (new GetGamePrefs (manager.m_GUIConsole));
+				manager.m_GUIConsole.AddCommand (new GetTime (manager.m_GUIConsole));
+				manager.m_GUIConsole.AddCommand (new Give (manager.m_GUIConsole));
+				manager.m_GUIConsole.AddCommand (new Kill (manager.m_GUIConsole));
+				manager.m_GUIConsole.AddCommand (new ListItems (manager.m_GUIConsole));
+				manager.m_GUIConsole.AddCommand (new ListLandProtection (manager.m_GUIConsole));
+				manager.m_GUIConsole.AddCommand (new ListPlayersExtended (manager.m_GUIConsole));
+				manager.m_GUIConsole.AddCommand (new RemoveLandProtection (manager.m_GUIConsole));
+				manager.m_GUIConsole.AddCommand (new RenderMap (manager.m_GUIConsole));
+				manager.m_GUIConsole.AddCommand (new Reply (manager.m_GUIConsole));
+				manager.m_GUIConsole.AddCommand (new SayToPlayer (manager.m_GUIConsole));
+				manager.m_GUIConsole.AddCommand (new SetTimeReal (manager.m_GUIConsole));
+				manager.m_GUIConsole.AddCommand (new ShowInventory (manager.m_GUIConsole));
+				manager.m_GUIConsole.AddCommand (new AllocsFixes.CustomCommands.Version (manager.m_GUIConsole));
+			} catch (Exception e) {
+				Log.Out ("Error registering custom commands: " + e);
+			}
 		}
 	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/CommonMappingFunctions.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CommonMappingFunctions.cs	(revision 129)
+++ /binary-improvements/7dtd-server-fixes/src/CommonMappingFunctions.cs	(revision 130)
@@ -4,164 +4,166 @@
 using ManagedSteam.SteamTypes;
 
-public class CommonMappingFunctions
+namespace AllocsFixes
 {
-	public static ConnectionManager GetConnectionManager ()
+	public class CommonMappingFunctions
 	{
-		return ConnectionManager.Instance;
-	}
+		public static ConnectionManager GetConnectionManager ()
+		{
+			return ConnectionManager.Instance;
+		}
 
-	public static GameManager GetGameManager ()
-	{
-		return GetConnectionManager ().gameManager;
-	}
+		public static GameManager GetGameManager ()
+		{
+			return GetConnectionManager ().gameManager;
+		}
 
-	public static string GetPlayerName (ClientInfo _ci)
-	{
-		try {
-			int entityId = GetConnectionManager ().mapClientToEntity [_ci.clientId];
-			return GetGameManager ().World.playerEntities.dict [entityId].EntityName;
-		} catch (Exception e) {
-			Log.Out ("Error getting player name for ClientInfo: " + e);
+		public static string GetPlayerName (ClientInfo _ci)
+		{
+			try {
+				int entityId = GetConnectionManager ().mapClientToEntity [_ci.clientId];
+				return GetGameManager ().World.playerEntities.dict [entityId].EntityName;
+			} catch (Exception e) {
+				Log.Out ("Error getting player name for ClientInfo: " + e);
+			}
+			return null;
 		}
-		return null;
-	}
 
-	public static EntityPlayer GetEntityPlayer (ClientInfo _ci)
-	{
-		try {
-			int entityId = GetConnectionManager ().mapClientToEntity [_ci.clientId];
-			return GetGameManager ().World.playerEntities.dict [entityId];
-		} catch (Exception e) {
-			Log.Out ("Error getting entity player for ClientInfo: " + e);
+		public static EntityPlayer GetEntityPlayer (ClientInfo _ci)
+		{
+			try {
+				int entityId = GetConnectionManager ().mapClientToEntity [_ci.clientId];
+				return GetGameManager ().World.playerEntities.dict [entityId];
+			} catch (Exception e) {
+				Log.Out ("Error getting entity player for ClientInfo: " + e);
+			}
+			return null;
 		}
-		return null;
-	}
 
-	public static string GetSteamID (ClientInfo _ci)
-	{
-		return SingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (GetPlayerName (_ci));
-	}
+		public static string GetSteamID (ClientInfo _ci)
+		{
+			return SingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (GetPlayerName (_ci));
+		}
 
-	public static string GetSteamID (string _playerName)
-	{
-		return SingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (_playerName);
-	}
+		public static string GetSteamID (string _playerName)
+		{
+			return SingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (_playerName);
+		}
 
-	public static int GetClientID (ClientInfo _ci)
-	{
-		if (_ci != null) {
-			if (GetConnectionManager ().connectedClients.ContainsKey (_ci.clientId))
-				return _ci.clientId;
+		public static int GetClientID (ClientInfo _ci)
+		{
+			if (_ci != null) {
+				if (GetConnectionManager ().connectedClients.ContainsKey (_ci.clientId))
+					return _ci.clientId;
+			}
+			return -1;
 		}
-		return -1;
-	}
 
-	public static int GetEntityID (ClientInfo _ci)
-	{
-		try {
-			ConnectionManager cm = GetConnectionManager ();
+		public static int GetEntityID (ClientInfo _ci)
+		{
+			try {
+				ConnectionManager cm = GetConnectionManager ();
 
-			if (cm.mapClientToEntity.ContainsKey (_ci.clientId))
-				return cm.mapClientToEntity [_ci.clientId];
-			else
-				return -1;
-		} catch (Exception e) {
-			Log.Out ("Error getting entity ID for ClientInfo: " + e);
+				if (cm.mapClientToEntity.ContainsKey (_ci.clientId))
+					return cm.mapClientToEntity [_ci.clientId];
+				else
+					return -1;
+			} catch (Exception e) {
+				Log.Out ("Error getting entity ID for ClientInfo: " + e);
+			}
+			return -1;
 		}
-		return -1;
-	}
 
-	public static ClientInfo GetClientInfoFromEntityID (int _entityId)
-	{
-		try {
-			ConnectionManager cm = GetConnectionManager ();
+		public static ClientInfo GetClientInfoFromEntityID (int _entityId)
+		{
+			try {
+				ConnectionManager cm = GetConnectionManager ();
 
-			if (cm.mapClientToEntity.ContainsValue (_entityId)) {
-				foreach (KeyValuePair<int, int> kvp in cm.mapClientToEntity) {
-					if (kvp.Value == _entityId) {
-						return cm.connectedClients [kvp.Key];
+				if (cm.mapClientToEntity.ContainsValue (_entityId)) {
+					foreach (KeyValuePair<int, int> kvp in cm.mapClientToEntity) {
+						if (kvp.Value == _entityId) {
+							return cm.connectedClients [kvp.Key];
+						}
 					}
 				}
+
+				return null;
+			} catch (Exception e) {
+				Log.Out ("Error getting ClientInfo for entity ID: " + e);
 			}
+			return null;
+		}
 
+		public static ClientInfo GetClientInfoFromClientID (int _clientId)
+		{
+			try {
+				ConnectionManager cm = GetConnectionManager ();
+
+				if (cm.connectedClients.ContainsKey (_clientId))
+					return cm.connectedClients [_clientId];
+				else
+					return null;
+			} catch (Exception e) {
+				Log.Out ("Error getting ClientInfo for client ID: " + e);
+			}
 			return null;
-		} catch (Exception e) {
-			Log.Out ("Error getting ClientInfo for entity ID: " + e);
 		}
-		return null;
+
+		public static ClientInfo GetClientInfoFromPlayerName (string _playerName, bool ignoreColorcodes)
+		{
+			try {
+				ConnectionManager cm = GetConnectionManager ();
+
+				_playerName = _playerName.ToLower ();
+				if (ignoreColorcodes) {
+					_playerName = Regex.Replace (_playerName, "\\[[0-9a-fA-F]{6}\\]", "");
+				}
+				foreach (ClientInfo ci in cm.connectedClients.Values) {
+					string curName = GetPlayerName (ci).ToLower ();
+					if (ignoreColorcodes) {
+						curName = Regex.Replace (curName, "\\[[0-9a-fA-F]{6}\\]", "");
+					}
+					if (curName.Equals (_playerName)) {
+						return ci;
+					}
+				}
+			} catch (Exception e) {
+				Log.Out ("Error getting ClientInfo for player name: " + e);
+			}
+			return null;
+		}
+
+		public static ClientInfo GetClientInfoFromNameOrID (string _nameOrId, bool ignoreColorcodes)
+		{
+			try {
+				int entityId = -1;
+				if (int.TryParse (_nameOrId, out entityId)) {
+					ClientInfo ci = GetClientInfoFromEntityID (entityId);
+					if (ci != null)
+						return ci;
+				}
+
+				return GetClientInfoFromPlayerName (_nameOrId, ignoreColorcodes);
+			} catch (Exception e) {
+				Log.Out ("Error getting ClientInfo for entity ID or player name: " + e);
+			}
+			return null;
+		}
+
+		public static ClientInfo GetClientInfoFromSteamID (string _steamId)
+		{
+			try {
+				Dictionary<string, object> uToID = Authenticator.Instance.usersToIDs;
+				foreach (KeyValuePair<string, object> kvp in uToID) {
+					string curId = string.Empty + ((SteamID)kvp.Value).AsUInt64;
+					if (curId.Equals (_steamId)) {
+						return GetClientInfoFromPlayerName (kvp.Key, false);
+					}
+				}
+			} catch (Exception e) {
+				Log.Out ("Error getting ClientInfo for steam ID: " + e);
+			}
+			return null;
+		}
+
 	}
-
-	public static ClientInfo GetClientInfoFromClientID (int _clientId)
-	{
-		try {
-			ConnectionManager cm = GetConnectionManager ();
-
-			if (cm.connectedClients.ContainsKey (_clientId))
-				return cm.connectedClients [_clientId];
-			else
-				return null;
-		} catch (Exception e) {
-			Log.Out ("Error getting ClientInfo for client ID: " + e);
-		}
-		return null;
-	}
-
-	public static ClientInfo GetClientInfoFromPlayerName (string _playerName, bool ignoreColorcodes)
-	{
-		try {
-			ConnectionManager cm = GetConnectionManager ();
-
-			_playerName = _playerName.ToLower ();
-			if (ignoreColorcodes) {
-				_playerName = Regex.Replace (_playerName, "\\[[0-9a-fA-F]{6}\\]", "");
-			}
-			foreach (ClientInfo ci in cm.connectedClients.Values) {
-				string curName = GetPlayerName (ci).ToLower ();
-				if (ignoreColorcodes) {
-					curName = Regex.Replace (curName, "\\[[0-9a-fA-F]{6}\\]", "");
-				}
-				if (curName.Equals (_playerName)) {
-					return ci;
-				}
-			}
-		} catch (Exception e) {
-			Log.Out ("Error getting ClientInfo for player name: " + e);
-		}
-		return null;
-	}
-
-	public static ClientInfo GetClientInfoFromNameOrID (string _nameOrId, bool ignoreColorcodes)
-	{
-		try {
-			int entityId = -1;
-			if (int.TryParse (_nameOrId, out entityId)) {
-				ClientInfo ci = GetClientInfoFromEntityID (entityId);
-				if (ci != null)
-					return ci;
-			}
-
-			return GetClientInfoFromPlayerName (_nameOrId, ignoreColorcodes);
-		} catch (Exception e) {
-			Log.Out ("Error getting ClientInfo for entity ID or player name: " + e);
-		}
-		return null;
-	}
-
-	public static ClientInfo GetClientInfoFromSteamID (string _steamId)
-	{
-		try {
-			Dictionary<string, object> uToID = Authenticator.Instance.usersToIDs;
-			foreach (KeyValuePair<string, object> kvp in uToID) {
-				string curId = string.Empty + ((SteamID)kvp.Value).AsUInt64;
-				if (curId.Equals (_steamId)) {
-					return GetClientInfoFromPlayerName (kvp.Key, false);
-				}
-			}
-		} catch (Exception e) {
-			Log.Out ("Error getting ClientInfo for steam ID: " + e);
-		}
-		return null;
-	}
-
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/ConsoleOutputSeparator.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/ConsoleOutputSeparator.cs	(revision 129)
+++ /binary-improvements/7dtd-server-fixes/src/ConsoleOutputSeparator.cs	(revision 130)
@@ -4,66 +4,80 @@
 using UnityEngine;
 
-public class ConsoleOutputSeparator
+namespace AllocsFixes
 {
-	public struct AllocsTelnetCommand
+	public class ConsoleOutputSeparator
 	{
-		public string command;
-		public AllocsTelnetConnection client;
+		public struct AllocsTelnetCommand
+		{
+			public string command;
+			public AllocsTelnetConnection client;
 
-		public AllocsTelnetCommand (string _cmd, AllocsTelnetConnection _client)
-		{
-			command = _cmd;
-			client = _client;
-		}
-	}
-
-	private static List<AllocsTelnetCommand> telnetCommandQueue = new List<AllocsTelnetCommand> ();
-	private static bool isCurrentCommandFromClient = false;
-	private static AllocsTelnetConnection issuerOfCurrentTelnetCommand;
-
-	public static void C_ExecuteCmdFromClient (ConsoleSdtd console, NetworkPlayer _networkPlayer, string _playerID, string _command)
-	{
-		Log.Out ("Executed command \"" + _command + "\" from player \"" + _playerID + "\"");
-
-		object obj = telnetCommandQueue;
-		Monitor.Enter (obj);
-		try {
-			isCurrentCommandFromClient = true;
-			console.issuerOfCurrentClientCommand = _networkPlayer;
-			console.ExecuteClientCmdInternal (_playerID, _command);
-			isCurrentCommandFromClient = false;
-		} finally {
-			Monitor.Exit (obj);
+			public AllocsTelnetCommand (string _cmd, AllocsTelnetConnection _client)
+			{
+				command = _cmd;
+				client = _client;
+			}
 		}
 
-	}
+		private static List<AllocsTelnetCommand> telnetCommandQueue = new List<AllocsTelnetCommand> ();
+		private static bool isCurrentCommandFromClient = false;
+		private static AllocsTelnetConnection issuerOfCurrentTelnetCommand;
 
-	public static void C_SendResult (ConsoleSdtd console, string _line)
-	{
-		if (isCurrentCommandFromClient) {
-			console.gameManager.GetRPCNetworkView ().RPC ("RPC_Console", console.issuerOfCurrentClientCommand, new object[]
+		public static void C_ExecuteCmdFromClient (ConsoleSdtd console, NetworkPlayer _networkPlayer, string _playerID, string _command)
+		{
+			Log.Out ("Executed command \"" + _command + "\" from player \"" + _playerID + "\"");
+
+			object obj = telnetCommandQueue;
+			Monitor.Enter (obj);
+			try {
+				isCurrentCommandFromClient = true;
+				console.issuerOfCurrentClientCommand = _networkPlayer;
+				console.ExecuteClientCmdInternal (_playerID, _command);
+				isCurrentCommandFromClient = false;
+			} finally {
+				Monitor.Exit (obj);
+			}
+
+		}
+
+		public static void C_SendResult (ConsoleSdtd console, string _line)
+		{
+			if (isCurrentCommandFromClient) {
+				console.gameManager.GetRPCNetworkView ().RPC ("RPC_Console", console.issuerOfCurrentClientCommand, new object[]
 			{
 				_line,
 				false
 			}
-			);
-		} else {
-			if (console.telnetServer != null && issuerOfCurrentTelnetCommand != null)
-				AllocsNetTelnetServer.WriteToClient_Single (_line, issuerOfCurrentTelnetCommand);
-			else if (ControlPanel.IsStarted ())
-				ControlPanel.AddTextToOutputBuffer (_line);
+				);
+			} else {
+				if (console.telnetServer != null && issuerOfCurrentTelnetCommand != null)
+					AllocsNetTelnetServer.WriteToClient_Single (_line, issuerOfCurrentTelnetCommand);
+				else if (ControlPanel.IsStarted ())
+					ControlPanel.AddTextToOutputBuffer (_line);
+			}
 		}
-	}
 
-	public static void C_Run (ConsoleSdtd console)
-	{
-		if (telnetCommandQueue.Count > 0) {
+		public static void C_Run (ConsoleSdtd console)
+		{
+			if (telnetCommandQueue.Count > 0) {
+				object obj = telnetCommandQueue;
+				Monitor.Enter (obj);
+				try {
+					issuerOfCurrentTelnetCommand = telnetCommandQueue [0].client;
+					console.ExecuteRemoteCmdInternal (telnetCommandQueue [0].command, false);
+					telnetCommandQueue.RemoveAt (0);
+					issuerOfCurrentTelnetCommand = null;
+				} finally {
+					Monitor.Exit (obj);
+				}
+			}
+		}
+
+		public static void QueueTelnetCommand (string _line, AllocsTelnetConnection _con)
+		{
 			object obj = telnetCommandQueue;
 			Monitor.Enter (obj);
 			try {
-				issuerOfCurrentTelnetCommand = telnetCommandQueue [0].client;
-				console.ExecuteRemoteCmdInternal (telnetCommandQueue [0].command, false);
-				telnetCommandQueue.RemoveAt (0);
-				issuerOfCurrentTelnetCommand = null;
+				telnetCommandQueue.Add (new AllocsTelnetCommand (_line, _con));
 			} finally {
 				Monitor.Exit (obj);
@@ -71,15 +85,3 @@
 		}
 	}
-
-	public static void QueueTelnetCommand (string _line, AllocsTelnetConnection _con)
-	{
-		object obj = telnetCommandQueue;
-		Monitor.Enter (obj);
-		try {
-			telnetCommandQueue.Add (new AllocsTelnetCommand (_line, _con));
-		} finally {
-			Monitor.Exit (obj);
-		}
-	}
 }
-
Index: /binary-improvements/7dtd-server-fixes/src/CustomCommands/CreativeMenu.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CustomCommands/CreativeMenu.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/CustomCommands/CreativeMenu.cs	(revision 130)
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+
+namespace AllocsFixes.CustomCommands
+{
+	public class CreativeMenu : ConsoleCommand
+	{
+		public CreativeMenu (ConsoleSdtd cons) : base(cons)
+		{
+		}
+
+		public override string Description ()
+		{
+			return "enable/disable creative menu";
+		}
+
+		public override string[] Names ()
+		{
+			return new string[] { "creativemenu", "cm" };
+		}
+
+		public override void Run (string[] _params)
+		{
+			try {
+				if (_params.Length != 1) {
+					m_Console.SendResult ("Usage: creativemenu <0/1>");
+					return;
+				}
+
+				GameStats.Set (EnumGameStats.IsCreativeMenuEnabled, _params [0].Equals ("1"));
+
+				m_Console.SendResult ("Set creative menu to " + _params [0].Equals ("1"));
+			} catch (Exception e) {
+				Log.Out ("Error in CreativeMenu.Run: " + e);
+			}
+		}
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/CustomCommands/GetGamePrefs.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CustomCommands/GetGamePrefs.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/CustomCommands/GetGamePrefs.cs	(revision 130)
@@ -0,0 +1,82 @@
+using System;
+using System.Collections.Generic;
+
+namespace AllocsFixes.CustomCommands
+{
+	public class GetGamePrefs : ConsoleCommand
+	{
+		private string[] forbiddenPrefs = new string[] {
+			"telnet",
+			"adminfilename",
+			"controlpanel",
+			"password",
+			"savegamefolder",
+			"options",
+			"last"
+		};
+
+		private bool prefAccessAllowed (EnumGamePrefs gp)
+		{
+			string gpName = gp.ToString ().ToLower ();
+			foreach (string s in forbiddenPrefs) {
+				if (gpName.Contains (s)) {
+					return false;
+				}
+			}
+			return true;
+		}
+
+		public GetGamePrefs (ConsoleSdtd cons) : base(cons)
+		{
+		}
+
+		public override string Description ()
+		{
+			return "gets a game pref";
+		}
+
+		public override string[] Names ()
+		{
+			return new string[]
+		{
+			"getgamepref",
+			"gg"
+		};
+		}
+
+		public override void Run (string[] _params)
+		{
+			try {
+				EnumGamePrefs enumGamePrefs = EnumGamePrefs.Last;
+
+				if (_params.Length > 0) {
+					try {
+						enumGamePrefs = (EnumGamePrefs)((int)Enum.Parse (typeof(EnumGamePrefs), _params [0]));
+					} catch (Exception) {
+					}
+				}
+
+				if (enumGamePrefs == EnumGamePrefs.Last) {
+					SortedList<string, string> sortedList = new SortedList<string, string> ();
+					foreach (EnumGamePrefs gp in Enum.GetValues(typeof(EnumGamePrefs))) {
+						if ((_params.Length == 0) || (gp.ToString ().ToLower ().Contains (_params [0].ToLower ()))) {
+							if (prefAccessAllowed (gp)) {
+								sortedList.Add (gp.ToString (), string.Format ("{0} = {1}", gp.ToString (), GamePrefs.GetObject (gp)));
+							}
+						}
+					}
+					foreach (string s in sortedList.Keys) {
+						m_Console.SendResult (sortedList [s]);
+					}
+				} else {
+					if (prefAccessAllowed (enumGamePrefs))
+						m_Console.SendResult (string.Format ("{0} = {1}", enumGamePrefs, GamePrefs.GetObject (enumGamePrefs)));
+					else
+						m_Console.SendResult ("Access to requested preference is forbidden");
+				}
+			} catch (Exception e) {
+				Log.Out ("Error in GetGamePrefs.Run: " + e);
+			}
+		}
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/CustomCommands/GetTime.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CustomCommands/GetTime.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/CustomCommands/GetTime.cs	(revision 130)
@@ -0,0 +1,38 @@
+using System;
+
+namespace AllocsFixes.CustomCommands
+{
+	public class GetTime : ConsoleCommand
+	{
+		public GetTime (ConsoleSdtd cons) : base(cons)
+		{
+		}
+
+		public override string Description ()
+		{
+			return "retrieves current ingame time";
+		}
+
+		public override string[] Names ()
+		{
+			return new string[] { "gettime", "gt" };
+		}
+
+		public override void Run (string[] _params)
+		{
+			try {
+				ulong time = this.m_Console.gameManager.World.gameTime;
+				int day = (int)(time / 24000) + 1;
+				int hour = (int)(time % 24000) / 1000 + 8;
+				if (hour > 23) {
+					day++;
+					hour -= 24;
+				}
+				int min = (int)(time % 1000) * 60 / 1000;
+				m_Console.SendResult (String.Format ("Day {0}, {1:00}:{2:00} ", day, hour, min));
+			} catch (Exception e) {
+				Log.Out ("Error in GetTime.Run: " + e);
+			}
+		}
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/CustomCommands/Give.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CustomCommands/Give.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/CustomCommands/Give.cs	(revision 130)
@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace AllocsFixes.CustomCommands
+{
+	public class Give : ConsoleCommand
+	{
+		public Give (ConsoleSdtd cons) : base(cons)
+		{
+		}
+
+		public override string Description ()
+		{
+			return "give an item to a player (entity id or name)";
+		}
+
+		public override string[] Names ()
+		{
+			return new string[] { "give", string.Empty };
+		}
+
+		public override void Run (string[] _params)
+		{
+			try {
+				if (_params.Length != 3) {
+					m_Console.SendResult ("Usage: give <playername|entityid> <itemname> <amount>");
+					return;
+				}
+
+				ClientInfo ci = CommonMappingFunctions.GetClientInfoFromNameOrID (_params [0], false);
+
+				if (ci == null) {
+					m_Console.SendResult ("Playername or entity id not found.");
+					return;
+				}
+
+				ItemBase item = null;
+
+				foreach (ItemBase ib in ItemBase.list) {
+					if (ib.name != null && ib.name.ToLower ().Equals (_params [1].ToLower ())) {
+						item = ib;
+						break;
+					}
+				}
+
+				if (item == null) {
+					m_Console.SendResult ("Item not found.");
+					return;
+				}
+
+				int n = int.MinValue;
+				if (!int.TryParse (_params [2], out n) || n <= 0) {
+					m_Console.SendResult ("Amount is not an integer or not greater than zero.");
+					return;
+				}
+
+				EntityPlayer p = CommonMappingFunctions.GetEntityPlayer (ci);
+				CommonMappingFunctions.GetGameManager ().DropEntityItemServer (item.itemID, n, p.GetPosition (), Vector3.zero, Vector3.zero, 50, CommonMappingFunctions.GetEntityID (ci));
+
+				m_Console.SendResult ("Dropped item");
+			} catch (Exception e) {
+				Log.Out ("Error in Give.Run: " + e);
+			}
+		}
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/CustomCommands/Kill.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CustomCommands/Kill.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/CustomCommands/Kill.cs	(revision 130)
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+
+namespace AllocsFixes.CustomCommands
+{
+	public class Kill : ConsoleCommand
+	{
+		public Kill (ConsoleSdtd cons) : base(cons)
+		{
+		}
+
+		public override string Description ()
+		{
+			return "kill a given player (entity id or name)";
+		}
+
+		public override string[] Names ()
+		{
+			return new string[] { "kill", string.Empty };
+		}
+
+		public override void Run (string[] _params)
+		{
+			try {
+				if (_params.Length != 1) {
+					m_Console.SendResult ("Usage: kill <playername|entityid>");
+					return;
+				}
+
+				ClientInfo ci = CommonMappingFunctions.GetClientInfoFromNameOrID (_params [0], false);
+
+				if (ci == null) {
+					m_Console.SendResult ("Playername or entity id not found.");
+					return;
+				}
+
+				EntityPlayer p = CommonMappingFunctions.GetEntityPlayer (ci);
+				p.DamageEntity (new DamageSource (EnumDamageSourceType.Bullet), 9999);
+				m_Console.SendResult ("Killed player " + _params [0]);
+			} catch (Exception e) {
+				Log.Out ("Error in Kill.Run: " + e);
+			}
+		}
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/CustomCommands/ListItems.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CustomCommands/ListItems.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/CustomCommands/ListItems.cs	(revision 130)
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+
+namespace AllocsFixes.CustomCommands
+{
+	public class ListItems : ConsoleCommand
+	{
+		public ListItems (ConsoleSdtd cons) : base(cons)
+		{
+		}
+
+		public override string Description ()
+		{
+			return "lists all items that contain the given substring";
+		}
+
+		public override string[] Names ()
+		{
+			return new string[] { "listitems", "li" };
+		}
+
+		public override void Run (string[] _params)
+		{
+			try {
+				if (_params.Length != 1 || _params [0].Length == 0) {
+					m_Console.SendResult ("Usage: listitems <searchString>");
+					return;
+				}
+
+				int n = 0;
+				foreach (ItemBase ib in ItemBase.list) {
+					if (ib.name != null && ib.name.ToLower ().Contains (_params [0].ToLower ())) {
+						m_Console.SendResult ("    " + ib.name);
+						n++;
+					}
+				}
+
+				m_Console.SendResult ("Listed " + n + " matching items.");
+			} catch (Exception e) {
+				Log.Out ("Error in ListItems.Run: " + e);
+			}
+		}
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/CustomCommands/ListLandProtection.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CustomCommands/ListLandProtection.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/CustomCommands/ListLandProtection.cs	(revision 130)
@@ -0,0 +1,59 @@
+using System;
+using System.Collections.Generic;
+
+namespace AllocsFixes.CustomCommands
+{
+	public class ListLandProtection : ConsoleCommand
+	{
+		public ListLandProtection (ConsoleSdtd cons) : base(cons)
+		{
+		}
+
+		public override string Description ()
+		{
+			return "lists all land protection blocks and owners";
+		}
+
+		public override string[] Names ()
+		{
+			return new string[] { "listlandprotection", "llp" };
+		}
+
+		public override void Run (string[] _params)
+		{
+			try {
+				World w = CommonMappingFunctions.GetGameManager ().World;
+				PersistentPlayerList ppl = CommonMappingFunctions.GetGameManager ().GetPersistentPlayerList ();
+
+				Dictionary<Vector3i, PersistentPlayerData> d = ppl.positionToLPBlockOwner;
+				if (d != null) {
+					Dictionary<PersistentPlayerData, List<Vector3i>> owners = new Dictionary<PersistentPlayerData, List<Vector3i>> ();
+					foreach (KeyValuePair<Vector3i, PersistentPlayerData> kvp in d) {
+						if (!owners.ContainsKey (kvp.Value)) {
+							owners.Add (kvp.Value, new List<Vector3i> ());
+						}
+						owners [kvp.Value].Add (kvp.Key);
+					}
+
+					foreach (KeyValuePair<PersistentPlayerData, List<Vector3i>> kvp in owners) {
+						ClientInfo ci = CommonMappingFunctions.GetClientInfoFromEntityID (kvp.Key.EntityId);
+						string name = string.Empty;
+						if (ci != null) {
+							name = CommonMappingFunctions.GetPlayerName (ci);
+						}
+						name += " (" + kvp.Key.PlayerId + ")";
+
+						m_Console.SendResult (String.Format ("Player \"{0}\" (protected: {1}, current hardness multiplier: {2}):", name, w.LandClaimIsActive (kvp.Key), w.LandClaimPower (kvp.Key)));
+						foreach (Vector3i v in kvp.Value) {
+							m_Console.SendResult ("   (" + v.ToString () + ")");
+						}
+					}
+				}
+
+				m_Console.SendResult ("Total of " + d.Count + " keystones in the game");
+			} catch (Exception e) {
+				Log.Out ("Error in ListLandProtection.Run: " + e);
+			}
+		}
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/CustomCommands/ListPlayersExtended.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CustomCommands/ListPlayersExtended.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/CustomCommands/ListPlayersExtended.cs	(revision 130)
@@ -0,0 +1,73 @@
+using System;
+using System.Collections.Generic;
+
+namespace AllocsFixes.CustomCommands
+{
+	public class ListPlayersExtended : ConsoleCommand
+	{
+		public ListPlayersExtended (ConsoleSdtd cons) : base(cons)
+		{
+		}
+
+		public override string Description ()
+		{
+			return "lists all players with extended attributes";
+		}
+
+		public override string[] Names ()
+		{
+			return new string[] { "listplayersextended", "lpe" };
+		}
+
+		public override void Run (string[] _params)
+		{
+			try {
+				World w = CommonMappingFunctions.GetGameManager ().World;
+				int num = 0;
+				foreach (KeyValuePair<int, EntityPlayer> current in w.playerEntities.dict) {
+					ClientInfo ci = CommonMappingFunctions.GetClientInfoFromEntityID (current.Key);
+					string ip = string.Empty;
+					if (ci != null) {
+						ip = ci.networkPlayer.ipAddress;
+					}
+					m_Console.SendResult (string.Concat (new object[]
+			{
+				string.Empty,
+				++num,
+				". id=",
+				current.Value.fd008f,
+				", ",
+				current.Value.EntityName,
+				", pos=",
+				current.Value.GetPosition (),
+				", rot=",
+				current.Value.rotation,
+				", remote=",
+				current.Value.fd00b2,
+				", health=",
+				current.Value.Health,
+				", deaths=",
+				current.Value.Died,
+				", zombies=",
+				current.Value.KilledZombies,
+				", players=",
+				current.Value.KilledPlayers,
+				", score=",
+				current.Value.Score,
+				", steamid=",
+				CommonMappingFunctions.GetSteamID (ci),
+				", ip=",
+				ip,
+				", ping=",
+				current.Value.pingToServer
+			}
+					)
+					);
+				}
+				m_Console.SendResult ("Total of " + w.playerEntities.list.Count + " in the game");
+			} catch (Exception e) {
+				Log.Out ("Error in ListPlayersExtended.Run: " + e);
+			}
+		}
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/CustomCommands/PrivateMassageConnections.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CustomCommands/PrivateMassageConnections.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/CustomCommands/PrivateMassageConnections.cs	(revision 130)
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace AllocsFixes.CustomCommands
+{
+	public class PrivateMassageConnections
+	{
+		private static Dictionary<ClientInfo, ClientInfo> senderOfLastPM = new Dictionary<ClientInfo, ClientInfo> ();
+
+		public static void SetLastPMSender (ClientInfo _sender, ClientInfo _receiver)
+		{
+			if (senderOfLastPM.ContainsKey (_receiver))
+				senderOfLastPM [_receiver] = _sender;
+			else
+				senderOfLastPM.Add (_receiver, _sender);
+		}
+
+		public static ClientInfo GetLastPMSenderForPlayer (ClientInfo _player)
+		{
+			if (senderOfLastPM.ContainsKey (_player))
+				return senderOfLastPM [_player];
+			return null;
+		}
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/CustomCommands/RemoveLandProtection.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CustomCommands/RemoveLandProtection.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/CustomCommands/RemoveLandProtection.cs	(revision 130)
@@ -0,0 +1,102 @@
+using System;
+using System.Collections.Generic;
+
+namespace AllocsFixes.CustomCommands
+{
+	public class RemoveLandProtection : ConsoleCommand
+	{
+		public RemoveLandProtection (ConsoleSdtd cons) : base(cons)
+		{
+		}
+
+		public override string Description ()
+		{
+			return "removes the association of a land protection block to the owner";
+		}
+
+		public override string[] Names ()
+		{
+			return new string[] { "removelandprotection", "rlp" };
+		}
+
+		private void removeById (string _id)
+		{
+			try {
+				PersistentPlayerList ppl = CommonMappingFunctions.GetGameManager ().GetPersistentPlayerList ();
+
+				if (_id.Length < 1 || !ppl.Players.ContainsKey (_id)) {
+					m_Console.SendResult ("Not a valid Steam ID or user has never logged on. Use \"listlandprotection\" to get a list of keystones.");
+					return;
+				}
+				if (ppl.Players [_id].LPBlocks == null || ppl.Players [_id].LPBlocks.Count == 0) {
+					m_Console.SendResult ("Player does not own any keystones. Use \"listlandprotection\" to get a list of keystones.");
+					return;
+				}
+
+				List<BlockChangeInfo> changes = new List<BlockChangeInfo> ();
+				foreach (Vector3i pos in ppl.Players[_id].LPBlocks) {
+					BlockChangeInfo bci = new BlockChangeInfo (pos, 0, true);
+					changes.Add (bci);
+				}
+				CommonMappingFunctions.GetGameManager ().SetBlocksRPC (changes);
+
+				m_Console.SendResult ("#" + changes.Count + " Land protection blocks for player \"" + _id + "\" removed");
+			} catch (Exception e) {
+				Log.Out ("Error in RemoveLandProtection.removeById: " + e);
+			}
+		}
+
+		private void removeByPosition (string[] _coords)
+		{
+			try {
+				int x = int.MinValue;
+				int.TryParse (_coords [0], out x);
+				int y = int.MinValue;
+				int.TryParse (_coords [1], out y);
+				int z = int.MinValue;
+				int.TryParse (_coords [2], out z);
+
+				if (x == int.MinValue || y == int.MinValue || z == int.MinValue) {
+					m_Console.SendResult ("At least one of the given coordinates is not a valid integer");
+					return;
+				}
+
+				Vector3i v = new Vector3i (x, y, z);
+
+				PersistentPlayerList ppl = CommonMappingFunctions.GetGameManager ().GetPersistentPlayerList ();
+
+				Dictionary<Vector3i, PersistentPlayerData> d = ppl.positionToLPBlockOwner;
+				if (d == null || !d.ContainsKey (v)) {
+					m_Console.SendResult ("No land protection block at the given position or not a valid position. Use \"listlandprotection\" to get a list of keystones.");
+					return;
+				}
+
+				BlockChangeInfo bci = new BlockChangeInfo (v, 0, true);
+
+				List<BlockChangeInfo> changes = new List<BlockChangeInfo> ();
+				changes.Add (bci);
+
+				CommonMappingFunctions.GetGameManager ().SetBlocksRPC (changes);
+
+				m_Console.SendResult ("Land protection block at (" + v.ToString () + ") removed");
+			} catch (Exception e) {
+				Log.Out ("Error in RemoveLandProtection.removeByPosition: " + e);
+			}
+		}
+
+		public override void Run (string[] _params)
+		{
+			try {
+				if (_params.Length == 1) {
+					removeById (_params [0]);
+				} else if (_params.Length == 3) {
+					removeByPosition (_params);
+				} else {
+					m_Console.SendResult ("Usage: removelandprotection <x> <y> <z>  OR  removelandprotection <steamid>");
+				}
+			} catch (Exception e) {
+				Log.Out ("Error in RemoveLandProtection.Run: " + e);
+			}
+		}
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/CustomCommands/RenderMap.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CustomCommands/RenderMap.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/CustomCommands/RenderMap.cs	(revision 130)
@@ -0,0 +1,36 @@
+using AllocsFixes.MapRendering;
+using System;
+using System.IO;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace AllocsFixes.CustomCommands
+{
+	public class RenderMap : ConsoleCommand
+	{
+		public RenderMap (ConsoleSdtd cons) : base(cons)
+		{
+		}
+
+		public override string Description ()
+		{
+			return "render the current map to a file";
+		}
+
+		public override string[] Names ()
+		{
+			return new string[] { "rendermap", "rm" };
+		}
+
+		public override void Run (string[] _params)
+		{
+			try {
+				AllocsFixes.MapRendering.MapRendering.Instance.RenderFullMap ();
+
+				m_Console.SendResult ("Render map done");
+			} catch (Exception e) {
+				Log.Out ("Error in RenderMap.Run: " + e);
+			}
+		}
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/CustomCommands/Reply.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CustomCommands/Reply.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/CustomCommands/Reply.cs	(revision 130)
@@ -0,0 +1,79 @@
+using System;
+using System.Collections.Generic;
+
+namespace AllocsFixes.CustomCommands
+{
+	public class Reply : ConsoleCommand
+	{
+		public Reply (ConsoleSdtd cons) : base(cons)
+		{
+		}
+
+		public override string Description ()
+		{
+			return "send a message to  the player who last sent you a PM";
+		}
+
+		public override string[] Names ()
+		{
+			return new string[] { "reply", "re" };
+		}
+
+		private void SendMessage (ClientInfo _receiver, ClientInfo _sender, string _message)
+		{
+			PrivateMassageConnections.SetLastPMSender (_sender, _receiver);
+			string senderName = CommonMappingFunctions.GetPlayerName (_sender);
+
+			CommonMappingFunctions.GetConnectionManager ().networkView.RPC ("RPC_ChatMessage", _receiver.networkPlayer,
+				new object[] {
+			_message,
+			-1,
+			senderName + " (PM)",
+			true
+		}
+			);
+			string receiverName = CommonMappingFunctions.GetPlayerName (_receiver);
+			m_Console.SendResult ("Message to player " + (receiverName != null ? "\"" + receiverName + "\"" : "unknownName") + " sent with sender \"" + senderName + "\"");
+		}
+
+		private void RunInternal (ClientInfo _sender, string[] _params)
+		{
+			if (_params.Length < 1) {
+				m_Console.SendResult ("Usage: reply <message>");
+				return;
+			}
+
+			string message = _params [0];
+			for (int i = 1; i < _params.Length; i++) {
+				message += " " + _params [i];
+			}
+
+			ClientInfo receiver = PrivateMassageConnections.GetLastPMSenderForPlayer (_sender);
+			if (receiver != null && CommonMappingFunctions.GetClientID (receiver) >= 0) {
+				SendMessage (receiver, _sender, message);
+			} else {
+				if (receiver != null) {
+					m_Console.SendResult ("The sender of the PM you last received is currently not online.");
+				} else {
+					m_Console.SendResult ("You have not received a PM so far.");
+				}
+			}
+		}
+
+		public override void ExecuteRemote (string _sender, string[] _params)
+		{
+			try {
+				m_Console.SendResult (string.Format ("{0} executing remote command '{1}' {2}", _sender, this.Names () [0], string.Join (" ", _params)));
+				ClientInfo ci = CommonMappingFunctions.GetClientInfoFromSteamID (_sender);
+				RunInternal (ci, _params);
+			} catch (Exception e) {
+				Log.Out ("Error in Reply.ExecuteRemote: " + e);
+			}
+		}
+
+		public override void Run (string[] _params)
+		{
+			Log.Out ("Command \"reply\" can only be used on clients!");
+		}
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/CustomCommands/SayToPlayer.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CustomCommands/SayToPlayer.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/CustomCommands/SayToPlayer.cs	(revision 130)
@@ -0,0 +1,83 @@
+using System;
+using System.Collections.Generic;
+
+namespace AllocsFixes.CustomCommands
+{
+	public class SayToPlayer : ConsoleCommand
+	{
+		public SayToPlayer (ConsoleSdtd cons) : base(cons)
+		{
+		}
+
+		public override string Description ()
+		{
+			return "send a message to a single player";
+		}
+
+		public override string[] Names ()
+		{
+			return new string[] { "sayplayer", "pm" };
+		}
+
+		private void SendMessage (ClientInfo _receiver, ClientInfo _sender, string _message)
+		{
+			string senderName;
+			if (_sender != null) {
+				PrivateMassageConnections.SetLastPMSender (_sender, _receiver);
+				senderName = CommonMappingFunctions.GetPlayerName (_sender);
+			} else {
+				senderName = "Server";
+			}
+			CommonMappingFunctions.GetConnectionManager ().networkView.RPC ("RPC_ChatMessage", _receiver.networkPlayer,
+				new object[] {
+			_message,
+			-1,
+			senderName + " (PM)",
+			true
+		}
+			);
+			string receiverName = CommonMappingFunctions.GetPlayerName (_receiver);
+			m_Console.SendResult ("Message to player " + (receiverName != null ? "\"" + receiverName + "\"" : "unknownName") + " sent with sender \"" + senderName + "\"");
+		}
+
+		private void RunInternal (ClientInfo _sender, string[] _params)
+		{
+			if (_params.Length < 2) {
+				m_Console.SendResult ("Usage: sayplayer <playername|entityid> <message>");
+				return;
+			}
+
+			string message = _params [1];
+			for (int i = 2; i < _params.Length; i++) {
+				message += " " + _params [i];
+			}
+
+			ClientInfo receiver = CommonMappingFunctions.GetClientInfoFromNameOrID (_params [0], true);
+			if (receiver != null) {
+				SendMessage (receiver, _sender, message);
+			} else {
+				m_Console.SendResult ("Playername or entity ID not found.");
+			}
+		}
+
+		public override void ExecuteRemote (string _sender, string[] _params)
+		{
+			try {
+				this.m_Console.SendResult (string.Format ("{0} executing remote command '{1}' {2}", _sender, this.Names () [0], string.Join (" ", _params)));
+				ClientInfo ci = CommonMappingFunctions.GetClientInfoFromSteamID (_sender);
+				RunInternal (ci, _params);
+			} catch (Exception e) {
+				Log.Out ("Error in SayToPlayer.ExecuteRemote: " + e);
+			}
+		}
+
+		public override void Run (string[] _params)
+		{
+			try {
+				RunInternal (null, _params);
+			} catch (Exception e) {
+				Log.Out ("Error in SayToPlayer.Run: " + e);
+			}
+		}
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/CustomCommands/SetTimeReal.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CustomCommands/SetTimeReal.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/CustomCommands/SetTimeReal.cs	(revision 130)
@@ -0,0 +1,67 @@
+using System;
+
+namespace AllocsFixes.CustomCommands
+{
+	public class SetTimeReal : ConsoleCommand
+	{
+		public SetTimeReal (ConsoleSdtd cons) : base(cons)
+		{
+		}
+
+		public override string Description ()
+		{
+			return "set current ingame time, params: <day> <hour> <min>";
+		}
+
+		public override string[] Names ()
+		{
+			return new string[] { "settimereal", "str" };
+		}
+
+		public override void Run (string[] _params)
+		{
+			try {
+				if (_params.Length != 3) {
+					m_Console.SendResult ("Usage: settimereal <day> <hour> <min>");
+					return;
+				}
+
+				int day, hour, min;
+				if (!int.TryParse (_params [0], out day)) {
+					m_Console.SendResult ("Could not parse day number \"" + _params [0] + "\"");
+					return;
+				}
+				if (day < 1) {
+					m_Console.SendResult ("Day must be >= 1");
+					return;
+				}
+				if (!int.TryParse (_params [1], out hour)) {
+					m_Console.SendResult ("Could not parse hour \"" + _params [1] + "\"");
+					return;
+				}
+				if (hour > 23) {
+					m_Console.SendResult ("Hour must be <= 23");
+					return;
+				}
+				if (!int.TryParse (_params [2], out min)) {
+					m_Console.SendResult ("Could not parse minute \"" + _params [2] + "\"");
+					return;
+				}
+				if (min > 59) {
+					m_Console.SendResult ("Minute must be <= 59");
+					return;
+				}
+				if ((day < 1) || (hour < 8 && day < 1)) {
+					m_Console.SendResult ("Time may not be prior to day 1, 8:00");
+					return;
+				}
+
+				ulong time = ((ulong)(day - 1) * 24000) + ((ulong)hour * 1000) + ((ulong)min * 1000 / 60) - 8000;
+				m_Console.gameManager.World.gameTime = time;
+				m_Console.SendResult (String.Format ("Set time to Day {0}, {1:00}:{2:00} = {3}", day, hour, min, time));
+			} catch (Exception e) {
+				Log.Out ("Error in SetTimeReal.Run: " + e);
+			}
+		}
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/CustomCommands/ShowInventory.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CustomCommands/ShowInventory.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/CustomCommands/ShowInventory.cs	(revision 130)
@@ -0,0 +1,70 @@
+using System;
+using System.Collections.Generic;
+
+namespace AllocsFixes.CustomCommands
+{
+	public class ShowInventory : ConsoleCommand
+	{
+		private GameManager manager;
+
+		public ShowInventory (ConsoleSdtd cons) : base(cons)
+		{
+			manager = m_Console.gameManager;
+		}
+
+		public override string Description ()
+		{
+			return "list inventory of a given player (entity id or name)";
+		}
+
+		public override string[] Names ()
+		{
+			return new string[] { "showinventory", "si" };
+		}
+
+		public override void Run (string[] _params)
+		{
+			try {
+				if (_params.Length < 1) {
+					m_Console.SendResult ("Usage: showinventory <playername|entityid>");
+					return;
+				}
+
+				int entityId = -1;
+				PlayerDataStuff.PlayerItems items = null;
+				if (int.TryParse (_params [0], out entityId)) {
+					items = PlayerDataStuff.GetPlayerItems (entityId);
+				}
+
+				if (items == null) {
+					string playerName = _params [0].ToLower ();
+					foreach (KeyValuePair<int, EntityPlayer> kvp in manager.World.playerEntities.dict) {
+						if (kvp.Value.EntityName.ToLower ().Equals (playerName)) {
+							entityId = kvp.Key;
+							break;
+						}
+					}
+				}
+				items = PlayerDataStuff.GetPlayerItems (entityId);
+
+				if (items == null) {
+					m_Console.SendResult ("Playername or entity id not found or no inventory saved (first saved after a player has been online for 30s).");
+					return;
+				}
+
+				m_Console.SendResult ("Belt of player:");
+				foreach (KeyValuePair<string, int> kvp in items.belt) {
+					m_Console.SendResult (string.Format ("    {0:000} * {1}", kvp.Value, kvp.Key));
+				}
+				m_Console.SendResult (string.Empty);
+				m_Console.SendResult ("Bagpack of player:");
+				foreach (KeyValuePair<string, int> kvp in items.bag) {
+					m_Console.SendResult (string.Format ("    {0:000} * {1}", kvp.Value, kvp.Key));
+				}
+				m_Console.SendResult (string.Empty);
+			} catch (Exception e) {
+				Log.Out ("Error in ShowInventory.Run: " + e);
+			}
+		}
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/CustomCommands/Version.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/CustomCommands/Version.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/CustomCommands/Version.cs	(revision 130)
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+
+namespace AllocsFixes.CustomCommands
+{
+	public class Version : ConsoleCommand
+	{
+		public Version (ConsoleSdtd cons) : base(cons)
+		{
+		}
+
+		public override string Description ()
+		{
+			return "get the currently running version of the server fixes";
+		}
+
+		public override string[] Names ()
+		{
+			return new string[] { "version", string.Empty };
+		}
+
+		public override void Run (string[] _params)
+		{
+			try {
+				m_Console.SendResult ("Server fixes version: " + Assembly.GetExecutingAssembly ().GetName ().Version);
+			} catch (Exception e) {
+				Log.Out ("Error in Version.Run: " + e);
+			}
+		}
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/MapRendering/Constants.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/MapRendering/Constants.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/MapRendering/Constants.cs	(revision 130)
@@ -0,0 +1,14 @@
+using System;
+
+namespace AllocsFixes.MapRendering
+{
+	public class Constants
+	{
+		public const int MAP_BLOCK_SIZE = 128;
+		public const int MAP_CHUNK_SIZE = 16;
+		public const int MAP_BLOCK_TO_CHUNK_DIV = MAP_BLOCK_SIZE / MAP_CHUNK_SIZE;
+		public const int ZOOMLEVELS = 5;
+		public static string MAP_DIRECTORY = string.Empty;
+	}
+}
+
Index: /binary-improvements/7dtd-server-fixes/src/MapRendering/MapRenderBlockBuffer.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/MapRendering/MapRenderBlockBuffer.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/MapRendering/MapRenderBlockBuffer.cs	(revision 130)
@@ -0,0 +1,89 @@
+using System;
+using System.IO;
+using System.Threading;
+using UnityEngine;
+
+namespace AllocsFixes.MapRendering
+{
+	public class MapRenderBlockBuffer
+	{
+		private int zoomLevel;
+		private string currentBlockMap = string.Empty;
+		private Texture2D blockMap = new Texture2D (Constants.MAP_BLOCK_SIZE, Constants.MAP_BLOCK_SIZE);
+		private Texture2D zoomBuffer = new Texture2D (1, 1);
+		private Color nullColor = new Color (0, 0, 0, 0);
+
+		public MapRenderBlockBuffer (int level)
+		{
+			zoomLevel = level;
+		}
+
+		public void SaveBlock ()
+		{
+			try {
+				if (currentBlockMap.Length > 0)
+					saveTextureToFile (currentBlockMap);
+			} catch (Exception e) {
+				Log.Out ("Exception in MapRenderBlockBuffer.SaveBlock(): " + e);
+			}
+		}
+
+		public void LoadBlock (Vector2i block)
+		{
+			Monitor.Enter (blockMap);
+			try {
+				string folder = Constants.MAP_DIRECTORY + "/" + (zoomLevel) + "/" + block.x;
+				string fileName = folder + "/" + block.y + ".png";
+				Directory.CreateDirectory (folder);
+				if (!fileName.Equals (currentBlockMap)) {
+					if (currentBlockMap.Length > 0)
+						saveTextureToFile (currentBlockMap);
+					loadTextureFromFile (fileName);
+				}
+				currentBlockMap = fileName;
+			} finally {
+				Monitor.Exit (blockMap);
+			}
+		}
+
+		public void SetPart (Vector2i offset, int partSize, Color[] pixels)
+		{
+			blockMap.SetPixels (offset.x, offset.y, partSize, partSize, pixels);
+		}
+
+		public Color[] GetHalfScaled ()
+		{
+			zoomBuffer.Resize (Constants.MAP_BLOCK_SIZE, Constants.MAP_BLOCK_SIZE);
+			zoomBuffer.SetPixels (blockMap.GetPixels ());
+
+			TextureScale.Point (zoomBuffer, Constants.MAP_BLOCK_SIZE / 2, Constants.MAP_BLOCK_SIZE / 2);
+
+			return zoomBuffer.GetPixels ();
+		}
+
+		private void loadTextureFromFile (string _fileName)
+		{
+			try {
+				byte[] array = File.ReadAllBytes (_fileName);
+				blockMap.LoadImage (array);
+			} catch (Exception) {
+				for (int x = 0; x < Constants.MAP_BLOCK_SIZE; x++) {
+					for (int y = 0; y < Constants.MAP_BLOCK_SIZE; y++) {
+						blockMap.SetPixel (x, y, nullColor);
+					}
+				}
+			}
+		}
+
+		private void saveTextureToFile (string _fileName)
+		{
+			try {
+				byte[] array = blockMap.EncodeToPNG ();
+				File.WriteAllBytes (_fileName, array);
+			} catch (Exception e) {
+				Log.Out ("Exception in MapRenderBlockBuffer.saveTextureToFile(): " + e);
+			}
+		}
+
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/MapRendering/MapRendering.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/MapRendering/MapRendering.cs	(revision 130)
+++ /binary-improvements/7dtd-server-fixes/src/MapRendering/MapRendering.cs	(revision 130)
@@ -0,0 +1,231 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Threading;
+using UnityEngine;
+
+namespace AllocsFixes.MapRendering
+{
+	public class MapRendering
+	{
+		private static MapRendering instance;
+
+		public static MapRendering Instance {
+			get {
+				if (instance == null) {
+					instance = new MapRendering ();
+				}
+				return instance;
+			}
+		}
+
+		private RegionFileManager rfm;
+		private Texture2D fullMapTexture;
+		private MapRenderBlockBuffer[] zoomLevelBuffers = new MapRenderBlockBuffer[Constants.ZOOMLEVELS];
+		private Color[] chunkColors = new Color[Constants.MAP_CHUNK_SIZE * Constants.MAP_CHUNK_SIZE];
+		private System.Timers.Timer chunkSaveTimer = new System.Timers.Timer (100);
+		private bool renderingFullMap = false;
+
+		private MapRendering ()
+		{
+			string regionSaveDir = StaticDirectories.GetSaveGameRegionDir ();
+			rfm = new RegionFileManager (regionSaveDir, regionSaveDir, 1, false);
+			Constants.MAP_DIRECTORY = StaticDirectories.GetSaveGameDir () + "/map";
+
+			for (int i = 0; i < Constants.ZOOMLEVELS; i++) {
+				zoomLevelBuffers [i] = new MapRenderBlockBuffer (i);
+			}
+
+			chunkSaveTimer.AutoReset = false;
+			chunkSaveTimer.Elapsed += new System.Timers.ElapsedEventHandler (SaveAllBlockMaps);
+		}
+
+		public static void RenderSingleChunk (Chunk chunk)
+		{
+			ThreadPool.QueueUserWorkItem ((o) =>
+			{
+				try {
+					if (!Instance.renderingFullMap) {
+						Chunk c = (Chunk)o;
+						Vector3i cPos = c.GetWorldPos ();
+						Vector2i cPos2 = new Vector2i(cPos.x / Constants.MAP_CHUNK_SIZE, cPos.z / Constants.MAP_CHUNK_SIZE);
+						Instance.RenderChunk (c, cPos2);
+						Instance.chunkSaveTimer.Stop ();
+						Instance.chunkSaveTimer.Start ();
+					}
+				} catch (Exception e) {
+					Log.Out ("Exception in MapRendering.RenderSingleChunk(): " + e);
+				}
+			}, chunk);
+		}
+
+		public void RenderFullMap ()
+		{
+			MicroStopwatch microStopwatch = new MicroStopwatch ();
+
+			if (Directory.Exists (Constants.MAP_DIRECTORY))
+				Directory.Delete (Constants.MAP_DIRECTORY, true);
+
+			renderingFullMap = true;
+
+			Vector2i minChunk, maxChunk;
+			Vector2i minPos, maxPos;
+			int widthChunks, heightChunks, widthPix, heightPix;
+			getWorldExtent (out minChunk, out maxChunk, out minPos, out maxPos, out widthChunks, out heightChunks, out widthPix, out heightPix);
+
+			fullMapTexture = new Texture2D (widthPix, heightPix);
+
+			Vector2i curFullMapPos;
+			Vector2i curChunkPos;
+			for (curFullMapPos.x = 0; curFullMapPos.x < widthPix; curFullMapPos.x += Constants.MAP_CHUNK_SIZE) {
+				for (curFullMapPos.y = 0; curFullMapPos.y < heightPix; curFullMapPos.y += Constants.MAP_CHUNK_SIZE) {
+					curChunkPos.x = (curFullMapPos.x / Constants.MAP_CHUNK_SIZE) + minChunk.x;
+					curChunkPos.y = (curFullMapPos.y / Constants.MAP_CHUNK_SIZE) + minChunk.y;
+
+					RenderChunk (curChunkPos, curFullMapPos);
+				}
+				Log.Out (String.Format ("RenderMap: {0}/{1} ({2}%)", curFullMapPos.x, widthPix, (int)((float)curFullMapPos.x / widthPix * 100)));
+			}
+			SaveAllBlockMaps (null, null);
+
+			byte[] array = fullMapTexture.EncodeToPNG ();
+			File.WriteAllBytes (Constants.MAP_DIRECTORY+ "/map.png", array);
+			Texture2D.Destroy (fullMapTexture);
+
+			renderingFullMap = false;
+
+			Log.Out ("Generating map took: " + microStopwatch.ElapsedMilliseconds + " ms");
+			Log.Out ("World extent: " + minPos + " - " + maxPos);
+		}
+
+		private int saveCount = 0;
+
+		private void SaveAllBlockMaps (object source, System.Timers.ElapsedEventArgs e)
+		{
+			Monitor.Enter (zoomLevelBuffers);
+			try {
+				Log.Out ("------- SaveAllBlockMaps " + ++saveCount);
+				for (int i = 0; i < Constants.ZOOMLEVELS; i++) {
+					zoomLevelBuffers[i].SaveBlock();
+				}
+			} finally {
+				Monitor.Exit (zoomLevelBuffers);
+			}
+		}
+
+		private bool RenderChunk (Vector2i chunkPos, Vector2i fullMapPos = default(Vector2i))
+		{
+			long chunkKey = WorldChunkCache.MakeChunkKey (chunkPos.x, chunkPos.y);
+			if (rfm.ContainsChunkSync (chunkKey)) {
+				Chunk chunk = rfm.GetChunkSync (chunkKey);
+				return RenderChunk (chunk, chunkPos, fullMapPos);
+			}
+			return false;
+		}
+
+		private bool RenderChunk (Chunk chunk, Vector2i chunkPos, Vector2i fullMapPos = default(Vector2i))
+		{
+			Monitor.Enter (zoomLevelBuffers);
+			try {
+				ushort[] mapColors = chunk.GetMapColors ();
+				if (mapColors != null) {
+					Vector2i block, blockOffset;
+					getBlockNumber (chunkPos, out block, out blockOffset, Constants.MAP_BLOCK_TO_CHUNK_DIV, Constants.MAP_CHUNK_SIZE);
+
+					for (int i_colors = 0; i_colors < mapColors.Length; i_colors++) {
+						chunkColors [i_colors] = shortColorToColor (mapColors [i_colors]);
+					}
+
+					zoomLevelBuffers[Constants.ZOOMLEVELS - 1].LoadBlock(block);
+					zoomLevelBuffers[Constants.ZOOMLEVELS - 1].SetPart(blockOffset, Constants.MAP_CHUNK_SIZE, chunkColors);
+
+					if (renderingFullMap)
+						fullMapTexture.SetPixels (fullMapPos.x, fullMapPos.y, Constants.MAP_CHUNK_SIZE, Constants.MAP_CHUNK_SIZE, chunkColors);
+
+					RenderZoomLevel (Constants.ZOOMLEVELS - 1, block);
+
+					return true;
+				}
+				return false;
+			} finally {
+				Monitor.Exit (zoomLevelBuffers);
+			}
+		}
+
+		private void RenderZoomLevel (int level, Vector2i innerBlock)
+		{
+			if (level > 0) {
+				Vector2i block, blockOffset;
+				getBlockNumber(innerBlock, out block, out blockOffset, 2, Constants.MAP_BLOCK_SIZE / 2);
+
+				zoomLevelBuffers[level - 1].LoadBlock(block);
+				zoomLevelBuffers[level - 1].SetPart (blockOffset, Constants.MAP_BLOCK_SIZE / 2, zoomLevelBuffers[level].GetHalfScaled());
+
+				RenderZoomLevel (level - 1, block);
+			}
+		}
+
+		private void getBlockNumber (Vector2i innerPos, out Vector2i block, out Vector2i blockOffset, int scaleFactor, int offsetSize)
+		{
+			block.x = ((innerPos.x + 16777216) / scaleFactor) - (16777216 / scaleFactor);
+			block.y = ((innerPos.y + 16777216) / scaleFactor) - (16777216 / scaleFactor);
+			blockOffset.x = ((innerPos.x + 16777216) % scaleFactor) * offsetSize;
+			blockOffset.y = ((innerPos.y + 16777216) % scaleFactor) * offsetSize;
+		}
+
+		private void getWorldExtent (out Vector2i minChunk, out Vector2i maxChunk,
+	                                    out Vector2i minPos, out Vector2i maxPos,
+	                                    out int widthChunks, out int heightChunks,
+	                                    out int widthPix, out int heightPix)
+		{
+			long[] keys = rfm.GetAllChunkKeys ();
+			int minX = Int32.MaxValue;
+			int minY = Int32.MaxValue;
+			int maxX = Int32.MinValue;
+			int maxY = Int32.MinValue;
+			foreach (long key in keys) {
+				int x = WorldChunkCache.extractX (key);
+				int y = WorldChunkCache.extractZ (key);
+
+				if (x < minX)
+					minX = x;
+				if (x > maxX)
+					maxX = x;
+				if (y < minY)
+					minY = y;
+				if (y > maxY)
+					maxY = y;
+			}
+
+			minChunk.x = minX;
+			minChunk.y = minY;
+
+			maxChunk.x = maxX;
+			maxChunk.y = maxY;
+
+			minPos.x = minX * Constants.MAP_CHUNK_SIZE;
+			minPos.y = minY * Constants.MAP_CHUNK_SIZE;
+
+			maxPos.x = maxX * Constants.MAP_CHUNK_SIZE;
+			maxPos.y = maxY * Constants.MAP_CHUNK_SIZE;
+
+			widthChunks = maxX - minX + 1;
+			heightChunks = maxY - minY + 1;
+
+			widthPix = widthChunks * Constants.MAP_CHUNK_SIZE;
+			heightPix = heightChunks * Constants.MAP_CHUNK_SIZE;
+		}
+
+
+		private Color32 shortColorToColor32 (ushort col)
+		{
+			return new Color32 ((byte)((float)(col >> 10 & 31) / 31f * 255f), (byte)((float)(col >> 5 & 31) / 31f * 255f), (byte)((float)(col & 31) / 31f * 255f), 255);
+		}
+
+		private Color shortColorToColor (ushort col)
+		{
+			return new Color (((float)(col >> 10 & 31) / 31f), ((float)(col >> 5 & 31) / 31f), ((float)(col & 31) / 31f), 255);
+		}
+
+	}
+}
Index: /binary-improvements/7dtd-server-fixes/src/PlayerDataStuff.cs
===================================================================
--- /binary-improvements/7dtd-server-fixes/src/PlayerDataStuff.cs	(revision 129)
+++ /binary-improvements/7dtd-server-fixes/src/PlayerDataStuff.cs	(revision 130)
@@ -2,61 +2,63 @@
 using System.Collections.Generic;
 
-public class PlayerDataStuff
+namespace AllocsFixes
 {
-	public class PlayerItems
+	public class PlayerDataStuff
 	{
-		public SortedList<string, int> belt = new SortedList<string, int> ();
-		public SortedList<string, int> bag = new SortedList<string, int> ();
+		public class PlayerItems
+		{
+			public SortedList<string, int> belt = new SortedList<string, int> ();
+			public SortedList<string, int> bag = new SortedList<string, int> ();
 
-		public PlayerItems (InventoryField[] _belt, InventoryField[] _bag)
-		{
-			foreach (InventoryField item in _belt) {
-				if (item.count > 0) {
-					string name = getInvFieldName (item);
-					if (belt.ContainsKey (name)) {
-						belt [name] += item.count;
-					} else {
-						belt.Add (name, item.count);
+			public PlayerItems (InventoryField[] _belt, InventoryField[] _bag)
+			{
+				foreach (InventoryField item in _belt) {
+					if (item.count > 0) {
+						string name = getInvFieldName (item);
+						if (belt.ContainsKey (name)) {
+							belt [name] += item.count;
+						} else {
+							belt.Add (name, item.count);
+						}
+					}
+				}
+
+				foreach (InventoryField item in _bag) {
+					if (item.count > 0) {
+						string name = getInvFieldName (item);
+						if (bag.ContainsKey (name)) {
+							bag [name] += item.count;
+						} else {
+							bag.Add (name, item.count);
+						}
 					}
 				}
 			}
+		};
 
-			foreach (InventoryField item in _bag) {
-				if (item.count > 0) {
-					string name = getInvFieldName (item);
-					if (bag.ContainsKey (name)) {
-						bag [name] += item.count;
-					} else {
-						bag.Add (name, item.count);
-					}
+		private static Dictionary<int, PlayerItems> itemsPerEntityId = new Dictionary<int, PlayerItems> ();
+
+		public static PlayerItems GetPlayerItems (int entityId)
+		{
+			if (itemsPerEntityId.ContainsKey (entityId))
+				return itemsPerEntityId [entityId];
+			else
+				return null;
+		}
+
+		public static void GM_SavePlayerData (GameManager manager, int _clientId, PlayerDataFile _playerDataFile)
+		{
+			try {
+				int entityId = CommonMappingFunctions.GetEntityID (CommonMappingFunctions.GetClientInfoFromClientID (_clientId));
+				if (entityId >= 0) {
+					Log.Out ("Saving playerData for entity id: " + entityId);
+
+					if (itemsPerEntityId.ContainsKey (entityId))
+						itemsPerEntityId.Remove (entityId);
+					itemsPerEntityId.Add (entityId, new PlayerItems (_playerDataFile.inventory, _playerDataFile.bag));
 				}
+			} catch (Exception e) {
+				Log.Out ("Error in GM_SavePlayerData: " + e);
 			}
-		}
-	};
-
-	private static Dictionary<int, PlayerItems> itemsPerEntityId = new Dictionary<int, PlayerItems> ();
-
-	public static PlayerItems GetPlayerItems (int entityId)
-	{
-		if (itemsPerEntityId.ContainsKey (entityId))
-			return itemsPerEntityId [entityId];
-		else
-			return null;
-	}
-
-	public static void GM_SavePlayerData (GameManager manager, int _clientId, PlayerDataFile _playerDataFile)
-	{
-		try {
-			int entityId = CommonMappingFunctions.GetEntityID (CommonMappingFunctions.GetClientInfoFromClientID (_clientId));
-			if (entityId >= 0) {
-				Log.Out ("Saving playerData for entity id: " + entityId);
-
-				if (itemsPerEntityId.ContainsKey (entityId))
-					itemsPerEntityId.Remove (entityId);
-				itemsPerEntityId.Add (entityId, new PlayerItems (_playerDataFile.inventory, _playerDataFile.bag));
-			}
-		} catch (Exception e) {
-			Log.Out ("Error in GM_SavePlayerData: " + e);
-		}
 
 //		Log.Out ("Inventory of player:");
@@ -71,20 +73,8 @@
 //			printItem (item, i);
 //		}
-	}
+		}
 
-	private static string getInvFieldName (InventoryField item)
-	{
-		ItemBase iBase = ItemBase.list [item.itemValue.type];
-		string name = iBase.name;
-		if (iBase.IsBlock ()) {
-			ItemBlock iBlock = (ItemBlock)iBase;
-			name = iBlock.GetItemName (item.itemValue);
-		}
-		return name;
-	}
-
-	private static void printItem (InventoryField item, int slot)
-	{
-		if (item.count > 0) {
+		private static string getInvFieldName (InventoryField item)
+		{
 			ItemBase iBase = ItemBase.list [item.itemValue.type];
 			string name = iBase.name;
@@ -93,8 +83,21 @@
 				name = iBlock.GetItemName (item.itemValue);
 			}
-			Log.Out (string.Format ("Slot {0:00}: {1:00} * {2}, blockinst={3}, meta={4}, type={5}, usetimes={6}",
-			                        slot, item.count, name, item.itemValue.blockinst, item.itemValue.meta, item.itemValue.type, item.itemValue.usetimes));
+			return name;
+		}
+
+		private static void printItem (InventoryField item, int slot)
+		{
+			if (item.count > 0) {
+				ItemBase iBase = ItemBase.list [item.itemValue.type];
+				string name = iBase.name;
+				if (iBase.IsBlock ()) {
+					ItemBlock iBlock = (ItemBlock)iBase;
+					name = iBlock.GetItemName (item.itemValue);
+				}
+				Log.Out (string.Format ("Slot {0:00}: {1:00} * {2}, blockinst={3}, meta={4}, type={5}, usetimes={6}",
+			                        slot, item.count, name, item.itemValue.blockinst, item.itemValue.meta, item.itemValue.type, item.itemValue.usetimes)
+				);
+			}
 		}
 	}
 }
-
Index: /binary-improvements/assembly-patcher/Main.cs
===================================================================
--- /binary-improvements/assembly-patcher/Main.cs	(revision 129)
+++ /binary-improvements/assembly-patcher/Main.cs	(revision 130)
@@ -35,5 +35,5 @@
 		{
 			TypeDefinition type = module.GetType ("Chunk");
-			addHook (type, "CalcMapColors", true, 0, true, typeof(MapRendering).GetMethod ("RenderSingleChunk"));
+			addHook (type, "CalcMapColors", true, 0, true, typeof(AllocsFixes.MapRendering.MapRendering).GetMethod ("RenderSingleChunk"));
 		}
 
@@ -41,7 +41,7 @@
 		{
 			TypeDefinition type = module.GetType ("ConsoleSdtd");
-			replaceMethod (type, "ExecuteCmdFromClient", true, 3, typeof(ConsoleOutputSeparator).GetMethod ("C_ExecuteCmdFromClient"));
-			addHook (type, "Run", true, 0, true, typeof(ConsoleOutputSeparator).GetMethod ("C_Run"));
-			replaceMethod (type, "SendResult", true, 1, typeof(ConsoleOutputSeparator).GetMethod ("C_SendResult"));
+			replaceMethod (type, "ExecuteCmdFromClient", true, 3, typeof(AllocsFixes.ConsoleOutputSeparator).GetMethod ("C_ExecuteCmdFromClient"));
+			addHook (type, "Run", true, 0, true, typeof(AllocsFixes.ConsoleOutputSeparator).GetMethod ("C_Run"));
+			replaceMethod (type, "SendResult", true, 1, typeof(AllocsFixes.ConsoleOutputSeparator).GetMethod ("C_SendResult"));
 		}
 
@@ -49,6 +49,6 @@
 		{
 			TypeDefinition type = module.GetType ("GameManager");
-			addHook (type, "SavePlayerData", true, 2, true, typeof(PlayerDataStuff).GetMethod ("GM_SavePlayerData"));
-			addHook (type, "Awake", true, 0, true, typeof(CommandExtensions).GetMethod ("InitCommandExtensions"));
+			addHook (type, "SavePlayerData", true, 2, true, typeof(AllocsFixes.PlayerDataStuff).GetMethod ("GM_SavePlayerData"));
+			addHook (type, "Awake", true, 0, true, typeof(AllocsFixes.CommandExtensions).GetMethod ("InitCommandExtensions"));
 		}
 
@@ -56,5 +56,5 @@
 		{
 			TypeDefinition type = module.GetType ("AdminTools");
-			replaceMethod (type, "GetAllowedCommandsList", true, 1, typeof(AdminToolsStuff).GetMethod ("GetAllowedCommandsList"));
+			replaceMethod (type, "GetAllowedCommandsList", true, 1, typeof(AllocsFixes.AdminToolsStuff).GetMethod ("GetAllowedCommandsList"));
 		}
 
@@ -62,5 +62,5 @@
 		{
 			TypeDefinition type = module.GetType ("GameManager");
-			addHook (type, "RequestToSpawnPlayer", true, 5, true, typeof(AllocsLogFunctions).GetMethod ("RequestToSpawnPlayer"));
+			addHook (type, "RequestToSpawnPlayer", true, 5, true, typeof(AllocsFixes.AllocsLogFunctions).GetMethod ("RequestToSpawnPlayer"));
 		}
 
@@ -68,8 +68,8 @@
 		{
 			TypeDefinition type = module.GetType ("NetTelnetServer");
-			replaceMethod (type, ".ctor", false, 1, typeof(AllocsNetTelnetServer).GetMethod ("init"));
-			replaceMethod (type, "Disconnect", false, 0, typeof(AllocsNetTelnetServer).GetMethod ("Disconnect"));
-			replaceMethod (type, "SetConsole", false, 1, typeof(AllocsNetTelnetServer).GetMethod ("SetConsole"));
-			replaceMethod (type, "WriteToClient", false, 1, typeof(AllocsNetTelnetServer).GetMethod ("WriteToClient"));
+			replaceMethod (type, ".ctor", false, 1, typeof(AllocsFixes.AllocsNetTelnetServer).GetMethod ("init"));
+			replaceMethod (type, "Disconnect", false, 0, typeof(AllocsFixes.AllocsNetTelnetServer).GetMethod ("Disconnect"));
+			replaceMethod (type, "SetConsole", false, 1, typeof(AllocsFixes.AllocsNetTelnetServer).GetMethod ("SetConsole"));
+			replaceMethod (type, "WriteToClient", false, 1, typeof(AllocsFixes.AllocsNetTelnetServer).GetMethod ("WriteToClient"));
 		}
 
Index: /binary-improvements/server-fixes.userprefs
===================================================================
--- /binary-improvements/server-fixes.userprefs	(revision 129)
+++ /binary-improvements/server-fixes.userprefs	(revision 130)
@@ -1,11 +1,16 @@
 ﻿<Properties>
   <MonoDevelop.Ide.Workspace ActiveConfiguration="Release" />
-  <MonoDevelop.Ide.Workbench ActiveDocument="7dtd-server-fixes/src/TelnetCommands/RemoveLandProtection.cs">
+  <MonoDevelop.Ide.Workbench ActiveDocument="7dtd-server-fixes/src/TelnetCommands/RenderMap.cs">
     <Files>
-      <File FileName="assembly-patcher/Main.cs" Line="10" Column="3" />
-      <File FileName="7dtd-server-fixes/src/AssemblyInfo.cs" Line="20" Column="34" />
-      <File FileName="7dtd-server-fixes/src/TelnetCommands/ListPlayersExtended.cs" Line="45" Column="17" />
+      <File FileName="assembly-patcher/Main.cs" Line="37" Column="101" />
       <File FileName="7dtd-server-fixes/src/AllocsNetTelnetServer.cs" Line="1" Column="1" />
-      <File FileName="7dtd-server-fixes/src/TelnetCommands/RemoveLandProtection.cs" Line="41" Column="47" />
+      <File FileName="7dtd-server-fixes/src/TelnetCommands/RemoveLandProtection.cs" Line="52" Column="1" />
+      <File FileName="7dtd-server-fixes/src/CommandExtensions.cs" Line="18" Column="4" />
+      <File FileName="7dtd-server-fixes/src/TelnetCommands/ShowInventory.cs" Line="45" Column="5" />
+      <File FileName="7dtd-server-fixes/src/PlayerDataStuff.cs" Line="93" Column="48" />
+      <File FileName="7dtd-server-fixes/src/TelnetCommands/RenderMap.cs" Line="1" Column="18" />
+      <File FileName="7dtd-server-fixes/src/MapRendering/MapRenderBlockBuffer.cs" Line="40" Column="1" />
+      <File FileName="7dtd-server-fixes/src/MapRendering/MapRendering.cs" Line="246" Column="1" />
+      <File FileName="7dtd-server-fixes/src/MapRendering/Constants.cs" Line="5" Column="1" />
     </Files>
   </MonoDevelop.Ide.Workbench>
