Commit 6f6be52837c17d519f03d8e167476dc367e9fa4a

Authored by zhouhaihai
2 parents 3e513948 af7863ef

Merge branch 'develop' into player

Showing 1 changed file with 4 additions and 4 deletions   Show diff stats
src/actions/RoleAction.lua
... ... @@ -332,15 +332,15 @@ function _M.changeNameRpc(agent, data)
332 332 SendPacket(actionCodes.Role_changeNameRpc, MsgPack.pack({result = 3}))
333 333 return true
334 334 end
335   -
336   - local result = redisproxy:setnx(string_format("user:%s", newName), roleId)
  335 + local dbName = string.upper(newName)
  336 + local result = redisproxy:setnx(string_format("user:%s", dbName), roleId)
337 337 if result == 0 then
338 338 SendPacket(actionCodes.Role_changeNameRpc, MsgPack.pack({result = 1}))
339 339 return true
340 340 end
341 341 redisproxy:pipelining(function (red)
342   - red:del(string_format("user:%s", oldName))
343   - red:set(string_format("uid:%s", role:getProperty("uid")), newName)
  342 + red:del(string_format("user:%s", string.upper(oldName)))
  343 + red:set(string_format("uid:%s", role:getProperty("uid")), dbName)
344 344 end)
345 345  
346 346 role:updateProperties({
... ...