From fbb0e1aebbc736a197939714303015ac7aa8ed6d Mon Sep 17 00:00:00 2001 From: high Date: Sun, 3 Jul 2011 23:12:51 -0400 Subject: [PATCH 1/3] Should be >= --- TShockAPI/GetDataHandlers.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 5a9838d2..377f736d 100755 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -351,9 +351,10 @@ namespace TShockAPI return Tools.HandleGriefer(args.Player, "Update Player abuse"); } - if (item < 0 || item > args.TPlayer.inventory.Length) + if (item < 0 || item >= args.TPlayer.inventory.Length) { - return Tools.HandleGriefer(args.Player, "Update Player abuse"); + Tools.HandleGriefer(args.Player, "Update Player abuse"); + return true; } return false; From 9a3cf85cf25247af8a6e985a79f4003b365dfd29 Mon Sep 17 00:00:00 2001 From: high Date: Mon, 4 Jul 2011 00:44:04 -0400 Subject: [PATCH 2/3] NPC.maxSpawns should be NPC.defaultMaxSpawns --- TShockAPI/Properties/AssemblyInfo.cs | 4 ++-- TShockAPI/TShock.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TShockAPI/Properties/AssemblyInfo.cs b/TShockAPI/Properties/AssemblyInfo.cs index 19f98b1c..66169d98 100644 --- a/TShockAPI/Properties/AssemblyInfo.cs +++ b/TShockAPI/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.3.2.0701")] -[assembly: AssemblyFileVersion("2.3.2.0701")] +[assembly: AssemblyVersion("2.3.2.0704")] +[assembly: AssemblyFileVersion("2.3.2.0704")] diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 70a3dccd..c607d68f 100755 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -563,7 +563,7 @@ namespace TShockAPI public void OnConfigRead(ConfigFile file) { - NPC.maxSpawns = file.DefaultMaximumSpawns; + NPC.defaultMaxSpawns = file.DefaultMaximumSpawns; NPC.defaultSpawnRate = file.DefaultSpawnRate; Main.autoSave = file.AutoSave; From 65a7998b16756a3fd67337d439b6a2c71d36f5c2 Mon Sep 17 00:00:00 2001 From: high Date: Mon, 4 Jul 2011 01:07:44 -0400 Subject: [PATCH 3/3] Do not log /login and /user --- TShockAPI/Commands.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index d5056e8a..e0612262 100755 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -56,6 +56,7 @@ namespace TShockAPI { public string Name { get { return Names[0]; } } public List Names { get; protected set; } + public bool DoLog { get; set; } private string permission; private CommandDelegate command; @@ -71,6 +72,7 @@ namespace TShockAPI permission = null; Names = new List(names); command = cmd; + DoLog = true; } public bool Run(string msg, TSPlayer ply, List parms) @@ -151,8 +153,8 @@ namespace TShockAPI ChatCommands.Add(new Command(PartyChat, "p")); ChatCommands.Add(new Command(Rules, "rules")); ChatCommands.Add(new Command("logs", Rules, "displaylogs")); - ChatCommands.Add(new Command("manageusers", ManageUsers, "user")); - ChatCommands.Add(new Command(AttemptLogin, "login")); + ChatCommands.Add(new Command("manageusers", ManageUsers, "user") { DoLog = false }); + ChatCommands.Add(new Command(AttemptLogin, "login") { DoLog = false }); ChatCommands.Add(new Command("cfg", Broadcast, "broadcast", "bc")); ChatCommands.Add(new Command("whisper", Whisper, "whisper", "w", "tell")); ChatCommands.Add(new Command("whisper", Reply, "reply", "r")); @@ -189,10 +191,8 @@ namespace TShockAPI } else { - if (!cmdText.Contains("login") || !cmdText.Contains("user")) - { + if (cmd.DoLog) Tools.SendLogs(string.Format("{0} executed: /{1}", player.Name, cmdText), Color.Red); - } cmd.Run(cmdText, player, args); } return true;