diff --git a/Si_CommManagement/CommanderBanList.cs b/Si_CommManagement/CommanderBanList.cs index 7a1c951..1fa740a 100644 --- a/Si_CommManagement/CommanderBanList.cs +++ b/Si_CommManagement/CommanderBanList.cs @@ -85,7 +85,7 @@ public static bool IsBanned(Player player) } // check if player is allowed to be commander - long playerSteamId = long.Parse(player.ToString().Split('_')[1]); + long playerSteamId = (long)player.PlayerID.SteamID.m_SteamID; BanEntry? banEntry = BanList.Find(i => i.OffenderSteamId == playerSteamId); if (banEntry != null) { @@ -128,7 +128,7 @@ public static void AddBan(Player playerToCmdrBan) Player serverPlayer = NetworkGameServer.GetServerPlayer(); BanEntry thisBan = new BanEntry() { - OffenderSteamId = long.Parse(playerToCmdrBan.ToString().Split('_')[1]), + OffenderSteamId = (long)playerToCmdrBan.PlayerID.SteamID.m_SteamID, OffenderName = playerToCmdrBan.PlayerName, UnixBanTime = (int)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds, Comments = "banned from playing commander by " + serverPlayer.PlayerName diff --git a/Si_CommManagement/Si_CommanderManager.cs b/Si_CommManagement/Si_CommanderManager.cs index 9a34804..11610a2 100644 --- a/Si_CommManagement/Si_CommanderManager.cs +++ b/Si_CommManagement/Si_CommanderManager.cs @@ -34,7 +34,7 @@ You should have received a copy of the GNU General Public License using System.Linq; using System.Collections.Generic; -[assembly: MelonInfo(typeof(CommanderManager), "Commander Management", "1.8.2", "databomb", "https://github.com/data-bomb/Silica")] +[assembly: MelonInfo(typeof(CommanderManager), "Commander Management", "1.8.3", "databomb", "https://github.com/data-bomb/Silica")] [assembly: MelonGame("Bohemia Interactive", "Silica")] [assembly: MelonOptionalDependencies("Admin Mod")]