diff --git a/MCGalaxy/Commands/CPE/CustomBlockCommand.cs b/MCGalaxy/Commands/CPE/CustomBlockCommand.cs index 48940c548..769f9398c 100644 --- a/MCGalaxy/Commands/CPE/CustomBlockCommand.cs +++ b/MCGalaxy/Commands/CPE/CustomBlockCommand.cs @@ -481,7 +481,7 @@ namespace MCGalaxy.Commands.CPE { } // Don't let multiple blocks be assigned to same order - if (order != def.BlockID) { + if (order != def.BlockID && order != 255) { for (int i = 0; i < defs.Length; i++) { if (defs[i] == null || defs[i].InventoryOrder != order) continue; Player.Message(p, "Block {0} already had order {1}", defs[i].Name, order); diff --git a/MCGalaxy/CorePlugin/IPThrottler.cs b/MCGalaxy/CorePlugin/IPThrottler.cs index b308a9778..8ad779465 100644 --- a/MCGalaxy/CorePlugin/IPThrottler.cs +++ b/MCGalaxy/CorePlugin/IPThrottler.cs @@ -32,16 +32,16 @@ namespace MCGalaxy.Core { DateTime blockedUntil, now = DateTime.UtcNow; lock (ipsLock) { - IPThrottleEntry entries; - if (!ips.TryGetValue(p.ip, out entries)) { - entries = new IPThrottleEntry(); - ips[p.ip] = entries; + IPThrottleEntry entry; + if (!ips.TryGetValue(p.ip, out entry)) { + entry = new IPThrottleEntry(); + ips[p.ip] = entry; } - blockedUntil = entries.BlockedUntil; + blockedUntil = entry.BlockedUntil; if (blockedUntil < now) { - if (!entries.AddSpamEntry(ServerConfig.IPSpamCount, ServerConfig.IPSpamInterval)) { - entries.BlockedUntil = now.AddSeconds(ServerConfig.IPSpamBlockTime); + if (!entry.AddSpamEntry(ServerConfig.IPSpamCount, ServerConfig.IPSpamInterval)) { + entry.BlockedUntil = now.AddSeconds(ServerConfig.IPSpamBlockTime); } return true; }