Commit fe41ea5d6c7f7bf2814b72b9554343532e468989

Authored by chenyueqi
1 parent 8583f6ee

动态屏蔽字设置1秒延时等待。当动态屏蔽字有返回的时候不走服务器自己的屏蔽字判断

Showing 2 changed files with 3 additions and 1 deletions   Show diff stats
src/actions/RoleAction.lua
@@ -1041,7 +1041,7 @@ function _M.chatRpc(agent, data) @@ -1041,7 +1041,7 @@ function _M.chatRpc(agent, data)
1041 sdkResult = role:biliChatSDK(content) 1041 sdkResult = role:biliChatSDK(content)
1042 end 1042 end
1043 1043
1044 - if sdkResult and sdkResult ~= content then 1044 + if sdkResult then
1045 content = sdkResult 1045 content = sdkResult
1046 else 1046 else
1047 local SERV = string_format(".chated%d", math.random(1, 5)) 1047 local SERV = string_format(".chated%d", math.random(1, 5))
src/models/RolePlugin.lua
@@ -2208,6 +2208,7 @@ function RolePlugin.bind(Role) @@ -2208,6 +2208,7 @@ function RolePlugin.bind(Role)
2208 } 2208 }
2209 2209
2210 local params = makeStr(send, secret) 2210 local params = makeStr(send, secret)
  2211 + httpc.timeout = 100
2211 local status, body = httpc.request("POST", urls[1], "/api/server/censor", {}, headers, params) 2212 local status, body = httpc.request("POST", urls[1], "/api/server/censor", {}, headers, params)
2212 if tonumber(status) ~= 200 then 2213 if tonumber(status) ~= 200 then
2213 status, body = httpc.request("POST", urls[2], "/api/server/censor", {}, headers, params) 2214 status, body = httpc.request("POST", urls[2], "/api/server/censor", {}, headers, params)
@@ -2246,6 +2247,7 @@ function RolePlugin.bind(Role) @@ -2246,6 +2247,7 @@ function RolePlugin.bind(Role)
2246 } 2247 }
2247 2248
2248 local params = makeStr(send, secret, true) 2249 local params = makeStr(send, secret, true)
  2250 + httpc.timeout = 100
2249 local status, body = httpc.request("POST", urls[1], "/api/server/censor", {}, headers, params) 2251 local status, body = httpc.request("POST", urls[1], "/api/server/censor", {}, headers, params)
2250 if tonumber(status) ~= 200 then 2252 if tonumber(status) ~= 200 then
2251 return 2253 return