Merge branch 'general-devel' into advisory-fix-1
This commit is contained in:
commit
383052cb5e
5 changed files with 16 additions and 3 deletions
|
|
@ -66,6 +66,12 @@ namespace TShockAPI.Configuration
|
|||
/// </summary>
|
||||
[Description("The starting default inventory for new players when SSC is enabled.")]
|
||||
public List<NetItem> StartingInventory = new List<NetItem>();
|
||||
|
||||
/// <summary>
|
||||
/// Warns players that they have the bypass SSC permission enabled. To disable warning, turn this off.
|
||||
/// </summary>
|
||||
[Description("Warns players and the console if a player has the tshock.ignore.ssc permission with data in the SSC table.")]
|
||||
public bool WarnPlayersAboutBypassPermission = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ namespace TShockAPI.DB
|
|||
|
||||
if (player.HasPermission(Permissions.bypassssc) && !fromCommand)
|
||||
{
|
||||
TShock.Log.ConsoleInfo("Skipping SSC Backup for " + player.Account.Name); // Debug code
|
||||
TShock.Log.ConsoleInfo("Skipping SSC save (due to tshock.ignore.ssc) for " + player.Account.Name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -237,7 +237,7 @@ namespace TShockAPI.DB
|
|||
|
||||
if (player.HasPermission(Permissions.bypassssc))
|
||||
{
|
||||
TShock.Log.ConsoleInfo("Skipping SSC Backup for " + player.Account.Name); // Debug code
|
||||
TShock.Log.ConsoleInfo("Skipping SSC save (due to tshock.ignore.ssc) for " + player.Account.Name);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2411,6 +2411,12 @@ namespace TShockAPI
|
|||
{
|
||||
if (args.Player.HasPermission(Permissions.bypassssc))
|
||||
{
|
||||
if (args.Player.PlayerData.exists && TShock.ServerSideCharacterConfig.Settings.WarnPlayersAboutBypassPermission)
|
||||
{
|
||||
args.Player.SendWarningMessage("Bypass SSC is enabled for your account. SSC data will not be loaded or saved.");
|
||||
TShock.Log.ConsoleInfo(args.Player.Name + " has SSC data in the database, but has the tshock.ignore.ssc permission. This means their SSC data is being ignored.");
|
||||
TShock.Log.ConsoleInfo("You may wish to consider removing the tshock.ignore.ssc permission or negating it for this player.");
|
||||
}
|
||||
args.Player.PlayerData.CopyCharacter(args.Player);
|
||||
TShock.CharacterDB.InsertPlayerData(args.Player);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -906,7 +906,7 @@ namespace TShockAPI
|
|||
{
|
||||
if (HasPermission(Permissions.bypassssc))
|
||||
{
|
||||
TShock.Log.ConsoleInfo("Skipping SSC Backup for " + Account.Name); // Debug Code
|
||||
TShock.Log.ConsoleInfo("Skipping SSC save (due to tshock.ignore.ssc) for " + Account.Name);
|
||||
return true;
|
||||
}
|
||||
PlayerData.CopyCharacter(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue