mirror of
https://github.com/moparisthebest/MoparClassic
synced 2024-11-11 11:45:09 -05:00
Forgot unused-ip entry in world.xml.
Added config option for ip ban removal delay.
This commit is contained in:
parent
40abc56b0f
commit
a0aa5d6cdd
@ -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();
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user