Fridge, only stop accepting messages from player that is acutally going to be kicked/banned.

This commit is contained in:
ricky 2011-06-20 11:18:45 +10:00
parent 4332ea9b73
commit 616d0f60d7

View file

@ -348,7 +348,7 @@ namespace TShockAPI
Debug.WriteLine("{0:X} ({2}): {3} ({1:XX})", player.Index, (byte)type, player.TPlayer.dead ? "dead " : "alive", type.ToString());
// Stop accepting updates from player as this player is going to be kicked/banned during OnUpdate (different thread so can produce race conditions)
if (player.TileThreshold >= 20 && !player.Group.HasPermission("ignoregriefdetection"))
if ((ConfigurationManager.BanTnt || ConfigurationManager.KickTnt) && player.TileThreshold >= 20 && !player.Group.HasPermission("ignoregriefdetection"))
{
Log.Debug("Rejecting " + type + " from " + player.Name + " as this player is about to be kicked");
e.Handled = true;