Small code / api cleanup. Need to fix kicking in general, especially in ServerConnector before release.

This commit is contained in:
md_5 2013-03-11 10:06:14 +11:00
parent 2e33ab1460
commit 76319371f7
7 changed files with 3 additions and 25 deletions

View File

@ -30,14 +30,6 @@ public interface PendingConnection extends Connection
*/ */
public InetSocketAddress getVirtualHost(); public InetSocketAddress getVirtualHost();
/**
* Completely kick this user from the proxy and all of its child
* connections.
*
* @param reason the disconnect reason displayed to the player
*/
public void disconnect(String reason);
/** /**
* Get the listener that accepted this connection. * Get the listener that accepted this connection.
* *

View File

@ -48,13 +48,6 @@ public interface ProxiedPlayer extends Connection, CommandSender
*/ */
public int getPing(); public int getPing();
/**
* Disconnect (remove) this player from the proxy with the specified reason.
*
* @param reason the reason displayed to the player
*/
public void disconnect(String reason);
/** /**
* Send a plugin message to this player. * Send a plugin message to this player.
* *

View File

@ -3,7 +3,6 @@ package net.md_5.bungee;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.StringWriter; import java.io.StringWriter;
import java.text.MessageFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.logging.FileHandler; import java.util.logging.FileHandler;
import java.util.logging.Formatter; import java.util.logging.Formatter;
@ -21,7 +20,7 @@ public class Logger extends java.util.logging.Logger
public Logger() public Logger()
{ {
super( "RubberBand", null ); super( "BungeeCord", null );
try try
{ {
FileHandler handler = new FileHandler( "proxy.log", 1 << 14, 1, true ); FileHandler handler = new FileHandler( "proxy.log", 1 << 14, 1, true );

View File

@ -1,8 +1,6 @@
package net.md_5.bungee; package net.md_5.bungee;
import io.netty.channel.Channel; import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelFutureListener;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import lombok.Getter; import lombok.Getter;

View File

@ -23,7 +23,6 @@ import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.config.ServerInfo; import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.connection.PendingConnection; import net.md_5.bungee.api.connection.PendingConnection;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
import net.md_5.bungee.api.event.ServerConnectEvent; import net.md_5.bungee.api.event.ServerConnectEvent;
import net.md_5.bungee.netty.HandlerBoss; import net.md_5.bungee.netty.HandlerBoss;
import net.md_5.bungee.netty.PipelineUtils; import net.md_5.bungee.netty.PipelineUtils;

View File

@ -184,9 +184,9 @@ public class InitialHandler extends PacketHandler implements PendingConnection
ch.pipeline().addBefore( "decoder", "cipher", new CipherCodec( encrypt, decrypt ) ); ch.pipeline().addBefore( "decoder", "cipher", new CipherCodec( encrypt, decrypt ) );
thisState = InitialHandler.State.LOGIN; thisState = InitialHandler.State.LOGIN;
} catch ( Exception ex ) } catch ( Throwable t )
{ {
disconnect( "[Report to md_5 / Server Owner] " + Util.exception( ex ) ); disconnect( "[Report to md_5 / Server Owner] " + Util.exception( t ) );
} }
} }
}.start(); }.start();

View File

@ -1,13 +1,10 @@
package net.md_5.bungee.netty; package net.md_5.bungee.netty;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel; import io.netty.channel.Channel;
import io.netty.channel.ChannelConfig; import io.netty.channel.ChannelConfig;
import io.netty.channel.ChannelException; import io.netty.channel.ChannelException;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption; import io.netty.channel.ChannelOption;
import io.netty.channel.ChannelOutboundMessageHandlerAdapter;
import io.netty.handler.timeout.ReadTimeoutHandler; import io.netty.handler.timeout.ReadTimeoutHandler;
import io.netty.util.AttributeKey; import io.netty.util.AttributeKey;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;