Close issue #311 - exception feedback on server connector

This commit is contained in:
md_5 2013-05-04 09:28:28 +10:00
parent 125df5c22d
commit 8e262cf428

View File

@ -55,6 +55,19 @@ public class ServerConnector extends PacketHandler
ENCRYPT_REQUEST, ENCRYPT_RESPONSE, LOGIN, FINISHED;
}
@Override
public void exception(Throwable t) throws Exception
{
String message = "Exception Connectiong:" + Util.exception( t );
if ( user.getServer() == null || user.getServer().isForgeWrapper() )
{
user.disconnect( message );
} else
{
user.sendMessage( ChatColor.RED + message );
}
}
@Override
public void connected(ChannelWrapper channel) throws Exception
{