Make forced hosts take higher priority than force default. Closes #184
This commit is contained in:
parent
4811e7be4f
commit
704fe11b05
@ -53,15 +53,14 @@ public class YamlReconnectHandler implements ReconnectHandler
|
|||||||
{
|
{
|
||||||
ListenerInfo listener = player.getPendingConnection().getListener();
|
ListenerInfo listener = player.getPendingConnection().getListener();
|
||||||
String name;
|
String name;
|
||||||
if ( listener.isForceDefault() )
|
String forced = listener.getForcedHosts().get( player.getPendingConnection().getVirtualHost().getHostName() );
|
||||||
|
if ( forced == null && listener.isForceDefault() )
|
||||||
{
|
{
|
||||||
name = listener.getDefaultServer();
|
forced = listener.getDefaultServer();
|
||||||
} else
|
|
||||||
{
|
|
||||||
String forced = listener.getForcedHosts().get( player.getPendingConnection().getVirtualHost().getHostName() );
|
|
||||||
String server = ( forced == null ) ? data.get( key( player ) ) : forced;
|
|
||||||
name = ( server != null ) ? server : listener.getDefaultServer();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String server = ( forced == null ) ? data.get( key( player ) ) : forced;
|
||||||
|
name = ( server != null ) ? server : listener.getDefaultServer();
|
||||||
ServerInfo info = ProxyServer.getInstance().getServerInfo( name );
|
ServerInfo info = ProxyServer.getInstance().getServerInfo( name );
|
||||||
if ( info == null )
|
if ( info == null )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user