Hi everybody, i need get ip address of player with c++ (CreatureScript), exists any function?
WorldSession* Player::GetSession()
std::string const& WorldSession::GetRemoteAddress()
thanks.
how to used in code?
player->GetRemoteAddress()
sorry i am newbie in programming
GetRemoteAddress() returns a string with the ip address…
std::string playerIp = player->GetSession()->GetRemoteAddress();
It’s been a while since I’ve worked with the trinity codebase, I’m pretty sure that’ll work though.
Thanks for your help, you can close the topic