public static void togglePlayersTownyChannel( String player, Boolean inTown, Boolean inNation ) throws SQLException {
        BSPlayer p = PlayerManager.getPlayer( player );
        String channel = p.getChannel();
        String newchannel;
        if ( !inTown ) {
            p.sendMessage( Messages.TOWNY_NONE );
            return;
        }
        if ( channel.equals( "Town" ) && inNation ) {
            newchannel = "Nation";
            p.sendMessage( Messages.TOWNY_NATION_TOGGLE );
        } else if ( channel.equals( "Nation" ) || channel.equals( "Town" ) ) {
            newchannel = getServersDefaultChannel( p.getServerData() );
            p.sendMessage( Messages.CHANNEL_TOGGLE.replace( "{channel}", newchannel ) );
        } else {
            newchannel = "Town";
            p.sendMessage( Messages.TOWNY_TOGGLE );
        }
        Channel c = getChannel( newchannel );
        setPlayersChannel( p, c, false );
    }