diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index a65f840c..df0a38ab 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -855,9 +855,9 @@ namespace TShockAPI { args.Player.SendErrorMessage("Disabled for banned armor: " + args.Player.IgnoreActionsForDisabledArmor); } - else if (args.Player.IgnoreActionsForInventory != "none") + else if (args.Player.IsDisabledForSSC == true) { - args.Player.SendErrorMessage("Disabled for Server Side Inventory: " + args.Player.IgnoreActionsForInventory); + args.Player.SendErrorMessage("Disabled. Server side characters is enabled, and you aren't logged in."); } else if (TShock.Config.RequireLogin && !args.Player.IsLoggedIn) { diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 79ed00c4..225cc8f9 100644 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -848,7 +848,7 @@ namespace TShockAPI args.Player.tempGroup = null; args.Player.Account = account; args.Player.IsLoggedIn = true; - args.Player.IgnoreActionsForInventory = "none"; + args.Player.IsDisabledForSSC = false; if (Main.ServerSideCharacter) { diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 959ec454..df9f0cac 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -1784,7 +1784,7 @@ namespace TShockAPI args.Player.tempGroup = null; args.Player.Account = account; args.Player.IsLoggedIn = true; - args.Player.IgnoreActionsForInventory = "none"; + args.Player.IsDisabledForSSC = false; if (Main.ServerSideCharacter) { @@ -1856,7 +1856,7 @@ namespace TShockAPI args.Player.tempGroup = null; args.Player.Account = account; args.Player.IsLoggedIn = true; - args.Player.IgnoreActionsForInventory = "none"; + args.Player.IsDisabledForSSC = false; if (Main.ServerSideCharacter) { diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs index 868f20b2..d32426b9 100644 --- a/TShockAPI/TSPlayer.cs +++ b/TShockAPI/TSPlayer.cs @@ -277,7 +277,8 @@ namespace TShockAPI private string CacheIP; - public string IgnoreActionsForInventory = "none"; + /// Determines if the player is disabled by the SSC subsystem for not being logged in. + public bool IsDisabledForSSC = false; public string IgnoreActionsForCheating = "none"; @@ -297,7 +298,7 @@ namespace TShockAPI /// bool - True if any ignore is not none, false, or login state differs from the required state. public bool CheckIgnores() { - return IgnoreActionsForInventory != "none" || IgnoreActionsForCheating != "none" || IgnoreActionsForDisabledArmor != "none" || IgnoreActionsForClearingTrashCan || !IsLoggedIn && TShock.Config.RequireLogin; + return IsDisabledForSSC || IgnoreActionsForCheating != "none" || IgnoreActionsForDisabledArmor != "none" || IgnoreActionsForClearingTrashCan || !IsLoggedIn && TShock.Config.RequireLogin; } /// @@ -656,7 +657,7 @@ namespace TShockAPI PlayerHooks.OnPlayerLogout(this); if (Main.ServerSideCharacter) { - IgnoreActionsForInventory = $"Server side characters is enabled! Please {Commands.Specifier}register or {Commands.Specifier}login to play!"; + IsDisabledForSSC = true; if (!IgnoreActionsForClearingTrashCan && (!Dead || TPlayer.difficulty != 2)) { PlayerData.CopyCharacter(this); diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 9766b93d..d33637c5 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -1684,8 +1684,8 @@ namespace TShockAPI { if (Main.ServerSideCharacter) { - player.SendErrorMessage( - player.IgnoreActionsForInventory = String.Format("Server side characters is enabled! Please {0}register or {0}login to play!", Commands.Specifier)); + player.IsDisabledForSSC = true; + player.SendErrorMessage(String.Format("Server side characters is enabled! Please {0}register or {0}login to play!", Commands.Specifier)); player.LoginHarassed = true; } else if (Config.RequireLogin)