mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-06-22 20:55:04 +02:00
print disconnect message of InitialHandlers
This commit is contained in:
parent
8537709045
commit
46fddc4110
|
@ -60,9 +60,22 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
|
||||||
channel.markClosed();
|
channel.markClosed();
|
||||||
handler.disconnected( channel );
|
handler.disconnected( channel );
|
||||||
|
|
||||||
if ( !( handler instanceof InitialHandler || handler instanceof PingHandler ) )
|
if ( !( handler instanceof PingHandler ) )
|
||||||
{
|
{
|
||||||
ProxyServer.getInstance().getLogger().log( Level.INFO, "{0} has disconnected", handler );
|
if ( handler instanceof InitialHandler )
|
||||||
|
{
|
||||||
|
InitialHandler initialHandler = (InitialHandler) handler;
|
||||||
|
if ( initialHandler.getDisconnectMessage() != null )
|
||||||
|
{
|
||||||
|
ProxyServer.getInstance().getLogger().log( Level.INFO, "{0} has disconnected: {1}", new Object[]
|
||||||
|
{
|
||||||
|
handler, initialHandler.getDisconnectMessage().toPlainText()
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
ProxyServer.getInstance().getLogger().log( Level.INFO, "{0} has disconnected", handler );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user