public static void togglePlayersFactionsChannel( String player, Boolean inFaction ) throws SQLException {
        BSPlayer p = PlayerManager.getPlayer( player );
        String channel = p.getChannel();
        String newchannel;
        if ( !inFaction ) {
            p.sendMessage( Messages.FACTION_NONE );
            return;
        }
        if ( channel.equals( "Faction" ) ) {
            newchannel = "FactionAlly";
            p.sendMessage( Messages.FACTION_ALLY_TOGGLE );
        } else if ( channel.equals( "FactionAlly" ) ) {
            newchannel = getServersDefaultChannel( p.getServerData() );
            p.sendMessage( Messages.CHANNEL_TOGGLE.replace( "{channel}", newchannel ) );
        } else {
            newchannel = "Faction";
            p.sendMessage( Messages.FACTION_TOGGLE );
        }
        Channel c = getChannel( newchannel );
        setPlayersChannel( p, c, false );
    }