diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index d22ff51e..ac07b4e7 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")); @@ -190,10 +192,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; diff --git a/TShockAPI/Properties/AssemblyInfo.cs b/TShockAPI/Properties/AssemblyInfo.cs index e98b67f9..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.0702")] -[assembly: AssemblyFileVersion("2.3.2.0702")] +[assembly: AssemblyVersion("2.3.2.0704")] +[assembly: AssemblyFileVersion("2.3.2.0704")] diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 279c15a0..b1031aaa 100755 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -627,7 +627,7 @@ namespace TShockAPI public void OnConfigRead(ConfigFile file) { - NPC.maxSpawns = file.DefaultMaximumSpawns; + NPC.defaultMaxSpawns = file.DefaultMaximumSpawns; NPC.defaultSpawnRate = file.DefaultSpawnRate; Main.autoSave = file.AutoSave;