Tentative fix for 2020-11-25 update

This commit is contained in:
John Gross
2020-11-25 11:32:05 -08:00
parent fb9dbf40da
commit c3e65a5bdd
5 changed files with 29 additions and 24 deletions

View File

@@ -37,13 +37,14 @@ namespace Torch.Commands
[Permission(MyPromoteLevel.None)]
public void GetIP(ulong steamId = 0)
{
if (steamId == 0)
steamId = Context.Player.SteamUserId;
VRage.GameServices.MyP2PSessionState statehack = new VRage.GameServices.MyP2PSessionState();
MySteamServiceWrapper.Static.Peer2Peer.GetSessionState(steamId, ref statehack);
var ip = new IPAddress(BitConverter.GetBytes(statehack.RemoteIP).Reverse().ToArray());
Context.Respond($"Your IP is {ip}");
Context.Respond("Command no longer working!");
//if (steamId == 0)
// steamId = Context.Player.SteamUserId;
//
//VRage.GameServices.MyP2PSessionState statehack = new VRage.GameServices.MyP2PSessionState();
//MySteamServiceWrapper.Static.Peer2Peer.GetSessionState(steamId, ref statehack);
//var ip = new IPAddress(BitConverter.GetBytes(statehack.RemoteIP).Reverse().ToArray());
//Context.Respond($"Your IP is {ip}");
}
[Command("help", "Displays help for a command")]