Ignore:
Timestamp:
Jul 18, 2014, 3:48:29 AM (10 years ago)
Author:
alloc
Message:

server fixes

Location:
binary-improvements/assembly-patcher
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/assembly-patcher/Assembly-Patcher.userprefs

    r78 r83  
    11<Properties>
    22  <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|x86" />
    3   <MonoDevelop.Ide.Workbench ActiveDocument="AssemblyInfo.cs">
     3  <MonoDevelop.Ide.Workbench ActiveDocument="Main.cs">
    44    <Files>
    5       <File FileName="Main.cs" Line="38" Column="4" />
     5      <File FileName="Main.cs" Line="48" Column="3" />
    66      <File FileName="AssemblyInfo.cs" Line="21" Column="1" />
    77    </Files>
  • binary-improvements/assembly-patcher/Main.cs

    r76 r83  
    1313                        telnetPatch (module);
    1414                        connectLogPatch (module);
     15                        executionLogPatch( module);
    1516                        module.Write ("Assembly-CSharp.dll");
    1617                        Console.WriteLine ("Done");
     
    2627
    2728                        markTypePatched (module, type);
    28                         addHook (type, "RequestToSpawnPlayer", true, 5, true, typeof(AllocsRequestToSpawnPlayer).GetMethod ("RequestToSpawnPlayer"));
     29                        addHook (type, "RequestToSpawnPlayer", true, 5, true, typeof(AllocsLogFunctions).GetMethod ("RequestToSpawnPlayer"));
     30                }
     31
     32                private static void executionLogPatch (ModuleDefinition module)
     33                {
     34                        TypeDefinition type = module.GetType ("ConsoleSdtd");
     35
     36                        if (isPatched (type)) {
     37                                return;
     38                        }
     39
     40                        markTypePatched (module, type);
     41                        addHook (type, "ExecuteCmdFromClient", true, 3, false, typeof(AllocsLogFunctions).GetMethod ("ExecuteCmdFromClient"));
    2942                }
    3043
Note: See TracChangeset for help on using the changeset viewer.