Forgot unused-ip entry in world.xml.

Added config option for ip ban removal delay.
This commit is contained in:
CodeForFame 2011-06-21 18:36:48 -05:00
parent 40abc56b0f
commit a0aa5d6cdd
3 changed files with 7 additions and 1 deletions

View File

@ -31,6 +31,7 @@ public class Config {
public static String[] pmods, mods, admins;
public static String UNUSED_IP;
public static int IP_BAN_REMOVAL_DELAY;
static {
loadEnv();
@ -79,6 +80,7 @@ public class Config {
admins = props.getProperty("admins").replaceAll(", +", ",").split(",");
UNUSED_IP = props.getProperty("unused-ip");
IP_BAN_REMOVAL_DELAY = Integer.parseInt(props.getProperty("ip-ban-removal-delay"));
props.clear();

View File

@ -46,7 +46,7 @@ object OSLevelBlocking {
def block(ip: String) {
if (!blocked.contains(ip)) {
events.add(new DelayedEvent(null, 1800000) {
events.add(new DelayedEvent(null, Config.IP_BAN_REMOVAL_DELAY) {
def run() {
unblock(ip)

View File

@ -25,4 +25,8 @@
<entry key="pmods">None</entry>
<entry key="mods">None</entry>
<entry key="admins">None</entry>
<!-- This only needs to be specified if you're using a Windows machine -->
<entry key="unused-ip">192.168.0.255</entry>
<entry key="ip-ban-removal-delay">1800000</entry>
</properties>