public static void handlePart(String channel) {
        if ( channel.isEmpty() ) {
            channel = getActiveTab().getTabName();
            if ( !isChannelTabActive() ) {
                showNotActiveChannelWarning();
                return;
            }
        }

        ChannelTab channelTab = getCurrentServerTab().getChannelTabByName(channel);

        if (channelTab == null) {
            clearInput();
            return;
        }

        channelTab.getServerTab().getConnection().partChannel(channel);
        channelTab.getServerTab().removeChannelTab(channelTab);
        clearInput();
    }