This commit is contained in:
lenheart
2025-04-21 13:36:35 +08:00
parent eeb773e723
commit 2ef9cfef42
87 changed files with 2134 additions and 765 deletions

View File

@@ -0,0 +1,11 @@
{
"ProjectName": "屏蔽广告私聊和1v1聊天",
"ProjectDescribe": "屏蔽广告私聊和1v1聊天",
"ProjectAuthor": "倾泪寒",
"ProjectVersion": 1.0,
"ProjectConfig": "屏蔽广告私聊和1v1聊天.json",
"ProjectFiles": [
"屏蔽广告私聊和1v1聊天.nut"
],
"ProjectRunFunc": "_Dps_BlockPrivateChatsWithSpecifiedConversationContent_Main_"
}

View File

@@ -0,0 +1,32 @@
/*
文件名:屏蔽指定对话内容的私聊和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;
}
}
}
}
}