From a8e55d44e62d62b265d12cbab4d79ebc5ebf798b Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Thu, 21 Jul 2011 15:07:28 -0600 Subject: [PATCH] Added EnableAntiLag to ConfigFile.cs --- TShockAPI/ConfigFile.cs | 2 ++ TShockAPI/GetDataHandlers.cs | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index a39adcf8..909c3a16 100644 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -97,6 +97,8 @@ namespace TShockAPI public bool EnableDNSHostResolution = false; public bool EnableBanOnUsernames = false; + + public bool EnableAntiLag = true; public static ConfigFile Read(string path) { if (!File.Exists(path)) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index cbbf8b82..68fc95f7 100755 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -116,8 +116,12 @@ namespace TShockAPI private static bool HandleSync(GetDataHandlerArgs args) { - Debug.WriteLine("FUCK SYNCS"); - return true; + if (TShock.Config.EnableAntiLag) + { + Debug.WriteLine("FUCK SYNCS"); + return true; + } + return false; } public static bool HandlerGetData(PacketTypes type, TSPlayer player, MemoryStream data)