From a0aa5d6cdd42c9330ee3d6726f4496b5ba62b6a5 Mon Sep 17 00:00:00 2001 From: CodeForFame Date: Tue, 21 Jun 2011 18:36:48 -0500 Subject: [PATCH] Forgot unused-ip entry in world.xml. Added config option for ip ban removal delay. --- GameServer/src/org/moparscape/msc/config/Config.java | 2 ++ .../moparscape/msc/gs/connection/filter/OSLevelBlocking.scala | 2 +- GameServer/world.xml | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/GameServer/src/org/moparscape/msc/config/Config.java b/GameServer/src/org/moparscape/msc/config/Config.java index bf19ee9..e37be83 100644 --- a/GameServer/src/org/moparscape/msc/config/Config.java +++ b/GameServer/src/org/moparscape/msc/config/Config.java @@ -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(); diff --git a/GameServer/src/org/moparscape/msc/gs/connection/filter/OSLevelBlocking.scala b/GameServer/src/org/moparscape/msc/gs/connection/filter/OSLevelBlocking.scala index a6918c5..780d274 100644 --- a/GameServer/src/org/moparscape/msc/gs/connection/filter/OSLevelBlocking.scala +++ b/GameServer/src/org/moparscape/msc/gs/connection/filter/OSLevelBlocking.scala @@ -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) diff --git a/GameServer/world.xml b/GameServer/world.xml index ca5be12..97abe46 100644 --- a/GameServer/world.xml +++ b/GameServer/world.xml @@ -25,4 +25,8 @@ None None None + + + 192.168.0.255 + 1800000