mirror of
https://github.com/PaperMC/Waterfall.git
synced 2025-01-28 02:21:34 +01:00
Finish splitting logger patch
This commit is contained in:
parent
ebe244c9ec
commit
1f25a5d273
@ -1,4 +1,4 @@
|
|||||||
From 805001ea20a26c3bcff5c81828685cf77b010758 Mon Sep 17 00:00:00 2001
|
From b59b64610c3cafc27f28602efd104477760cde45 Mon Sep 17 00:00:00 2001
|
||||||
From: Juan Cruz Linsalata <LinsaFTW@users.noreply.github.com>
|
From: Juan Cruz Linsalata <LinsaFTW@users.noreply.github.com>
|
||||||
Date: Mon, 12 Oct 2020 15:40:53 -0300
|
Date: Mon, 12 Oct 2020 15:40:53 -0300
|
||||||
Subject: [PATCH] FlameCord General Patch
|
Subject: [PATCH] FlameCord General Patch
|
||||||
@ -55,10 +55,10 @@ index 000000000..8957c79ac
|
|||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..650cb3028
|
index 000000000..81ded2243
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
+++ b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
||||||
@@ -0,0 +1,72 @@
|
@@ -0,0 +1,64 @@
|
||||||
+package dev._2lstudios.flamecord.configuration;
|
+package dev._2lstudios.flamecord.configuration;
|
||||||
+
|
+
|
||||||
+import java.io.File;
|
+import java.io.File;
|
||||||
@ -73,9 +73,6 @@ index 000000000..650cb3028
|
|||||||
+import net.md_5.bungee.config.ConfigurationProvider;
|
+import net.md_5.bungee.config.ConfigurationProvider;
|
||||||
+
|
+
|
||||||
+public class FlameCordConfiguration {
|
+public class FlameCordConfiguration {
|
||||||
+ @Getter
|
|
||||||
+ private boolean loggerInitialhandler = false, loggerExceptions = false, loggerDump = false;
|
|
||||||
+
|
|
||||||
+ public FlameCordConfiguration(final ConfigurationProvider configurationProvider) {
|
+ public FlameCordConfiguration(final ConfigurationProvider configurationProvider) {
|
||||||
+ try {
|
+ try {
|
||||||
+ final String fileName = "./flamecord.yml";
|
+ final String fileName = "./flamecord.yml";
|
||||||
@ -89,11 +86,6 @@ index 000000000..650cb3028
|
|||||||
+ configuration = configurationProvider.load(configurationFile);
|
+ configuration = configurationProvider.load(configurationFile);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ this.loggerInitialhandler = setIfUnexistant("logger.initialhandler", this.loggerInitialhandler,
|
|
||||||
+ configuration);
|
|
||||||
+ this.loggerExceptions = setIfUnexistant("logger.exceptions", this.loggerExceptions, configuration);
|
|
||||||
+ this.loggerDump = setIfUnexistant("logger.dump", this.loggerDump, configuration);
|
|
||||||
+
|
|
||||||
+ if (!configurationExists) {
|
+ if (!configurationExists) {
|
||||||
+ configurationProvider.save(configuration, configurationFile);
|
+ configurationProvider.save(configuration, configurationFile);
|
||||||
+ }
|
+ }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From a9337cf77d233e0f7429c899ffd374c9d8b73641 Mon Sep 17 00:00:00 2001
|
From fd88f8b5de095c410ee19136015eb2624e416ec4 Mon Sep 17 00:00:00 2001
|
||||||
From: linsaftw <25271111+linsaftw@users.noreply.github.com>
|
From: linsaftw <25271111+linsaftw@users.noreply.github.com>
|
||||||
Date: Fri, 30 Apr 2021 22:54:44 -0300
|
Date: Fri, 30 Apr 2021 22:54:44 -0300
|
||||||
Subject: [PATCH] Firewall System
|
Subject: [PATCH] Firewall System
|
||||||
@ -64,34 +64,37 @@ index 8957c79ac..fd889644f 100644
|
|||||||
}
|
}
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
||||||
index 650cb3028..b7268e1d3 100644
|
index 81ded2243..8bb61ac11 100644
|
||||||
--- a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
--- a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
||||||
+++ b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
+++ b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
||||||
@@ -13,7 +13,12 @@ import net.md_5.bungee.config.ConfigurationProvider;
|
@@ -12,6 +12,15 @@ import net.md_5.bungee.config.Configuration;
|
||||||
|
import net.md_5.bungee.config.ConfigurationProvider;
|
||||||
|
|
||||||
public class FlameCordConfiguration {
|
public class FlameCordConfiguration {
|
||||||
@Getter
|
+ @Getter
|
||||||
- private boolean loggerInitialhandler = false, loggerExceptions = false, loggerDump = false;
|
+ private boolean firewallNotify = true;
|
||||||
+ private boolean loggerInitialhandler = false, loggerExceptions = false, loggerDump = false, firewallNotify = true,
|
+ @Getter
|
||||||
+ firewallEnabled = true;
|
+ private boolean firewallEnabled = true;
|
||||||
+ @Getter
|
+ @Getter
|
||||||
+ private int firewallSeconds = 60;
|
+ private int firewallSeconds = 60;
|
||||||
+ @Getter
|
+ @Getter
|
||||||
+ private Collection<String> firewallNames = new HashSet<>(Arrays.asList(new String[] { "mcspam" }));
|
+ private Collection<String> firewallNames = new HashSet<>(Arrays.asList(new String[] { "mcspam" }));
|
||||||
|
+
|
||||||
public FlameCordConfiguration(final ConfigurationProvider configurationProvider) {
|
public FlameCordConfiguration(final ConfigurationProvider configurationProvider) {
|
||||||
try {
|
try {
|
||||||
@@ -32,6 +37,10 @@ public class FlameCordConfiguration {
|
final String fileName = "./flamecord.yml";
|
||||||
configuration);
|
@@ -25,6 +34,11 @@ public class FlameCordConfiguration {
|
||||||
this.loggerExceptions = setIfUnexistant("logger.exceptions", this.loggerExceptions, configuration);
|
configuration = configurationProvider.load(configurationFile);
|
||||||
this.loggerDump = setIfUnexistant("logger.dump", this.loggerDump, configuration);
|
}
|
||||||
|
|
||||||
+ this.firewallEnabled = setIfUnexistant("firewall.enabled", this.firewallEnabled, configuration);
|
+ this.firewallEnabled = setIfUnexistant("firewall.enabled", this.firewallEnabled, configuration);
|
||||||
+ this.firewallNotify = setIfUnexistant("firewall.notify", this.firewallNotify, configuration);
|
+ this.firewallNotify = setIfUnexistant("firewall.notify", this.firewallNotify, configuration);
|
||||||
+ this.firewallSeconds = setIfUnexistant("firewall.seconds", this.firewallSeconds, configuration);
|
+ this.firewallSeconds = setIfUnexistant("firewall.seconds", this.firewallSeconds, configuration);
|
||||||
+ this.firewallNames = setIfUnexistant("firewall.names", this.firewallNames, configuration);
|
+ this.firewallNames = setIfUnexistant("firewall.names", this.firewallNames, configuration);
|
||||||
|
+
|
||||||
if (!configurationExists) {
|
if (!configurationExists) {
|
||||||
configurationProvider.save(configuration, configurationFile);
|
configurationProvider.save(configuration, configurationFile);
|
||||||
|
}
|
||||||
diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java
|
diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java
|
||||||
index ebfaa761c..c88077ade 100644
|
index ebfaa761c..c88077ade 100644
|
||||||
--- a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java
|
--- a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java
|
||||||
|
@ -1,32 +1,44 @@
|
|||||||
From 83d77a25bc63fe25486d0171e7fae3ddc1aa1ab2 Mon Sep 17 00:00:00 2001
|
From 4e2cb9724d144d7d0257716b50984d7fd164535d Mon Sep 17 00:00:00 2001
|
||||||
From: linsaftw <25271111+linsaftw@users.noreply.github.com>
|
From: linsaftw <25271111+linsaftw@users.noreply.github.com>
|
||||||
Date: Fri, 30 Apr 2021 23:51:51 -0300
|
Date: Fri, 30 Apr 2021 23:51:51 -0300
|
||||||
Subject: [PATCH] FlameCord logger options
|
Subject: [PATCH] FlameCord logger options
|
||||||
|
|
||||||
|
|
||||||
diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
||||||
index b7268e1d..ea641bcf 100644
|
index 8bb61ac11..8822c6d33 100644
|
||||||
--- a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
--- a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
||||||
+++ b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
+++ b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java
|
||||||
@@ -16,6 +16,8 @@ public class FlameCordConfiguration {
|
@@ -12,6 +12,15 @@ import net.md_5.bungee.config.Configuration;
|
||||||
private boolean loggerInitialhandler = false, loggerExceptions = false, loggerDump = false, firewallNotify = true,
|
import net.md_5.bungee.config.ConfigurationProvider;
|
||||||
firewallEnabled = true;
|
|
||||||
@Getter
|
public class FlameCordConfiguration {
|
||||||
+ private boolean loggerHaProxy = false;
|
|
||||||
+ @Getter
|
+ @Getter
|
||||||
private int firewallSeconds = 60;
|
+ private boolean loggerInitialhandler = false;
|
||||||
|
+ @Getter
|
||||||
|
+ private boolean loggerExceptions = false;
|
||||||
|
+ @Getter
|
||||||
|
+ private boolean loggerDump = false;
|
||||||
|
+ @Getter
|
||||||
|
+ private boolean loggerHaProxy = false;
|
||||||
|
+
|
||||||
@Getter
|
@Getter
|
||||||
private Collection<String> firewallNames = new HashSet<>(Arrays.asList(new String[] { "mcspam" }));
|
private boolean firewallNotify = true;
|
||||||
@@ -37,6 +39,7 @@ public class FlameCordConfiguration {
|
@Getter
|
||||||
configuration);
|
@@ -34,6 +43,12 @@ public class FlameCordConfiguration {
|
||||||
this.loggerExceptions = setIfUnexistant("logger.exceptions", this.loggerExceptions, configuration);
|
configuration = configurationProvider.load(configurationFile);
|
||||||
this.loggerDump = setIfUnexistant("logger.dump", this.loggerDump, configuration);
|
}
|
||||||
|
|
||||||
|
+ this.loggerInitialhandler = setIfUnexistant("logger.initialhandler", this.loggerInitialhandler,
|
||||||
|
+ configuration);
|
||||||
|
+ this.loggerExceptions = setIfUnexistant("logger.exceptions", this.loggerExceptions, configuration);
|
||||||
|
+ this.loggerDump = setIfUnexistant("logger.dump", this.loggerDump, configuration);
|
||||||
+ this.loggerHaProxy = setIfUnexistant("logger.haproxy", this.loggerHaProxy, configuration);
|
+ this.loggerHaProxy = setIfUnexistant("logger.haproxy", this.loggerHaProxy, configuration);
|
||||||
|
+
|
||||||
this.firewallEnabled = setIfUnexistant("firewall.enabled", this.firewallEnabled, configuration);
|
this.firewallEnabled = setIfUnexistant("firewall.enabled", this.firewallEnabled, configuration);
|
||||||
this.firewallNotify = setIfUnexistant("firewall.notify", this.firewallNotify, configuration);
|
this.firewallNotify = setIfUnexistant("firewall.notify", this.firewallNotify, configuration);
|
||||||
this.firewallSeconds = setIfUnexistant("firewall.seconds", this.firewallSeconds, configuration);
|
this.firewallSeconds = setIfUnexistant("firewall.seconds", this.firewallSeconds, configuration);
|
||||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||||
index 18bab507..86869e5b 100644
|
index 18bab507a..86869e5b4 100644
|
||||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||||
@@ -369,7 +369,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
@@ -369,7 +369,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||||
@ -50,7 +62,7 @@ index 18bab507..86869e5b 100644
|
|||||||
bungee.getLogger().log( Level.INFO, "{0} has connected", this );
|
bungee.getLogger().log( Level.INFO, "{0} has connected", this );
|
||||||
}
|
}
|
||||||
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
|
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
|
||||||
index 5de0414e..9f70323e 100644
|
index 5de0414ec..9f70323ee 100644
|
||||||
--- a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
|
--- a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
|
||||||
+++ b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
|
+++ b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
|
||||||
@@ -48,7 +48,8 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
|
@@ -48,7 +48,8 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
|
||||||
@ -102,7 +114,7 @@ index 5de0414e..9f70323e 100644
|
|||||||
logExceptions = cause instanceof FirewallException ? false : logExceptions;
|
logExceptions = cause instanceof FirewallException ? false : logExceptions;
|
||||||
|
|
||||||
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
|
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
|
||||||
index 81987ca3..8808a989 100644
|
index 81987ca39..8808a989c 100644
|
||||||
--- a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
|
--- a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
|
||||||
+++ b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
|
+++ b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
|
||||||
@@ -115,7 +115,10 @@ public class PipelineUtils
|
@@ -115,7 +115,10 @@ public class PipelineUtils
|
||||||
|
Loading…
Reference in New Issue
Block a user