Skip to content

Commit

Permalink
Commander Management Mod Fixes for Steam ID
Browse files Browse the repository at this point in the history
  • Loading branch information
data-bomb committed Sep 5, 2024
1 parent bba7706 commit ea34d51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Si_CommManagement/CommanderBanList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Si_CommManagement/Si_CommanderManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]

Expand Down

0 comments on commit ea34d51

Please sign in to comment.