public void InitializeScript() { using (var lua = new Lua()) { lua.RegisterFunction("AddIpAddress", null, typeof(IpBlockList).GetMethod("AddIpAddress")); IpBlockList.Clear(); lua.DoFile("BlockList.lua"); } }
public void ReloadBlockList() { using (var lua = new Lua()) { IpBlockList.Clear(); lua.LoadCLRPackage(); lua.RegisterFunction("AddIpAddress", null, typeof(IpBlockList).GetMethod("AddIpAddress")); lua.DoFile("BlockList.lua"); } }
public void StopServer() { Server.Stop(); Login.Stop(); DataManagement.ClearDatabases(); Authentication.Clear(); IpFiltering.Clear(); IpBlockList.Clear(); CloseLog(); }
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"); } }