Commit 3aac1e3a57bd2fa5a5eaed0efa5f58eefc30cfca
1 parent
d02f7904
新设备
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
src/actions/RoleAction.lua
| @@ -293,7 +293,9 @@ function _M.loginRpc( agent, data ) | @@ -293,7 +293,9 @@ function _M.loginRpc( agent, data ) | ||
| 293 | local hangPass = role:getProperty("hangPass") | 293 | local hangPass = role:getProperty("hangPass") |
| 294 | role:log("onLogin") | 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 | - | 296 | + if msg.newdevice then |
| 297 | + role:mylog("newdevice", {key1 = agent.ip:toArray(false, ":")[1]}) | ||
| 298 | + end | ||
| 297 | return true | 299 | return true |
| 298 | end | 300 | end |
| 299 | 301 | ||
| @@ -361,7 +363,9 @@ function _M.createRpc(agent, data) | @@ -361,7 +363,9 @@ function _M.createRpc(agent, data) | ||
| 361 | end | 363 | end |
| 362 | newRole:log("onCreateRole") | 364 | newRole:log("onCreateRole") |
| 363 | newRole:mylog("create", {key1 = agent.ip:toArray(false, ":")[1]}) | 365 | newRole:mylog("create", {key1 = agent.ip:toArray(false, ":")[1]}) |
| 364 | - | 366 | + if msg.newdevice then |
| 367 | + newRole:mylog("newdevice", {key1 = agent.ip:toArray(false, ":")[1]}) | ||
| 368 | + end | ||
| 365 | 369 | ||
| 366 | SendPacket(actionCodes.Role_createRpc, MsgPack.pack(response)) | 370 | SendPacket(actionCodes.Role_createRpc, MsgPack.pack(response)) |
| 367 | return true | 371 | return true |