Index: binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj
===================================================================
--- binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj	(revision 216)
+++ binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj	(revision 224)
@@ -2,5 +2,5 @@
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
     <ProductVersion>10.0.0</ProductVersion>
@@ -12,18 +12,8 @@
     <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>..\bin\Debug</OutputPath>
-    <DefineConstants>DEBUG;</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <ConsolePause>false</ConsolePause>
-  </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>none</DebugType>
     <Optimize>true</Optimize>
-    <OutputPath>..\bin\Release</OutputPath>
+    <OutputPath>..\bin\7DaysToDie_Data\Managed</OutputPath>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
@@ -33,5 +23,5 @@
     <DebugType>none</DebugType>
     <Optimize>true</Optimize>
-    <OutputPath>..\bin\Release</OutputPath>
+    <OutputPath>..\bin\7DaysToDie_Data\Managed</OutputPath>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
@@ -60,4 +50,7 @@
       <HintPath>..\7dtd-binaries\LogLibrary.dll</HintPath>
     </Reference>
+    <Reference Include="mscorlib">
+      <HintPath>..\7dtd-binaries\mscorlib.dll</HintPath>
+    </Reference>
     <Reference Include="Assembly-CSharp">
       <HintPath>..\7dtd-binaries\Assembly-CSharp.dll</HintPath>
@@ -67,25 +60,7 @@
     <Compile Include="src\AssemblyInfo.cs" />
     <Compile Include="src\AllocsLogFunctions.cs" />
-    <Compile Include="src\AdminToolsStuff.cs" />
     <Compile Include="src\PlayerDataStuff.cs" />
     <Compile Include="src\CommandExtensions.cs" />
     <Compile Include="src\CommonMappingFunctions.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\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\Give.cs" />
-    <Compile Include="src\CustomCommands\ListItems.cs" />
     <Compile Include="src\NetConnections\ConsoleOutputSeparator.cs" />
     <Compile Include="src\NetConnections\NetTelnetServer.cs" />
@@ -94,10 +69,4 @@
     <Compile Include="src\NetConnections\Servers\Telnet\Telnet.cs" />
     <Compile Include="src\NetConnections\Servers\Telnet\TelnetConnection.cs" />
-    <Compile Include="src\NetConnections\Servers\Web\Web.cs" />
-    <Compile Include="src\NetConnections\Servers\Web\PathHandler.cs" />
-    <Compile Include="src\NetConnections\Servers\Web\StaticHandler.cs" />
-    <Compile Include="src\NetConnections\Servers\Web\SimpleRedirectHandler.cs" />
-    <Compile Include="src\NetConnections\Servers\Web\MimeType.cs" />
-    <Compile Include="src\CustomCommands\EnableRendering.cs" />
     <Compile Include="src\PersistentData\PersistentContainer.cs" />
     <Compile Include="src\StateManager.cs" />
@@ -106,8 +75,4 @@
     <Compile Include="src\PersistentData\Players.cs" />
     <Compile Include="src\PersistentData\Player.cs" />
-    <Compile Include="src\CustomCommands\ListKnownPlayers.cs" />
-    <Compile Include="src\NetConnections\Servers\Web\ApiHandler.cs" />
-    <Compile Include="src\NetConnections\Servers\Web\API\GetPlayersOnline.cs" />
-    <Compile Include="src\NetConnections\Servers\Web\API\WebAPI.cs" />
     <Compile Include="src\JSON\JSONNode.cs" />
     <Compile Include="src\JSON\JSONArray.cs" />
@@ -116,13 +81,8 @@
     <Compile Include="src\JSON\JSONString.cs" />
     <Compile Include="src\JSON\JSONBoolean.cs" />
-    <Compile Include="src\NetConnections\Servers\Web\API\GetPlayersLocation.cs" />
-    <Compile Include="src\CustomCommands\TeleportPlayer.cs" />
-    <Compile Include="src\NetConnections\Servers\Web\API\GetPlayerInventory.cs" />
-    <Compile Include="src\NetConnections\Servers\Web\API\GetLandClaims.cs" />
     <Compile Include="src\BlockingQueue.cs" />
     <Compile Include="src\JSON\Parser.cs" />
     <Compile Include="src\JSON\JSONNull.cs" />
     <Compile Include="src\JSON\MalformedJSONException.cs" />
-    <Compile Include="src\CustomCommands\Unban.cs" />
     <Compile Include="src\ItemList.cs" />
     <Compile Include="src\FileCache\AbstractCache.cs" />
@@ -130,18 +90,16 @@
     <Compile Include="src\FileCache\SimpleCache.cs" />
     <Compile Include="src\FileCache\MapTileCache.cs" />
-    <Compile Include="src\CustomCommands\webstat.cs" />
-    <Compile Include="src\CustomCommands\ListPlayerIds.cs" />
+    <Compile Include="src\Mods.cs" />
+    <Compile Include="src\ModAPI.cs" />
+    <Compile Include="src\Version.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <ItemGroup>
     <Folder Include="src\" />
-    <Folder Include="src\MapRendering\" />
     <Folder Include="src\CustomCommands\" />
     <Folder Include="src\NetConnections\" />
     <Folder Include="src\NetConnections\Servers\" />
     <Folder Include="src\NetConnections\Servers\Telnet\" />
-    <Folder Include="src\NetConnections\Servers\Web\" />
     <Folder Include="src\PersistentData\" />
-    <Folder Include="src\NetConnections\Servers\Web\API\" />
     <Folder Include="src\JSON\Parser\" />
     <Folder Include="src\FileCache\" />
Index: binary-improvements/7dtd-server-fixes/src/AdminToolsStuff.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/AdminToolsStuff.cs	(revision 216)
+++ 	(revision )
@@ -1,85 +1,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace AllocsFixes
-{
-	public class AdminToolsStuff
-	{
-		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;
-				}
-
-				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;
-
-			foreach (AdminToolsCommandPermissions atcp in perms) {
-				foreach (string ccName in getAlternativeNames(cmd)) {
-					if (atcp.Command.ToLower ().Equals (ccName)) {
-						return true;
-					}
-				}
-			}
-			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};
-			}
-		}
-	}
-}
Index: binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs	(revision 216)
+++ binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs	(revision 224)
@@ -31,4 +31,6 @@
 				PersistentContainer.Instance.Players [steamId].SetOnline (ci);
 				PersistentData.PersistentContainer.Instance.Save ();
+
+				Mods.CallRequestToSpawnPlayer (_clientId, _name, _chunkViewDim, _playerProfile);
 			} catch (Exception e) {
 				Log.Out ("Error in AllocsLogFunctions.RequestToSpawnPlayer: " + e);
@@ -36,8 +38,8 @@
 		}
 
-		public static void PlayerDisconnected (ConnectionManager manager, int _clientId, bool _bShutdown)
+		public static void PlayerDisconnected (ConnectionManager manager, ClientInfo _cInfo, bool _bShutdown)
 		{
 			try {
-				Player p = PersistentContainer.Instance.Players.GetPlayerByClientId (_clientId);
+				Player p = PersistentContainer.Instance.Players [_cInfo.playerId];
 				if (p != null) {
 					p.SetOffline ();
@@ -46,4 +48,6 @@
 				}
 				PersistentData.PersistentContainer.Instance.Save ();
+
+				Mods.CallPlayerDisconnected (_cInfo, _bShutdown);
 			} catch (Exception e) {
 				Log.Out ("Error in AllocsLogFunctions.PlayerDisconnected: " + e);
Index: binary-improvements/7dtd-server-fixes/src/AssemblyInfo.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/AssemblyInfo.cs	(revision 216)
+++ binary-improvements/7dtd-server-fixes/src/AssemblyInfo.cs	(revision 224)
@@ -18,5 +18,5 @@
 // and "{Major}.{Minor}.{Build}.*" will update just the revision.
 
-[assembly: AssemblyVersion("0.104.*")]
+[assembly: AssemblyVersion("0.110.*")]
 
 // The following attributes are used to specify the signing key for the assembly, 
Index: binary-improvements/7dtd-server-fixes/src/CommandExtensions.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/CommandExtensions.cs	(revision 216)
+++ binary-improvements/7dtd-server-fixes/src/CommandExtensions.cs	(revision 224)
@@ -12,14 +12,21 @@
 			try {
 				ConsoleSdtd cons = manager.m_GUIConsole;
-				string ns = "AllocsFixes.CustomCommands";
-				string basetype = "ConsoleCommand";
+				Type commandType = typeof (ConsoleCommand);
 
-				foreach (Type t in Assembly.GetExecutingAssembly ().GetTypes()) {
-					if (t.IsClass && t.Namespace.Equals (ns) && t.BaseType.Name.Equals (basetype)) {
-						try {
-							ConstructorInfo ctor = t.GetConstructor (new Type[] {typeof(ConsoleSdtd)});
-							cons.AddCommand ((ConsoleCommand)ctor.Invoke (new object[] {cons}));
-						} catch (Exception e) {
-							Log.Out ("Could not register custom command \"" + t.Name + "\": " + e);
+				Mods.ModData thisMd = new Mods.ModData ();
+				thisMd.assembly = Assembly.GetExecutingAssembly ();
+
+				List<Mods.ModData> mods = Mods.LoadedMods ();
+				mods.Add (thisMd);
+
+				foreach (Mods.ModData md in mods) {
+					foreach (Type t in md.assembly.GetTypes()) {
+						if (t.IsClass && commandType.IsAssignableFrom (t)) {
+							try {
+								ConstructorInfo ctor = t.GetConstructor (new Type[] {typeof(ConsoleSdtd)});
+								cons.AddCommand ((ConsoleCommand)ctor.Invoke (new object[] {cons}));
+							} catch (Exception e) {
+								Log.Out ("Could not register custom command \"" + t.Name + "\": " + e);
+							}
 						}
 					}
Index: binary-improvements/7dtd-server-fixes/src/CommonMappingFunctions.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/CommonMappingFunctions.cs	(revision 216)
+++ binary-improvements/7dtd-server-fixes/src/CommonMappingFunctions.cs	(revision 224)
@@ -15,5 +15,5 @@
 		public static GameManager GetGameManager ()
 		{
-			return GetConnectionManager ().gameManager;
+			return GameManager.Instance;
 		}
 
@@ -25,5 +25,5 @@
 		public static EntityPlayer GetEntityPlayer (ClientInfo _ci)
 		{
-			return GetGameManager ().World.playerEntities.dict [_ci.entityId];
+			return GetGameManager ().World.Players.dict [_ci.entityId];
 		}
 
Index: binary-improvements/7dtd-server-fixes/src/ItemList.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/ItemList.cs	(revision 216)
+++ binary-improvements/7dtd-server-fixes/src/ItemList.cs	(revision 224)
@@ -27,13 +27,13 @@
 		}
 
-		public Nullable<ItemValue> GetItemValue (string itemName)
+		public ItemValue GetItemValue (string itemName)
 		{
 			if (items.ContainsKey (itemName)) {
-				return items [itemName];
+				return items [itemName].Clone ();
 			} else {
 				itemName = itemName.ToLower ();
 				foreach (KeyValuePair<string, ItemValue> kvp in items) {
 					if (kvp.Key.ToLower ().Equals (itemName)) {
-						return kvp.Value;
+						return kvp.Value.Clone ();
 					}
 				}
@@ -47,5 +47,5 @@
 			foreach (InventoryField invF in cm.GetAllItems()) {
 				ItemBase ib = ItemBase.list [invF.itemValue.type];
-				string name = ib.GetItemName (invF.itemValue);
+				string name = ib.GetItemName ();
 				if (name != null && name.Length > 0) {
 					if (!items.ContainsKey (name)) {
@@ -58,5 +58,5 @@
 			foreach (InventoryField invF in cm.GetAllBlocks()) {
 				ItemBase ib = ItemBase.list [invF.itemValue.type];
-				string name = ib.GetItemName (invF.itemValue);
+				string name = ib.GetItemName ();
 				if (name != null && name.Length > 0) {
 					if (!items.ContainsKey (name)) {
Index: binary-improvements/7dtd-server-fixes/src/ModAPI.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/ModAPI.cs	(revision 224)
+++ binary-improvements/7dtd-server-fixes/src/ModAPI.cs	(revision 224)
@@ -0,0 +1,32 @@
+using System;
+
+namespace AllocsFixes
+{
+	public abstract class ModAPI {
+		public ModAPI () {
+		}
+
+		public abstract string ModName ();
+
+		public abstract string ModVersion ();
+
+		public virtual void GameAwake () {
+		}
+
+		public virtual void GameShutdown () {
+		}
+
+		public virtual void SavePlayerData (int _clientId, PlayerDataFile _playerDataFile) {
+		}
+
+		public virtual void RequestToSpawnPlayer (int _clientId, string _name, int _chunkViewDim, PlayerProfile _playerProfile) {
+		}
+
+		public virtual void PlayerDisconnected (ClientInfo _cInfo, bool _bShutdown) {
+		}
+
+		public virtual void CalcMapColors (Chunk _chunk) {
+		}
+	}
+}
+
Index: binary-improvements/7dtd-server-fixes/src/Mods.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/Mods.cs	(revision 224)
+++ binary-improvements/7dtd-server-fixes/src/Mods.cs	(revision 224)
@@ -0,0 +1,145 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using UnityEngine;
+
+namespace AllocsFixes
+{
+	public static class Mods {
+		public class ModData {
+			public Assembly assembly;
+			public string name;
+			public string version;
+			public ModAPI apiInstance;
+		}
+
+		private static readonly string MOD_PATH = Application.dataPath + "/../Mods";
+		private static Dictionary<string, ModData> loadedMods = new Dictionary<string, ModData> ();
+
+		public static void LoadMods () {
+			if (Directory.Exists (MOD_PATH)) {
+				Log.Out ("Loading mods");
+
+				foreach (string modDir in Directory.GetDirectories (MOD_PATH)) {
+					foreach (string modDll in Directory.GetFiles (modDir, "*.dll")) {
+						try {
+							Assembly assemblyInstance = Assembly.LoadFrom (modDll);
+
+							ModData md = new ModData ();
+							md.assembly = assemblyInstance;
+
+							md.apiInstance = CreateApiInstance (md);
+							if (md.apiInstance == null) {
+								Log.Warning ("DLL does not declare a class of type ModAPI, ignoring");
+								continue;
+							}
+							if (string.IsNullOrEmpty (md.apiInstance.ModName ())) {
+								Log.Warning ("DLL's ModAPI does not override ModName(), ignoring");
+								continue;
+							}
+							if (loadedMods.ContainsKey (md.apiInstance.ModName ())) {
+								Log.Warning ("DLL's ModAPI.ModName() returns name that's already loaded, ignoring");
+								continue;
+							}
+							md.name = md.apiInstance.ModName ();
+							md.version = md.apiInstance.ModVersion ();
+
+							loadedMods.Add (md.name, md);
+
+							Log.Out ("Loaded mod: " + md.name + " (" + md.version + ")");
+						} catch (Exception e) {
+							Log.Error ("Failed loading DLL");
+							Log.Exception (e);
+						}
+					}
+				}
+
+				Log.Out ("Loading mods done");
+			} else {
+				Log.Out ("No mods folder found");
+			}
+		}
+
+		public static bool ModLoaded (string _modName) {
+			return loadedMods.ContainsKey (_modName);
+		}
+
+		public static Assembly GetModAssembly (string _modName) {
+			if (ModLoaded (_modName)) {
+				return loadedMods [_modName].assembly;
+			}
+			return null;
+		}
+
+		public static List<ModData> LoadedMods () {
+			List<ModData> res = new List<ModData> ();
+			foreach (ModData md in loadedMods.Values) {
+				res.Add (md);
+			}
+			return res;
+		}
+
+		private static ModAPI CreateApiInstance (ModData _md) {
+			Type modApiType = typeof (ModAPI);
+			foreach (Type t in _md.assembly.GetTypes ()) {
+				if (modApiType.IsAssignableFrom (t)) {
+					Log.Out ("Found ModAPI");
+
+					return Activator.CreateInstance(t) as ModAPI;
+				}
+			}
+			return null;
+		}
+
+		public static void CallGameAwake () {
+			foreach (ModData md in loadedMods.Values) {
+				if (md.apiInstance != null) {
+					md.apiInstance.GameAwake ();
+				}
+			}
+		}
+
+		public static void CallGameShutdown () {
+			foreach (ModData md in loadedMods.Values) {
+				if (md.apiInstance != null) {
+					md.apiInstance.GameShutdown ();
+				}
+			}
+		}
+
+		public static void CallSavePlayerData (int _clientId, PlayerDataFile _playerDataFile) {
+			foreach (ModData md in loadedMods.Values) {
+				if (md.apiInstance != null) {
+					md.apiInstance.SavePlayerData (_clientId, _playerDataFile);
+				}
+			}
+		}
+
+		public static void CallRequestToSpawnPlayer (int _clientId, string _name, int _chunkViewDim, PlayerProfile _playerProfile) {
+			foreach (ModData md in loadedMods.Values) {
+				if (md.apiInstance != null) {
+					md.apiInstance.RequestToSpawnPlayer (_clientId, _name, _chunkViewDim, _playerProfile);
+				}
+			}
+		}
+
+		public static void CallPlayerDisconnected (ClientInfo _cInfo, bool _bShutdown) {
+			foreach (ModData md in loadedMods.Values) {
+				if (md.apiInstance != null) {
+					md.apiInstance.PlayerDisconnected (_cInfo, _bShutdown);
+				}
+			}
+		}
+
+		public static void CallCalcMapColors (Chunk _chunk) {
+			foreach (ModData md in loadedMods.Values) {
+				if (md.apiInstance != null) {
+					md.apiInstance.CalcMapColors (_chunk);
+				}
+			}
+		}
+
+	
+	}
+}
Index: binary-improvements/7dtd-server-fixes/src/NetConnections/ConsoleOutputSeparator.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/NetConnections/ConsoleOutputSeparator.cs	(revision 216)
+++ binary-improvements/7dtd-server-fixes/src/NetConnections/ConsoleOutputSeparator.cs	(revision 224)
@@ -22,7 +22,8 @@
 		private static List<NetCommand> netCommandQueue = new List<NetCommand> ();
 		private static bool isCurrentCommandFromClient = false;
+		private static int issuerOfCurrentClientCommand = -1;
 		private static IConnection issuerOfCurrentCommand;
 
-		public static void C_ExecuteCmdFromClient (ConsoleSdtd console, NetworkPlayer _networkPlayer, string _playerName, string _playerID, string _command)
+		public static void C_ExecuteCmdFromClient (ConsoleSdtd console, int _entityId, string _playerName, string _playerID, string _command)
 		{
 			Log.Out ("Executed command \"" + _command + "\" from player \"" + _playerName + "\"");
@@ -30,6 +31,22 @@
 			lock (netCommandQueue) {
 				isCurrentCommandFromClient = true;
-				console.issuerOfCurrentClientCommand = _networkPlayer;
-				console.ExecuteClientCmdInternal (_playerName, _playerID, _command);
+				issuerOfCurrentClientCommand = _entityId;
+
+				string[] array = _command.Split (' ');
+				if (array.Length == 0) {
+					C_SendResult (console, "*** ERROR: empty command '" + _command + "'");
+				} else {
+					ConsoleCommand cmd = console.getCommand (_command);
+					if (cmd != null) {
+						string[] array2 = new string[array.Length - 1];
+						for (int i = 1; i < array.Length; i++) {
+							array2 [i - 1] = array [i];
+						}
+						cmd.ExecuteRemote (_playerID, array2);
+					} else {
+						C_SendResult (console, "*** ERROR: unknown command '" + array [0] + "'");
+					}
+				}
+
 				isCurrentCommandFromClient = false;
 			}
@@ -40,10 +57,5 @@
 		{
 			if (isCurrentCommandFromClient) {
-				console.gameManager.GetRPCNetworkView ().RPC ("RPC_Console", console.issuerOfCurrentClientCommand, new object[]
-			{
-				_line,
-				false
-			}
-				);
+				CommonMappingFunctions.GetConnectionManager ().SendPackage (new NetPackage_ConsoleCmdClient (_line, false), new PackageDestinationSingleEntityID (issuerOfCurrentClientCommand));
 			} else {
 				if (console.telnetServer != null && issuerOfCurrentCommand != null)
Index: binary-improvements/7dtd-server-fixes/src/NetConnections/Servers/Telnet/TelnetConnection.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/NetConnections/Servers/Telnet/TelnetConnection.cs	(revision 216)
+++ binary-improvements/7dtd-server-fixes/src/NetConnections/Servers/Telnet/TelnetConnection.cs	(revision 224)
@@ -13,6 +13,4 @@
 		private readonly BlockingQueue<string> toClientQueue = new BlockingQueue<string> ();
 		private readonly Telnet telnet;
-		private readonly Thread receiveThread = null;
-		private readonly Thread sendThread = null;
 		private bool authenticated = false;
 		private readonly bool authEnabled;
@@ -44,8 +42,6 @@
 			Log.Out ("Telnet connection from: " + endpoint);
 
-			receiveThread = ThreadMaster.Create ("TelnetClientReceive_" + endpoint.ToString (), new ThreadStart (ReceiveThread));
-			receiveThread.Start ();
-			sendThread = ThreadMaster.Create ("TelnetClientSend" + endpoint.ToString (), new ThreadStart (SendThread));
-			sendThread.Start ();
+			ThreadManager.StartThread ("TelnetClientReceive_" + endpoint.ToString (), new ThreadManager.ThreadFunctionDelegate (ReceiveThread), System.Threading.ThreadPriority.BelowNormal);
+			ThreadManager.StartThread ("TelnetClientSend_" + endpoint.ToString (), new ThreadManager.ThreadFunctionDelegate (SendThread), System.Threading.ThreadPriority.BelowNormal);
 
 			if (authEnabled) {
@@ -77,5 +73,5 @@
 		}
 
-		private void ReceiveThread ()
+		private void ReceiveThread (ThreadManager.ThreadInfo _tInfo)
 		{
 			try {
@@ -116,8 +112,7 @@
 			if (!closed)
 				Close ();
-			ThreadMaster.Remove (Thread.CurrentThread.Name);
 		}
 
-		private void SendThread ()
+		private void SendThread (ThreadManager.ThreadInfo _tInfo)
 		{
 			try {
@@ -140,5 +135,4 @@
 			if (!closed)
 				Close ();
-			ThreadMaster.Remove (Thread.CurrentThread.Name);
 		}
 
Index: binary-improvements/7dtd-server-fixes/src/PersistentData/Inventory.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/PersistentData/Inventory.cs	(revision 216)
+++ binary-improvements/7dtd-server-fixes/src/PersistentData/Inventory.cs	(revision 224)
@@ -32,5 +32,5 @@
 					if (sourceFields [i].count > 0) {
 						int count = sourceFields [i].count;
-						int maxAllowed = ItemBase.list [sourceFields [i].itemValue.type].StackNumber;
+						int maxAllowed = ItemBase.list [sourceFields [i].itemValue.type].Stacknumber.Value;
 						string name = getInvFieldName (sourceFields [i]);
 
@@ -48,5 +48,5 @@
 		{
 			ItemBase iBase = ItemBase.list [item.itemValue.type];
-			return iBase.GetItemName (item.itemValue);
+			return iBase.GetItemName ();
 		}
 
Index: binary-improvements/7dtd-server-fixes/src/PlayerDataStuff.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/PlayerDataStuff.cs	(revision 216)
+++ binary-improvements/7dtd-server-fixes/src/PlayerDataStuff.cs	(revision 224)
@@ -14,4 +14,5 @@
 				string steamId = CommonMappingFunctions.GetSteamID(ci);
 				PersistentContainer.Instance.Players[steamId].Inventory.Update(_playerDataFile);
+				Mods.CallSavePlayerData (_clientId, _playerDataFile);
 			} catch (Exception e) {
 				Log.Out ("Error in GM_SavePlayerData: " + e);
Index: binary-improvements/7dtd-server-fixes/src/StateManager.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/StateManager.cs	(revision 216)
+++ binary-improvements/7dtd-server-fixes/src/StateManager.cs	(revision 224)
@@ -1,4 +1,3 @@
 using AllocsFixes.NetConnections.Servers.Telnet;
-using AllocsFixes.NetConnections.Servers.Web;
 using System;
 using System.Reflection;
@@ -12,9 +11,12 @@
 			try {
 				Log.Out ("[7dtd-server-fixes by Alloc] Version: " + Assembly.GetExecutingAssembly ().GetName ().Version);
-				new Web ();
+
+				Mods.LoadMods ();
+				Mods.CallGameAwake ();
+				CommandExtensions.InitCommandExtensions (manager);
+
 				new Telnet ();
 
 				ItemList.Instance.Init ();
-				CommandExtensions.InitCommandExtensions (manager);
 
 				PersistentData.PersistentContainer.Load ();
@@ -28,4 +30,5 @@
 			try {
 				Log.Out ("Server shutting down!");
+				Mods.CallGameShutdown ();
 				PersistentData.PersistentContainer.Instance.Save ();
 			} catch (Exception e) {
Index: binary-improvements/7dtd-server-fixes/src/Version.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/Version.cs	(revision 224)
+++ binary-improvements/7dtd-server-fixes/src/Version.cs	(revision 224)
@@ -0,0 +1,36 @@
+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 and loaded mods";
+		}
+
+		public override string[] Names ()
+		{
+			return new string[] { "version", string.Empty };
+		}
+
+		public override void Run (string[] _params)
+		{
+			try {
+				m_Console.SendResult ("Versions:");
+				m_Console.SendResult ("Server fixes: " + Assembly.GetExecutingAssembly ().GetName ().Version);
+				foreach (Mods.ModData md in Mods.LoadedMods ()) {
+					m_Console.SendResult ("Mod " + md.name + ": " + md.version);
+				}
+			} catch (Exception e) {
+				Log.Out ("Error in Version.Run: " + e);
+			}
+		}
+	}
+}
