Skip to content

Commit

Permalink
fix: fix getIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrBox committed Feb 6, 2024
1 parent 2744ca0 commit f7bcafe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/legacy/api/DeviceAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Local<Value> DeviceClass::getIP() {
Player* player = getPlayer();
if (!player) return Local<Value>();

return String::newString(player->getNetworkIdentifier().getAddress());
return String::newString(player->getNetworkIdentifier().getIPAndPort());
}
CATCH("Fail in GetIP!")
}
Expand Down Expand Up @@ -168,4 +168,4 @@ Local<Value> DeviceClass::getClientId() {
// return Number::newNumber((int)player->getPlayMode());
// }
// CATCH("Fail in getPlayMode!")
// }
// }
2 changes: 1 addition & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ add_requires(
"fmt 10.1.1",
"legacymoney 0.2.0",
"legacyparticleapi 0.2.0",
"levilamina 0.7.1",
"levilamina 0.7.2",
"lightwebsocketclient 1.0.0",
"magic_enum v0.9.0",
"nlohmann_json 3.11.2",
Expand Down

0 comments on commit f7bcafe

Please sign in to comment.