From 0a51f208f582e47f03e27c550631a98940ba5032 Mon Sep 17 00:00:00 2001 From: Enerdy Date: Mon, 6 Jul 2015 01:32:08 +0100 Subject: [PATCH 1/5] Fixed /user group and any other method using TShock.Users.SetUserGroup() --- TShockAPI/DB/UserManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TShockAPI/DB/UserManager.cs b/TShockAPI/DB/UserManager.cs index 6770ffc4..2610875e 100755 --- a/TShockAPI/DB/UserManager.cs +++ b/TShockAPI/DB/UserManager.cs @@ -168,7 +168,7 @@ namespace TShockAPI.DB throw new UserNotExistException(user.Name); // Update player group reference for any logged in player - foreach (var player in TShock.Players.Where(p => null != p && p.User.Name == user.Name)) + foreach (var player in TShock.Players.Where(p => p != null && p.User != null && p.User.Name == user.Name)) { player.Group = grp; } From f3217c50129977fefca1b453b0f6b3b6a58f828c Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 5 Jul 2015 18:33:30 -0600 Subject: [PATCH 2/5] Update changelog --- CHANGELOG.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d465aa8..19adaa7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,11 @@ This is the rolling changelog for TShock for Terraria. Use past tense when adding new entries; sign your name off when you add or change something. This should primarily be things like user changes, not necessarily codebase changes unless it's really relevant or large. -## Unreleased (slated for 5.0) +## Unreleased + +* Fixed a bug where /user group failing would output no error. + +## TShock 4.3.0.0 * API: Modifed NetItem so that it's actually useful. (@MarioE) * Updated prebuilts (SQLite, JSON, MySQL) to latest versions. (@nicatronTg) @@ -18,4 +22,6 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * API: Added ```User.VerifyPassword(string password)``` which verifies if the user's password matches their stored hash. It automatically upgrades a users' password to BCrypt if called and the password stored is not a BCrypt hash. (@nicatronTg) * API: Deprecated ```Utils.HashPassword``` and related password hashing functions as those are no longer needed for plugin access. (@nicatronTg) * Fixed ```UseServerName``` config option so that it correctly sends the config server name any time that Main.WorldName is used. (@Olink) -* Fixed a bug where people could ban themselves. (@nicatronTg) \ No newline at end of file +* Fixed a bug where people could ban themselves. (@nicatronTg) +* Fixed a bug where banning a player who never logged in caused problems. (@nicatronTg) +* Terraria 1.3.0.3 support. \ No newline at end of file From b8dcbf1f4af6d88b672f5788a95b6e46902e9135 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 5 Jul 2015 18:34:14 -0600 Subject: [PATCH 3/5] Update changelog again --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19adaa7a..7ce94cbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin ## Unreleased -* Fixed a bug where /user group failing would output no error. +* Fixed a bug where /user group failing would output no error. (@nicatronTg) +* Fixed a bug where /user group would fail. @(Enerdy) ## TShock 4.3.0.0 From 3db238c2fc098dcff7324225a0c90ac777f4ba49 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 5 Jul 2015 18:36:05 -0600 Subject: [PATCH 4/5] Add config option to disable autosave messages --- CHANGELOG.md | 1 + TShockAPI/BackupManager.cs | 6 +++++- TShockAPI/ConfigFile.cs | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ce94cbb..091f0b92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * Fixed a bug where /user group failing would output no error. (@nicatronTg) * Fixed a bug where /user group would fail. @(Enerdy) +* Added the ability to disable backup autosave messages. (@nicatronTg) ## TShock 4.3.0.0 diff --git a/TShockAPI/BackupManager.cs b/TShockAPI/BackupManager.cs index deb22658..f8f6b449 100644 --- a/TShockAPI/BackupManager.cs +++ b/TShockAPI/BackupManager.cs @@ -61,7 +61,11 @@ namespace TShockAPI if (worldpath != null && !Directory.Exists(worldpath)) Directory.CreateDirectory(worldpath); - TSPlayer.All.SendInfoMessage("Server map saving, potential lag spike."); + if (TShock.Config.ShowBackupAutosaveMessages) + { + TSPlayer.All.SendInfoMessage("Server map saving, potential lag spike."); + + } Console.WriteLine("Backing up world..."); SaveManager.Instance.SaveWorld(); diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index bde5dad4..adcea438 100755 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -436,6 +436,8 @@ namespace TShockAPI [Description("Enable the DCU. Very dangerous; can destroy world without consequence.")] public bool VeryDangerousDoNotChangeEnableDrillContainmentUnit = false; + [Description("Show backup autosave messages.")] public bool ShowBackupAutosaveMessages = true; + /// /// Reads a configuration file from a given path /// From 21fde49069f5fd5131c85786be7578789f5238e5 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 5 Jul 2015 19:18:21 -0600 Subject: [PATCH 5/5] Update submodule --- TerrariaServerAPI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TerrariaServerAPI b/TerrariaServerAPI index f176cdff..d0bd38b5 160000 --- a/TerrariaServerAPI +++ b/TerrariaServerAPI @@ -1 +1 @@ -Subproject commit f176cdfffc1d80b4f7e5b875ffd247e4aa6d03db +Subproject commit d0bd38b5b12a6c0cb4cc54706550e94153856ce4