Don't scare users with debug mode.

Dieser Commit ist enthalten in:
md_5 2013-02-09 20:42:08 +11:00
Ursprung 41579ff315
Commit a2ffb31ddb

Datei anzeigen

@ -1,4 +1,4 @@
From 9e2329b60e63dbab24af3aa6cc7bbeac3bdb25fc Mon Sep 17 00:00:00 2001
From 2fce59cd82dd5f03174884b81b94d8ddecf484a3 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 3 Feb 2013 10:24:33 +1100
Subject: [PATCH] Netty
@ -17,12 +17,12 @@ This commit is licensed under the Creative Commons Attribution-ShareAlike 3.0 Un
.../net/minecraft/server/PendingConnection.java | 11 +-
src/main/java/org/spigotmc/netty/CipherCodec.java | 65 ++++++
.../org/spigotmc/netty/NettyNetworkManager.java | 192 ++++++++++++++++
.../org/spigotmc/netty/NettyServerConnection.java | 99 ++++++++
.../org/spigotmc/netty/NettyServerConnection.java | 98 ++++++++
.../org/spigotmc/netty/NettySocketAdaptor.java | 248 +++++++++++++++++++++
.../java/org/spigotmc/netty/PacketDecoder.java | 52 +++++
.../java/org/spigotmc/netty/PacketEncoder.java | 43 ++++
.../java/org/spigotmc/netty/PacketListener.java | 100 +++++++++
10 files changed, 818 insertions(+), 4 deletions(-)
10 files changed, 817 insertions(+), 4 deletions(-)
create mode 100644 src/main/java/org/spigotmc/netty/CipherCodec.java
create mode 100644 src/main/java/org/spigotmc/netty/NettyNetworkManager.java
create mode 100644 src/main/java/org/spigotmc/netty/NettyServerConnection.java
@ -176,7 +176,7 @@ index 0000000..cfc0535
+}
diff --git a/src/main/java/org/spigotmc/netty/NettyNetworkManager.java b/src/main/java/org/spigotmc/netty/NettyNetworkManager.java
new file mode 100644
index 0000000..c10d391
index 0000000..a281ff9
--- /dev/null
+++ b/src/main/java/org/spigotmc/netty/NettyNetworkManager.java
@@ -0,0 +1,192 @@
@ -249,9 +249,9 @@ index 0000000..c10d391
+ @Override
+ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
+ // TODO: Remove this once we are more stable
+ Bukkit.getServer().getLogger().severe("======================= Start Netty Debug Log =======================");
+ Bukkit.getServer().getLogger().log(Level.SEVERE, "Error caught whilst handling " + channel, cause);
+ Bukkit.getServer().getLogger().severe("======================= End Netty Debug Log =======================");
+ // Bukkit.getServer().getLogger().severe("======================= Start Netty Debug Log =======================");
+ // Bukkit.getServer().getLogger().log(Level.SEVERE, "Error caught whilst handling " + channel, cause);
+ // Bukkit.getServer().getLogger().severe("======================= End Netty Debug Log =======================");
+
+ // Disconnect with generic reason + exception
+ a("disconnect.genericReason", new Object[]{"Internal exception: " + cause});
@ -374,13 +374,12 @@ index 0000000..c10d391
+}
diff --git a/src/main/java/org/spigotmc/netty/NettyServerConnection.java b/src/main/java/org/spigotmc/netty/NettyServerConnection.java
new file mode 100644
index 0000000..c051e32
index 0000000..427662e
--- /dev/null
+++ b/src/main/java/org/spigotmc/netty/NettyServerConnection.java
@@ -0,0 +1,99 @@
@@ -0,0 +1,98 @@
+package org.spigotmc.netty;
+
+import com.google.common.collect.Lists;
+import io.netty.bootstrap.ServerBootstrap;
+import io.netty.channel.Channel;
+import io.netty.channel.ChannelFuture;