public void Initialize(Scene scene, IConfigSource source)
        {
            if (m_firstScene == null)
            {
                m_firstScene = scene;

                IConfig startupConfig = source.Configs["Startup"];
                if (startupConfig != null)
                {
                    m_enabled = !startupConfig.GetBoolean("gridmode", false);
                }

                if (m_enabled)
                {
                    bool    authenticate = true;
                    string  welcomeMessage = "Welcome to InWorldz", mapServerURI = String.Empty, profileServerURI = String.Empty;
                    IConfig standaloneConfig = source.Configs["StandAlone"];
                    if (standaloneConfig != null)
                    {
                        authenticate     = standaloneConfig.GetBoolean("accounts_authenticate", true);
                        welcomeMessage   = standaloneConfig.GetString("welcome_message");
                        mapServerURI     = standaloneConfig.GetString("map_server_uri", String.Empty);
                        profileServerURI = standaloneConfig.GetString("profile_server_uri", String.Empty);
                    }

                    //TODO: fix casting.
                    LibraryRootFolder rootFolder
                        = m_firstScene.CommsManager.LibraryRoot as LibraryRootFolder;

                    IHttpServer httpServer = m_firstScene.CommsManager.HttpServer;

                    //TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference
                    m_loginService = new LLStandaloneLoginService((UserProfileManager)m_firstScene.CommsManager.UserAdminService, mapServerURI, profileServerURI, welcomeMessage, m_firstScene.CommsManager.NetworkServersInfo, authenticate, rootFolder, this);

                    httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);

                    // New Style
                    httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("login_to_simulator"), m_loginService.XmlRpcLoginMethod));

                    // provides the web form login
                    httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin);
                }
            }

            if (m_enabled)
            {
                AddScene(scene);
            }
        }
Пример #2
0
        public void Initialise(Scene scene, IConfigSource source)
        {
            if (m_firstScene == null)
            {
                m_firstScene = scene;

                IConfig startupConfig = source.Configs["Startup"];
                if (startupConfig != null)
                {
                    m_enabled = !startupConfig.GetBoolean("gridmode", false);
                }

                if (m_enabled)
                {
                    bool    authenticate     = true;
                    string  welcomeMessage   = "Welcome to OpenSim";
                    IConfig standaloneConfig = source.Configs["StandAlone"];
                    if (standaloneConfig != null)
                    {
                        authenticate   = standaloneConfig.GetBoolean("accounts_authenticate", true);
                        welcomeMessage = standaloneConfig.GetString("welcome_message");
                    }

                    //TODO: fix casting.
                    LibraryRootFolder rootFolder
                        = m_firstScene.CommsManager.UserProfileCacheService.LibraryRoot as LibraryRootFolder;

                    IHttpServer httpServer = m_firstScene.CommsManager.HttpServer;

                    //TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference
                    m_loginService = new LLStandaloneLoginService((UserManagerBase)m_firstScene.CommsManager.UserAdminService, welcomeMessage, m_firstScene.CommsManager.InterServiceInventoryService, m_firstScene.CommsManager.NetworkServersInfo, authenticate, rootFolder, this);

                    httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);

                    // provides the web form login
                    httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin);

                    // Provides the LLSD login
                    httpServer.SetDefaultLLSDHandler(m_loginService.LLSDLoginMethod);
                }
            }

            if (m_enabled)
            {
                AddScene(scene);
            }
        }
        public void RegionLoaded(Scene scene)
        {
            if (m_firstScene == null)
            {
                m_firstScene = scene;

                if (m_enabled)
                {
                    //TODO: fix casting.
                    LibraryRootFolder rootFolder
                        = m_firstScene.CommsManager.UserProfileCacheService.LibraryRoot as LibraryRootFolder;

                    IHttpServer httpServer = m_firstScene.CommsManager.HttpServer;

                    //TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference
                    m_loginService
                        = new LLStandaloneLoginService(
                              (UserManagerBase)m_firstScene.CommsManager.UserAdminService, welcomeMessage,
                              m_firstScene.InventoryService, m_firstScene.CommsManager.NetworkServersInfo, authenticate,
                              rootFolder, this);

                    httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);

                    // provides the web form login
                    httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin);

                    // Provides the LLSD login
                    httpServer.SetDefaultLLSDHandler(m_loginService.LLSDLoginMethod);
                }
            }

            if (m_enabled)
            {
                AddScene(scene);
            }
        }
Пример #4
0
        public void RegionLoaded(Scene scene)
        {
            if (m_firstScene == null)
            {
                m_firstScene = scene;

                if (m_enabled)
                {
                    //TODO: fix casting.
                    LibraryRootFolder rootFolder
                        = m_firstScene.CommsManager.UserProfileCacheService.LibraryRoot as LibraryRootFolder;

                    IHttpServer httpServer = MainServer.Instance;

                    //TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference
                    m_loginService 
                        = new LLStandaloneLoginService(
                            (UserManagerBase)m_firstScene.CommsManager.UserAdminService, welcomeMessage, 
                            m_firstScene.InventoryService, m_firstScene.CommsManager.NetworkServersInfo, authenticate, 
                            rootFolder, this);

                    httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);

                    // provides the web form login
                    httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin);

                    // Provides the LLSD login
                    httpServer.SetDefaultLLSDHandler(m_loginService.LLSDLoginMethod);
                }
            }

            if (m_enabled)
            {
                AddScene(scene);
            }
        }
        public void Initialize(Scene scene, IConfigSource source)
        {
            if (m_firstScene == null)
            {
                m_firstScene = scene;

                IConfig startupConfig = source.Configs["Startup"];
                if (startupConfig != null)
                {
                    m_enabled = !startupConfig.GetBoolean("gridmode", false);
                }

                if (m_enabled)
                {
                    bool authenticate = true;
                    string welcomeMessage = "Welcome to InWorldz", mapServerURI = "";
                    IConfig standaloneConfig = source.Configs["StandAlone"];
                    if (standaloneConfig != null)
                    {
                        authenticate = standaloneConfig.GetBoolean("accounts_authenticate", true);
                        welcomeMessage = standaloneConfig.GetString("welcome_message");
                        mapServerURI = standaloneConfig.GetString("map_server_uri", "");
                    }

                    //TODO: fix casting.
                    LibraryRootFolder rootFolder 
                        = m_firstScene.CommsManager.LibraryRoot as LibraryRootFolder;
                   
                    IHttpServer httpServer = m_firstScene.CommsManager.HttpServer;

                    //TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference
                    m_loginService = new LLStandaloneLoginService((UserProfileManager)m_firstScene.CommsManager.UserAdminService, mapServerURI, welcomeMessage, m_firstScene.CommsManager.NetworkServersInfo, authenticate, rootFolder, this);

                    httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);

                    // New Style
                    httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("login_to_simulator"), m_loginService.XmlRpcLoginMethod));

                    // provides the web form login
                    httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin);
                }
            }

            if (m_enabled)
            {
                AddScene(scene);
            }
        }