Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int pc_get_ip(lua_State* L)
- {
- LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
- if (!ch || !ch->GetDesc())
- {
- lua_pushstring(L, "0.0.0.0");
- return 1;
- }
- lua_pushstring(L, inet_ntoa(ch->GetDesc()->GetAddr().sin_addr));
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment