diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 0d69ca87..3f80922b 100755 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -193,7 +193,7 @@ namespace TShockAPI ChatCommands.Add(new Command(Permissions.canchangepassword, PasswordUser, "password") {DoLog = false}); ChatCommands.Add(new Command(Permissions.canregister, RegisterUser, "register") {DoLog = false}); ChatCommands.Add(new Command(Permissions.rootonly, ManageUsers, "user") {DoLog = false}); - add(Permissions.rootonly, GrabUserUserInfo, "userinfo", "ui"); + add(Permissions.userinfo, GrabUserUserInfo, "userinfo", "ui"); add(Permissions.rootonly, AuthVerify, "auth-verify"); ChatCommands.Add(new Command(Permissions.canlogin, AttemptLogin, "login") {DoLog = false}); add(Permissions.cfg, Broadcast, "broadcast", "bc", "say"); @@ -1051,7 +1051,8 @@ namespace TShockAPI } } - TShock.Utils.StopServer(); + string reason = ((args.Parameters.Count > 0) ? "Server shutting down: " + String.Join(" ", args.Parameters) : "Server shutting down!"); + TShock.Utils.StopServer(true, reason); } //Added restart command private static void Restart(CommandArgs args) @@ -1073,7 +1074,8 @@ namespace TShockAPI } } - TShock.Utils.StopServer(); + string reason = ((args.Parameters.Count > 0) ? "Server shutting down: " + String.Join(" ", args.Parameters) : "Server shutting down!"); + TShock.Utils.StopServer(true, reason); System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); Environment.Exit(0); } @@ -1081,7 +1083,8 @@ namespace TShockAPI private static void OffNoSave(CommandArgs args) { - TShock.Utils.StopServer(false); + string reason = ((args.Parameters.Count > 0) ? "Server shutting down: " + String.Join(" ", args.Parameters) : "Server shutting down!"); + TShock.Utils.StopServer(false, reason); } private static void CheckUpdates(CommandArgs args) diff --git a/TShockAPI/Permissions.cs b/TShockAPI/Permissions.cs index 2450aa53..16e3f0a5 100644 --- a/TShockAPI/Permissions.cs +++ b/TShockAPI/Permissions.cs @@ -28,6 +28,8 @@ namespace TShockAPI { //Permissions with blank descriptions basically means its described by the commands it gives access to. + [Description("Allows player to get user info")] public static readonly string userinfo; + [Description("")] public static readonly string causeevents; [Description("Required to be able to build (modify tiles and liquid)")] public static readonly string canbuild;