111
This commit is contained in:
11
OfficialProject/屏蔽广告私聊和1v1聊天/Proj.ifo
Normal file
11
OfficialProject/屏蔽广告私聊和1v1聊天/Proj.ifo
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"ProjectName": "屏蔽广告私聊和1v1聊天",
|
||||
"ProjectDescribe": "屏蔽广告私聊和1v1聊天",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "屏蔽广告私聊和1v1聊天.json",
|
||||
"ProjectFiles": [
|
||||
"屏蔽广告私聊和1v1聊天.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_BlockPrivateChatsWithSpecifiedConversationContent_Main_"
|
||||
}
|
||||
32
OfficialProject/屏蔽广告私聊和1v1聊天/屏蔽广告私聊和1v1聊天.nut
Normal file
32
OfficialProject/屏蔽广告私聊和1v1聊天/屏蔽广告私聊和1v1聊天.nut
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user