Purpose
- 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.
- 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
- Remove the
--in front ofLoadModule("Entrylimit\\Entrylimit")inMain.lua. - Edit
Includes\Entrylimit\Config.lua. - Click Reload LuaAPI.
No SQL needed. Player information is read with Player.GetIP, Player.GetMac, Player.GetDiskSerial.
Configuration (Config.lua, EntrylimitConfig table)
| Key | Value | Meaning |
|---|---|---|
Enable | true / false | Turns the module on / off. |
BannedIP | list of strings | Full IP addresses that are blocked. |
BannedIPPrefix | list of strings | Blocked IP prefixes: "112.94" blocks every address starting with 112.94.. |
BannedMac | list of strings | MAC addresses (case-insensitive). |
BannedDiskSerial | list of strings | Hard disk serial numbers; written as strings, for example "3805652883". |
TestServerCode | number | GameServer code of the test server; -1 = off. |
TestAccounts | list of strings | Accounts allowed to enter the test server. |
BannedLogout | 0 / 1 / 2 | How a blocked player is removed: 0 closes the game, 1 returns to the character selection screen, 2 returns to the server selection screen. |
TestLogout | 0 / 1 / 2 | Same as above, applied to the test server. |
Text | table | Notice 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.