Permalink
Browse files

Fixed the REST kick endpoint expecting a player parameter as opposed …

…to a verb
  • Loading branch information...
1 parent ff84198 commit bfc9ad98fb422dd838ad38d2cc438b0d00decc88 @hakusaro hakusaro committed Jan 1, 2012
Showing with 4 additions and 2 deletions.
  1. +1 −0 TShockAPI/Log.cs
  2. +1 −1 TShockAPI/Rest/RestManager.cs
  3. +2 −1 TShockAPI/TShock.cs
View
@@ -22,6 +22,7 @@
namespace TShockAPI
{
+ [Flags]
public enum LogLevel
{
None = 0,
@@ -398,7 +398,7 @@ private object PlayerRead(RestVerbs verbs, IParameterCollection parameters)
private object PlayerKick(RestVerbs verbs, IParameterCollection parameters)
{
var returnBlock = new Dictionary<string, object>();
- var playerParam = parameters["player"];
+ var playerParam = verbs["player"];
var found = TShock.Utils.FindPlayer(playerParam);
var reason = verbs["reason"];
if (found.Count == 0)
View
@@ -21,6 +21,7 @@
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 @@ public override void Initialize()
"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();

0 comments on commit bfc9ad9

Please sign in to comment.