Purpose

  1. Blocks players by IP address, IP prefix, MAC address or hard disk serial number. A blocked player receives a notice and is removed from the game.
  2. Test server: on the GameServer that has the specified code, only the accounts in the list may play.

The check runs when a character enters the game (OnCharacterEntry). When a player is blocked, the account and IP are written to the GameServer log. This is a quick way to block; for a long-term ban, lock the account in the website or DB.

How to enable

  1. Remove the -- in front of LoadModule("Entrylimit\\Entrylimit") in Main.lua.
  2. Edit Includes\Entrylimit\Config.lua.
  3. Click Reload LuaAPI.

No SQL needed. Player information is read with Player.GetIP, Player.GetMac, Player.GetDiskSerial.

Configuration (Config.lua, EntrylimitConfig table)

KeyValueMeaning
Enabletrue / falseTurns the module on / off.
BannedIPlist of stringsFull IP addresses that are blocked.
BannedIPPrefixlist of stringsBlocked IP prefixes: "112.94" blocks every address starting with 112.94..
BannedMaclist of stringsMAC addresses (case-insensitive).
BannedDiskSeriallist of stringsHard disk serial numbers; written as strings, for example "3805652883".
TestServerCodenumberGameServer code of the test server; -1 = off.
TestAccountslist of stringsAccounts allowed to enter the test server.
BannedLogout0 / 1 / 2How a blocked player is removed: 0 closes the game, 1 returns to the character selection screen, 2 returns to the server selection screen.
TestLogout0 / 1 / 2Same as above, applied to the test server.
TexttableNotice messages: Banned, TestOnly, TestEnter.
EntrylimitConfig = {
	Enable = true,
	BannedIP = { "203.0.113.5" },
	BannedIPPrefix = { "198.51.100" },
	BannedMac = {},
	BannedDiskSerial = {},
	TestServerCode = -1,
	TestAccounts = {},
	BannedLogout = 0,
	TestLogout = 2,
}
The addresses in the example are for illustration only. The preinstalled Config.lua file contains a few sample values in the lists; delete them or replace them with your own lists before enabling.