diff --git a/TShockAPI/Log.cs b/TShockAPI/Log.cs index 4f743334..4bbd05ac 100644 --- a/TShockAPI/Log.cs +++ b/TShockAPI/Log.cs @@ -22,6 +22,7 @@ using System.IO; namespace TShockAPI { + [Flags] public enum LogLevel { None = 0, diff --git a/TShockAPI/Rest/RestManager.cs b/TShockAPI/Rest/RestManager.cs index 0e30d4bc..d9c21c1f 100644 --- a/TShockAPI/Rest/RestManager.cs +++ b/TShockAPI/Rest/RestManager.cs @@ -398,7 +398,7 @@ namespace TShockAPI private object PlayerKick(RestVerbs verbs, IParameterCollection parameters) { var returnBlock = new Dictionary(); - var playerParam = parameters["player"]; + var playerParam = verbs["player"]; var found = TShock.Utils.FindPlayer(playerParam); var reason = verbs["reason"]; if (found.Count == 0) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index c9d1497e..39af00a7 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -21,6 +21,7 @@ using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.IO; using System.Net; using System.Reflection; @@ -121,7 +122,7 @@ namespace TShockAPI "TShock was improperly shut down. Please avoid this in the future, world corruption may result from this."); File.Delete(Path.Combine(SavePath, "tshock.pid")); } - File.WriteAllText(Path.Combine(SavePath, "tshock.pid"), Process.GetCurrentProcess().Id.ToString()); + File.WriteAllText(Path.Combine(SavePath, "tshock.pid"), Process.GetCurrentProcess().Id.ToString(CultureInfo.InvariantCulture)); ConfigFile.ConfigRead += OnConfigRead; FileTools.SetupConfig();