From 286b755ee33e35f054a85c20e861ed0a2590f41b Mon Sep 17 00:00:00 2001 From: games647 Date: Sat, 23 May 2020 21:39:47 +0200 Subject: [PATCH] Log player handling Related #354 --- README.md | 4 ++-- .../games647/fastlogin/bungee/listener/ConnectListener.java | 5 ++++- .../games647/fastlogin/core/shared/JoinManagement.java | 1 + core/src/main/resources/config.yml | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index dd7a91ca..12076d7c 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ Possible values: `Premium`, `Cracked`, `Unknown` * Run Spigot (or a fork e.g. Paper) and/or BungeeCord (or a fork e.g. Waterfall) in offline mode * An auth plugin. Supported plugins -### Bukkit/Spigot/Paper +### Spigot/Paper * [AuthMe (5.X)](https://dev.bukkit.org/bukkit-plugins/authme-reloaded/) * [xAuth](https://dev.bukkit.org/bukkit-plugins/xauth/) @@ -97,7 +97,7 @@ This plugin performs network requests to: ## How to install -### Bukkit/Spigot/Paper +### Spigot/Paper 1. Download and install ProtocolLib/ProtocolSupport 2. Download and install FastLogin (or FastLoginBukkit for newer versions) diff --git a/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/ConnectListener.java b/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/ConnectListener.java index 8c11cdad..a70947b9 100644 --- a/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/ConnectListener.java +++ b/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/ConnectListener.java @@ -81,8 +81,11 @@ public class ConnectListener implements Listener { return; } - preLoginEvent.registerIntent(plugin); + InitialHandler initialHandler = (InitialHandler) connection; + String username = initialHandler.getLoginRequest().getData(); + plugin.getLog().info("Incoming login request for {} from {}", username, initialHandler.getAddress()); + preLoginEvent.registerIntent(plugin); Runnable asyncPremiumCheck = new AsyncPremiumCheck(plugin, preLoginEvent, connection); plugin.getScheduler().runAsync(asyncPremiumCheck); } diff --git a/core/src/main/java/com/github/games647/fastlogin/core/shared/JoinManagement.java b/core/src/main/java/com/github/games647/fastlogin/core/shared/JoinManagement.java index 4118355c..815e2393 100644 --- a/core/src/main/java/com/github/games647/fastlogin/core/shared/JoinManagement.java +++ b/core/src/main/java/com/github/games647/fastlogin/core/shared/JoinManagement.java @@ -21,6 +21,7 @@ public abstract class JoinManagement

{ } public void onLogin(String username, S source) { + core.getPlugin().getLog().info("Handling player {}", username); StoredProfile profile = core.getStorage().loadProfile(username); if (profile == null) { return; diff --git a/core/src/main/resources/config.yml b/core/src/main/resources/config.yml index 72ce66e2..3e932e45 100644 --- a/core/src/main/resources/config.yml +++ b/core/src/main/resources/config.yml @@ -6,7 +6,7 @@ # https://github.com/games647/FastLogin/blob/master/core/src/main/resources/config.yml # This a **very** simple anti bot protection. Recommendation is to use a a dedicated program to approach this -# problem. Low level firewalls like iptables, ufw are more efficient than a Minecraft plugin. TCP reverse +# problem. Low level firewalls like uwf (or iptables direct) are more efficient than a Minecraft plugin. TCP reverse # proxies could also be used and offload some work even to different host. # # The settings wil limit how many connections this plugin will handle. After hitting this limit. FastLogin will