mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-10-26 04:22:38 +00:00
[+] Log user ID on login
This commit is contained in:
parent
39dc6c576a
commit
b7c5d18df1
@ -302,6 +302,7 @@
|
|||||||
<Compile Include="Performance\ImproveLoadSpeed.cs" />
|
<Compile Include="Performance\ImproveLoadSpeed.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Main.cs" />
|
<Compile Include="Main.cs" />
|
||||||
|
<Compile Include="Utils\LogUserId.cs" />
|
||||||
<Compile Include="UX\CustomPlaceName.cs" />
|
<Compile Include="UX\CustomPlaceName.cs" />
|
||||||
<Compile Include="UX\CustomVersionString.cs" />
|
<Compile Include="UX\CustomVersionString.cs" />
|
||||||
<Compile Include="UX\DemoMaster.cs" />
|
<Compile Include="UX\DemoMaster.cs" />
|
||||||
|
|||||||
@ -69,3 +69,7 @@ SkipVersionCheck=true
|
|||||||
RemoveEncryption=true
|
RemoveEncryption=true
|
||||||
ForceAsServer=true
|
ForceAsServer=true
|
||||||
ForceFreePlay=true
|
ForceFreePlay=true
|
||||||
|
|
||||||
|
[Utils]
|
||||||
|
# Log user ID on login
|
||||||
|
LogUserId=false
|
||||||
|
|||||||
@ -85,3 +85,7 @@ RemoveEncryption=true
|
|||||||
# 如果要配置店内招募的话,应该要把这个关闭
|
# 如果要配置店内招募的话,应该要把这个关闭
|
||||||
ForceAsServer=true
|
ForceAsServer=true
|
||||||
ForceFreePlay=true
|
ForceFreePlay=true
|
||||||
|
|
||||||
|
[Utils]
|
||||||
|
# 登录时将 UserID 输出到日志
|
||||||
|
LogUserId=false
|
||||||
|
|||||||
@ -10,6 +10,7 @@ namespace AquaMai
|
|||||||
public CheatConfig Cheat { get; set; }
|
public CheatConfig Cheat { get; set; }
|
||||||
public PerformanceConfig Performance { get; set; }
|
public PerformanceConfig Performance { get; set; }
|
||||||
public FixConfig Fix { get; set; }
|
public FixConfig Fix { get; set; }
|
||||||
|
public UtilsConfig Utils { get; set; }
|
||||||
|
|
||||||
public class CheatConfig
|
public class CheatConfig
|
||||||
{
|
{
|
||||||
@ -55,5 +56,10 @@ namespace AquaMai
|
|||||||
public bool ForceAsServer { get; set; } = true;
|
public bool ForceAsServer { get; set; } = true;
|
||||||
public bool ForceFreePlay { get; set; } = true;
|
public bool ForceFreePlay { get; set; } = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class UtilsConfig
|
||||||
|
{
|
||||||
|
public bool LogUserId { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
18
AquaMai/Utils/LogUserId.cs
Normal file
18
AquaMai/Utils/LogUserId.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using HarmonyLib;
|
||||||
|
using MelonLoader;
|
||||||
|
using Net.Packet;
|
||||||
|
using Net.Packet.Mai2;
|
||||||
|
using Net.VO.Mai2;
|
||||||
|
|
||||||
|
namespace AquaMai.Utils;
|
||||||
|
|
||||||
|
public class LogUserId
|
||||||
|
{
|
||||||
|
[HarmonyPostfix]
|
||||||
|
[HarmonyPatch(typeof(PacketGetUserPreview), MethodType.Constructor, typeof(ulong), typeof(string), typeof(Action<ulong, UserPreviewResponseVO>), typeof(Action<PacketStatus>))]
|
||||||
|
public static void Postfix(ulong userId)
|
||||||
|
{
|
||||||
|
MelonLogger.Msg($"UserLogin: {userId}");
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user