diff --git a/SkyCoopDedicatedServer/MyMod.cs b/SkyCoopDedicatedServer/MyMod.cs index b257e20..1cf6cef 100644 --- a/SkyCoopDedicatedServer/MyMod.cs +++ b/SkyCoopDedicatedServer/MyMod.cs @@ -12,7 +12,7 @@ public static class BuildInfo public const string Description = "Multiplayer mod"; public const string Author = "Filigrani & REDcat"; public const string Company = null; - public const string Version = "0.12.1"; + public const string Version = "0.12.2"; public const string DownloadLink = null; public const int RandomGenVersion = 5; } @@ -93,7 +93,7 @@ public static void Initialize() DiscordManager.Init(); Logger.Log("Server running on version "+ BuildInfo.Version); - Logger.Log("Build Mark 12"); + Logger.Log("Build Mark 13"); } public static string ExecuteCommand(string CMD, int _fromClient = -1) diff --git a/SkyCoopDedicatedServer/Shared.cs b/SkyCoopDedicatedServer/Shared.cs index 58624ba..679bf87 100644 --- a/SkyCoopDedicatedServer/Shared.cs +++ b/SkyCoopDedicatedServer/Shared.cs @@ -2910,12 +2910,15 @@ public static long GetDeterministicId(string m) } public static string GetMacAddress() { - string macAddr = - ( - from nic in NetworkInterface.GetAllNetworkInterfaces() - where nic.OperationalStatus == OperationalStatus.Up - select nic.GetPhysicalAddress().ToString() - ).FirstOrDefault(); + string macAddr = string.Empty; + foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces()) + { + if (nic.OperationalStatus == OperationalStatus.Up && nic.NetworkInterfaceType != NetworkInterfaceType.Loopback && nic.GetPhysicalAddress().ToString().Length > 4) + { + macAddr = nic.GetPhysicalAddress().ToString(); + break; + } + } return macAddr; }