From af7863ef137f193af1c6e3329a1fb633773cb770 Mon Sep 17 00:00:00 2001 From: zhouhaihai Date: Fri, 1 May 2020 14:36:50 +0800 Subject: [PATCH] x小写名字异常 --- src/actions/RoleAction.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/actions/RoleAction.lua b/src/actions/RoleAction.lua index 1db5a3d..1559822 100644 --- a/src/actions/RoleAction.lua +++ b/src/actions/RoleAction.lua @@ -332,15 +332,15 @@ function _M.changeNameRpc(agent, data) SendPacket(actionCodes.Role_changeNameRpc, MsgPack.pack({result = 3})) return true end - - local result = redisproxy:setnx(string_format("user:%s", newName), roleId) + local dbName = string.upper(newName) + local result = redisproxy:setnx(string_format("user:%s", dbName), roleId) if result == 0 then SendPacket(actionCodes.Role_changeNameRpc, MsgPack.pack({result = 1})) return true end redisproxy:pipelining(function (red) - red:del(string_format("user:%s", oldName)) - red:set(string_format("uid:%s", role:getProperty("uid")), newName) + red:del(string_format("user:%s", string.upper(oldName))) + red:set(string_format("uid:%s", role:getProperty("uid")), dbName) end) role:updateProperties({ -- libgit2 0.21.2