diff --git a/robot/robot.lua b/robot/robot.lua index 63c8396..bf7ceb1 100644 --- a/robot/robot.lua +++ b/robot/robot.lua @@ -136,6 +136,18 @@ function CMD.task() startUnit() end +function randomName() + local str = "1234567890abcdefghijklmnopqrstuvwxyz" + local len = #str + local result = "" + for i=1,10 do + local idx = math.random(1, len) + result = result .. string.sub(str, idx, idx) + end + + return result +end + -- 开始登录 function CMD.start(fd, id) client.fd = fd diff --git a/src/GlobalVar.lua b/src/GlobalVar.lua index 15667a2..c6c06b6 100644 --- a/src/GlobalVar.lua +++ b/src/GlobalVar.lua @@ -371,6 +371,8 @@ MailId = { CBBackAward2 = 244, ActivityPoolRet = 280, MyCardBuy = 300, + + RechargeBack = 3001, } TriggerEventType = { diff --git a/src/actions/GmAction.lua b/src/actions/GmAction.lua index f3fe488..b9838f2 100644 --- a/src/actions/GmAction.lua +++ b/src/actions/GmAction.lua @@ -729,6 +729,8 @@ function _M.cz(role, pms) pay_time = skynet.timex(), sid = sid == 1 and IOS_SID or 0, }) + -- 补发邮件 + role:sendMail(MailId.RechargeBack) role:mylog("gm_action", {desc = "recharge", int1 = id, key1 = pms.sender}) return "指令成功" end diff --git a/src/agent.lua b/src/agent.lua index d611898..6a21de6 100644 --- a/src/agent.lua +++ b/src/agent.lua @@ -36,7 +36,7 @@ local function handle_timeout() end local function handle_gc() - if agentInfo.open_timer then return end + if not agentInfo.open_timer then return end collectgarbage("collect") skynet.timeout(6000, handle_gc) end diff --git a/src/csvdata b/src/csvdata index e2c89ce..4526460 160000 --- a/src/csvdata +++ b/src/csvdata @@ -1 +1 @@ -Subproject commit e2c89ce97a826a716af84cb15d2976d3f19dcd1c +Subproject commit 45264603ff07db4cd2eaf8822c17f453bf5f00de -- libgit2 0.21.2