get remote ip fix (#254)

* get remote ip fix

* add GetIp fix to chat command
This commit is contained in:
2018-08-28 05:40:30 +03:00
committed by Brant Martin
parent 74b00d3ab1
commit a318aa87cf
2 changed files with 9 additions and 8 deletions

View File

@@ -151,8 +151,11 @@ namespace Torch.Server.Managers
//Largely copied from SE
private void ValidateAuthTicketResponse(ulong steamId, JoinResult response, ulong steamOwner)
{
//SteamNetworking.GetP2PSessionState(new CSteamID(steamId), out P2PSessionState_t state);
var ip = "0"; //state.GetRemoteIP();
//SteamNetworking.GetP2PSessionState(new CSteamID(steamId), out P2PSessionState_t state);
//state.GetRemoteIP();
MyP2PSessionState statehack = new MyP2PSessionState();
VRage.Steam.MySteamService.Static.Peer2Peer.GetSessionState(steamId, ref statehack);
var ip = new IPAddress(BitConverter.GetBytes(statehack.RemoteIP).Reverse().ToArray());
Torch.CurrentSession.KeenSession.PromotedUsers.TryGetValue(steamId, out MyPromoteLevel promoteLevel);