Index: binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj
===================================================================
--- binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj	(revision 83)
+++ binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj	(revision 84)
@@ -31,5 +31,5 @@
     <Reference Include="System" />
     <Reference Include="Assembly-CSharp">
-      <HintPath>..\NamePatcher\bin\Release\Assembly-CSharp.dll</HintPath>
+      <HintPath>..\assembly-patcher\bin\Release\Assembly-CSharp.dll</HintPath>
     </Reference>
     <Reference Include="UnityEngine">
@@ -46,4 +46,6 @@
     <Compile Include="src\TelnetCommands\SayToPlayer.cs" />
     <Compile Include="src\AllocsLogFunctions.cs" />
+    <Compile Include="src\TelnetCommands\SetTimeReal.cs" />
+    <Compile Include="src\AdminToolsStuff.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
Index: binary-improvements/7dtd-server-fixes/src/AdminToolsStuff.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/AdminToolsStuff.cs	(revision 84)
+++ binary-improvements/7dtd-server-fixes/src/AdminToolsStuff.cs	(revision 84)
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+
+public class AdminToolsStuff
+{
+	public static string[] GetAllowedCommandsList (AdminTools admTools, string _steamID)
+	{
+		AdminToolsClientInfo tmpInfo = admTools.GetClientCommandInfo (_steamID);
+
+		List<AdminToolsCommandPermissions> perms = admTools.commandPermissions;
+		List<string> allowed = new List<string> ();
+
+		foreach (AdminToolsCommandPermissions atcp in perms) {
+			if (tmpInfo.SteamID != null && tmpInfo.SteamID.Length > 0) {
+				if ((atcp.PermissionLevel >= tmpInfo.PermissionLevel) || (atcp.PermissionLevel >= 1000)) {
+					allowed.Add (atcp.Command);
+				}
+			} else {
+				if (atcp.PermissionLevel >= 1000) {
+					allowed.Add (atcp.Command);
+				}
+			}
+		}
+
+		return allowed.ToArray ();
+	}
+}
+
Index: binary-improvements/7dtd-server-fixes/src/AllocsNetTelnetServer.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/AllocsNetTelnetServer.cs	(revision 83)
+++ binary-improvements/7dtd-server-fixes/src/AllocsNetTelnetServer.cs	(revision 84)
@@ -137,4 +137,5 @@
 		console.AddCommand(new ListPlayersExtended(console));
 		console.AddCommand(new SayToPlayer(console));
+		console.AddCommand(new SetTimeReal(console));
 	}
 
Index: binary-improvements/7dtd-server-fixes/src/TelnetCommands/GetTime.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/TelnetCommands/GetTime.cs	(revision 83)
+++ binary-improvements/7dtd-server-fixes/src/TelnetCommands/GetTime.cs	(revision 84)
@@ -26,6 +26,6 @@
 			hour -= 24;
 		}
-		int sec = (int)(time % 1000) * 60 / 1000;
-		m_Console.md000a (String.Format ("Day {0}, {1:00}:{2:00} ", day, hour, sec));
+		int min = (int)(time % 1000) * 60 / 1000;
+		m_Console.md000a (String.Format ("Day {0}, {1:00}:{2:00} ", day, hour, min));
 	}
 }
Index: binary-improvements/7dtd-server-fixes/src/TelnetCommands/SetTimeReal.cs
===================================================================
--- binary-improvements/7dtd-server-fixes/src/TelnetCommands/SetTimeReal.cs	(revision 84)
+++ binary-improvements/7dtd-server-fixes/src/TelnetCommands/SetTimeReal.cs	(revision 84)
@@ -0,0 +1,61 @@
+using System;
+
+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)
+	{
+		if (_params.Length != 3) {
+			m_Console.md000a ("Usage: settimereal <day> <hour> <min>");
+			return;
+		}
+
+		int day, hour, min;
+		if (!int.TryParse (_params [0], out day)) {
+			m_Console.md000a ("Could not parse day number \"" + _params [0] + "\"");
+			return;
+		}
+		if (day < 1) {
+			m_Console.md000a ("Day must be >= 1");
+			return;
+		}
+		if (!int.TryParse (_params [1], out hour)) {
+			m_Console.md000a ("Could not parse hour \"" + _params [1] + "\"");
+			return;
+		}
+		if (hour > 23) {
+			m_Console.md000a ("Hour must be <= 23");
+			return;
+		}
+		if (!int.TryParse (_params [2], out min)) {
+			m_Console.md000a ("Could not parse minute \"" + _params [2] + "\"");
+			return;
+		}
+		if (min > 59) {
+			m_Console.md000a ("Minute must be <= 59");
+			return;
+		}
+		if ((day < 1) || (hour < 8 && day < 1)) {
+			m_Console.md000a ("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;
+		this.m_Console.gameManager.World.gameTime = time;
+		m_Console.md000a (String.Format ("Set time to Day {0}, {1:00}:{2:00} = {3}", day, hour, min, time));
+	}
+}
+
Index: binary-improvements/NamePatcher/NamePatcher.cs
===================================================================
--- binary-improvements/NamePatcher/NamePatcher.cs	(revision 83)
+++ binary-improvements/NamePatcher/NamePatcher.cs	(revision 84)
@@ -58,4 +58,13 @@
 		static void applyManualPatches (ModuleDefinition mainModule)
 		{
+			foreach (FieldDefinition fd in mainModule.GetType ("AdminTools").Fields) {
+				TypeReference fdType = fd.FieldType;
+				if (fdType.FullName.Contains ("List") && fdType.FullName.Contains ("AdminToolsCommandPermissions")) {
+					Console.WriteLine ("Renaming and making public admin tools field -> commandPermissions");
+					fd.Attributes = fd.Attributes & (~Mono.Cecil.FieldAttributes.Private) | Mono.Cecil.FieldAttributes.Public;
+					NameNormalizer.setName (fd, "commandPermissions");
+				}
+			}
+
 			foreach (FieldDefinition fd in mainModule.GetType ("World").Fields) {
 				TypeReference fdType = fd.FieldType;
Index: binary-improvements/NamePatcher/NamePatcher.userprefs
===================================================================
--- binary-improvements/NamePatcher/NamePatcher.userprefs	(revision 83)
+++ binary-improvements/NamePatcher/NamePatcher.userprefs	(revision 84)
@@ -3,5 +3,5 @@
   <MonoDevelop.Ide.Workbench ActiveDocument="NamePatcher.cs">
     <Files>
-      <File FileName="NamePatcher.cs" Line="165" Column="120" />
+      <File FileName="NamePatcher.cs" Line="109" Column="57" />
       <File FileName="NameNormalizer.cs" Line="188" Column="1" />
     </Files>
Index: binary-improvements/assembly-patcher/Assembly-Patcher.userprefs
===================================================================
--- binary-improvements/assembly-patcher/Assembly-Patcher.userprefs	(revision 83)
+++ binary-improvements/assembly-patcher/Assembly-Patcher.userprefs	(revision 84)
@@ -3,7 +3,18 @@
   <MonoDevelop.Ide.Workbench ActiveDocument="Main.cs">
     <Files>
-      <File FileName="Main.cs" Line="48" Column="3" />
+      <File FileName="Main.cs" Line="29" Column="54" />
       <File FileName="AssemblyInfo.cs" Line="21" Column="1" />
     </Files>
+    <Pads>
+      <Pad Id="ProjectPad">
+        <State expanded="True">
+          <Node name="Assembly-Patcher" expanded="True">
+            <Node name="References" expanded="True">
+              <Node name="/home/ci/Schreibtisch/7dtd-svn/binary-improvements/7dtd-server-fixes/bin/Release/7dtd-server-fixes.dll" selected="True" />
+            </Node>
+          </Node>
+        </State>
+      </Pad>
+    </Pads>
   </MonoDevelop.Ide.Workbench>
   <MonoDevelop.Ide.DebuggingService.Breakpoints>
Index: binary-improvements/assembly-patcher/Main.cs
===================================================================
--- binary-improvements/assembly-patcher/Main.cs	(revision 83)
+++ binary-improvements/assembly-patcher/Main.cs	(revision 84)
@@ -14,6 +14,19 @@
 			connectLogPatch (module);
 			executionLogPatch( module);
+			publicCommandPermissionsPatch (module);
 			module.Write ("Assembly-CSharp.dll");
 			Console.WriteLine ("Done");
+		}
+
+		private static void publicCommandPermissionsPatch (ModuleDefinition module)
+		{
+			TypeDefinition type = module.GetType ("AdminTools");
+
+			if (isPatched (type)) {
+				return;
+			}
+
+			markTypePatched (module, type);
+			replaceMethod (type, "GetAllowedCommandsList", true, 1, typeof(AdminToolsStuff).GetMethod ("GetAllowedCommandsList"));
 		}
 
@@ -51,8 +64,8 @@
 
 			markTypePatched (module, type);
-			replaceMethod (type, ".ctor", 1, typeof(AllocsNetTelnetServer).GetMethod ("init"));
-			replaceMethod (type, "Disconnect", 0, typeof(AllocsNetTelnetServer).GetMethod ("Disconnect"));
-			replaceMethod (type, "SetConsole", 1, typeof(AllocsNetTelnetServer).GetMethod ("SetConsole"));
-			replaceMethod (type, "WriteToClient", 1, typeof(AllocsNetTelnetServer).GetMethod ("WriteToClient"));
+			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"));
 		}
 
@@ -92,5 +105,5 @@
 		}
 
-		private static void replaceMethod (TypeDefinition type, string methodName, int opCount, MethodBase targetMethod)
+		private static void replaceMethod (TypeDefinition type, string methodName, bool addThisRef, int opCount, MethodBase targetMethod)
 		{
 			foreach (MethodDefinition method in type.Methods) {
@@ -100,4 +113,6 @@
 					var call = il.Create (OpCodes.Call, method.Module.Import (targetMethod));
 					var i = 0;
+					if (addThisRef)
+						il.InsertBefore (method.Body.Instructions [i++], il.Create (OpCodes.Ldarg, 0));
 					for (int op = 0; op < opCount; op++) {
 						il.InsertBefore (method.Body.Instructions [i++], il.Create (OpCodes.Ldarg, op + 1));
