32 lines
1.3 KiB
Plaintext
32 lines
1.3 KiB
Plaintext
/*
|
|
文件名:屏蔽指定对话内容的私聊和1v1聊天.nut
|
|
路径:OfficialProject/屏蔽指定对话内容的私聊和1v1聊天/屏蔽指定对话内容的私聊和1v1聊天.nut
|
|
创建日期:2025-04-19 19:17
|
|
文件用途:
|
|
*/
|
|
|
|
getroottable()._LenheartUserLoseEfficacyState_ <- Memory.alloc(577477);
|
|
Memory.reset(getroottable()._LenheartUserLoseEfficacyState_, 577477);
|
|
|
|
function _Dps_BlockPrivateChatsWithSpecifiedConversationContent_Main_() {
|
|
Cb_SendMess_Enter_Func["Rindro"] <- function(args) {
|
|
local PackCopyBuffer = Memory.alloc(10001);
|
|
Memory.copy(PackCopyBuffer, NativePointer(args[2]), 1000);
|
|
local Pack = Packet(PackCopyBuffer.C_Object);
|
|
local Type = Pack.GetByte();
|
|
if (Type == 1 || Type == 33) {
|
|
Pack.GetShort();
|
|
Pack.GetInt();
|
|
local StrLen = Pack.GetInt();
|
|
local SStr = Pack.GetString(256, StrLen);
|
|
local Str = SStr.readUtf8String();
|
|
local Conifg = GlobalConfig.Get("屏蔽广告私聊和1v1聊天.json");
|
|
foreach(substr in Conifg["屏蔽词"]) {
|
|
if (Str.find(substr) != null) {
|
|
args[1] = getroottable()._LenheartUserLoseEfficacyState_.C_Object;
|
|
return args;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |