}
// perform the kick, sending a kick message if possible
if (isActive() && (getProtocol() instanceof LoginProtocol || getProtocol() instanceof PlayProtocol)) {
// channel is both currently connected and in a protocol state allowing kicks
sendWithFuture(new KickMessage(reason)).addListener(ChannelFutureListener.CLOSE);
} else {
getChannel().close();
}
}