public void ReloadChecksum() { using (var lua = new Lua()) { Checksum.Clear(); lua.LoadCLRPackage(); lua.RegisterFunction("AddChecksum", null, typeof(Checksum).GetMethod("Add")); lua.DoFile("Checksum.lua"); } }
public void StopServer() { Server.Stop(); TcpTransfer.Disconnect(); TcpTransfer = null; IpFiltering.Clear(); Checksum.Clear(); GeoIpBlock.Clear(); IpBlockList.Clear(); CloseLog(); }
public void InitializeScript() { using (var lua = new Lua()) { lua.LoadCLRPackage(); lua.RegisterFunction("AddChecksum", null, typeof(Checksum).GetMethod("Add")); lua.RegisterFunction("AddCountry", null, typeof(GeoIpBlock).GetMethod("AddCountry")); lua.RegisterFunction("AddIpAddress", null, typeof(IpBlockList).GetMethod("AddIpAddress")); Checksum.Clear(); lua.DoFile("Checksum.lua"); GeoIpBlock.Clear(); lua.DoFile("GeoIP.lua"); IpBlockList.Clear(); lua.DoFile("BlockList.lua"); } }