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