Commit 5837149410bb76c094d0f7c395f6110b0ede8749

Authored by 熊润斐
2 parents 003806dc 2f7891b4

Merge branch 'bugFix' into tr/publish

* bugFix:
  运营需要
  屏蔽字 优化
src/actions/RoleAction.lua
@@ -160,6 +160,7 @@ function _M.loginRpc( agent, data ) @@ -160,6 +160,7 @@ function _M.loginRpc( agent, data )
160 local resetMode = role:updateTimeReset(now) 160 local resetMode = role:updateTimeReset(now)
161 if not resetMode or not resetMode["CrossDay"] then -- 没有跨天 161 if not resetMode or not resetMode["CrossDay"] then -- 没有跨天
162 role.activity:checkActivityStatus(now, false, false) 162 role.activity:checkActivityStatus(now, false, false)
  163 + role:log("onLogin")
163 end 164 end
164 165
165 redisproxy:zadd(FRIEND_RECOMMEND, now, roleId) 166 redisproxy:zadd(FRIEND_RECOMMEND, now, roleId)
@@ -291,7 +292,6 @@ function _M.loginRpc( agent, data ) @@ -291,7 +292,6 @@ function _M.loginRpc( agent, data )
291 role:savePvpHTeam() 292 role:savePvpHTeam()
292 293
293 local hangPass = role:getProperty("hangPass") 294 local hangPass = role:getProperty("hangPass")
294 - role:log("onLogin")  
295 role:mylog("login", {key1 = agent.ip:toArray(false, ":")[1], int1 = hangPass[1] or 0}) 295 role:mylog("login", {key1 = agent.ip:toArray(false, ":")[1], int1 = hangPass[1] or 0})
296 if msg.newdevice then 296 if msg.newdevice then
297 role:mylog("newdevice", {key1 = agent.ip:toArray(false, ":")[1]}) 297 role:mylog("newdevice", {key1 = agent.ip:toArray(false, ":")[1]})
src/models/RoleTimeReset.lua
@@ -20,6 +20,7 @@ ResetFunc["CrossDay"] = function(self, notify, response, now) @@ -20,6 +20,7 @@ ResetFunc["CrossDay"] = function(self, notify, response, now)
20 20
21 response.dTask = {} 21 response.dTask = {}
22 response.advSup = self:getProperty("advSup") 22 response.advSup = self:getProperty("advSup")
  23 + self:log("onLogin")
23 end 24 end
24 25
25 ResetFunc["CrossWeek"] = function(self, notify, response) 26 ResetFunc["CrossWeek"] = function(self, notify, response)
src/services/chated.lua
@@ -5,6 +5,8 @@ local crab = require "crab.c" @@ -5,6 +5,8 @@ local crab = require "crab.c"
5 local table_insert = table.insert 5 local table_insert = table.insert
6 local table_unpack = table.unpack 6 local table_unpack = table.unpack
7 local mode, id, dict = ... 7 local mode, id, dict = ...
  8 +local hideCode = utf8.codepoint("*")
  9 +
8 10
9 local function toutf8(name) 11 local function toutf8(name)
10 local t = {} 12 local t = {}
@@ -14,6 +16,16 @@ local function toutf8(name) @@ -14,6 +16,16 @@ local function toutf8(name)
14 return t 16 return t
15 end 17 end
16 18
  19 +local function fix(a, b)
  20 + for i, v in pairs(a) do
  21 + if b[i] == hideCode then
  22 + a[i] = hideCode
  23 + end
  24 + end
  25 + return utf8.char(table_unpack(a))
  26 +end
  27 +
  28 +
17 if mode == "sub" then 29 if mode == "sub" then
18 local CMD = {} 30 local CMD = {}
19 dict = tonumber(dict) 31 dict = tonumber(dict)
@@ -23,8 +35,9 @@ if mode == "sub" then @@ -23,8 +35,9 @@ if mode == "sub" then
23 return false 35 return false
24 end 36 end
25 local utftb = toutf8(name) 37 local utftb = toutf8(name)
26 - if crab.filter(dict, utftb) then  
27 - return false, utf8.char(table_unpack(utftb)) 38 + local utftbU = toutf8(string.upper(name))
  39 + if crab.filter(dict, utftbU) then
  40 + return false, fix(utftb, utftbU)
28 end 41 end
29 return true 42 return true
30 end 43 end
@@ -45,7 +58,7 @@ else @@ -45,7 +58,7 @@ else
45 58
46 local words = {} 59 local words = {}
47 for _, data in ipairs(forbidNames) do 60 for _, data in ipairs(forbidNames) do
48 - local ok, utftb = pcall(toutf8, data.name) 61 + local ok, utftb = pcall(toutf8, string.upper(data.name))
49 if ok then table.insert(words, utftb) end 62 if ok then table.insert(words, utftb) end
50 end 63 end
51 local d = crab.open(words) 64 local d = crab.open(words)
src/services/named.lua
@@ -5,6 +5,8 @@ local crab = require "crab.c" @@ -5,6 +5,8 @@ local crab = require "crab.c"
5 local table_insert = table.insert 5 local table_insert = table.insert
6 local table_unpack = table.unpack 6 local table_unpack = table.unpack
7 local mode, id, dict = ... 7 local mode, id, dict = ...
  8 +local hideCode = utf8.codepoint("*")
  9 +
8 10
9 local function toutf8(name) 11 local function toutf8(name)
10 local t = {} 12 local t = {}
@@ -14,6 +16,16 @@ local function toutf8(name) @@ -14,6 +16,16 @@ local function toutf8(name)
14 return t 16 return t
15 end 17 end
16 18
  19 +local function fix(a, b)
  20 + for i, v in pairs(a) do
  21 + if b[i] == hideCode then
  22 + a[i] = hideCode
  23 + end
  24 + end
  25 + return utf8.char(table_unpack(a))
  26 +end
  27 +
  28 +
17 if mode == "sub" then 29 if mode == "sub" then
18 local CMD = {} 30 local CMD = {}
19 dict = tonumber(dict) 31 dict = tonumber(dict)
@@ -23,8 +35,9 @@ if mode == "sub" then @@ -23,8 +35,9 @@ if mode == "sub" then
23 return false 35 return false
24 end 36 end
25 local utftb = toutf8(name) 37 local utftb = toutf8(name)
26 - if crab.filter(dict, utftb) then  
27 - return false, utf8.char(table_unpack(utftb)) 38 + local utftbU = toutf8(string.upper(name))
  39 + if crab.filter(dict, utftbU) then
  40 + return false, fix(utftb, utftbU)
28 end 41 end
29 return true 42 return true
30 end 43 end
@@ -45,7 +58,7 @@ else @@ -45,7 +58,7 @@ else
45 58
46 local words = {} 59 local words = {}
47 for _, data in ipairs(forbidNames) do 60 for _, data in ipairs(forbidNames) do
48 - local ok, utftb = pcall(toutf8, data.name) 61 + local ok, utftb = pcall(toutf8, string.upper(data.name))
49 if ok then table.insert(words, utftb) end 62 if ok then table.insert(words, utftb) end
50 end 63 end
51 local d = crab.open(words) 64 local d = crab.open(words)