diff --git a/OpenSim/Client/Linden/LLProxyLoginModule.cs b/OpenSim/Client/Linden/LLProxyLoginModule.cs index 9075f15f43..14ce682084 100644 --- a/OpenSim/Client/Linden/LLProxyLoginModule.cs +++ b/OpenSim/Client/Linden/LLProxyLoginModule.cs @@ -60,21 +60,6 @@ namespace OpenSim.Client.Linden m_port = port; } - protected bool RegionLoginsEnabled - { - get - { - if (m_firstScene != null) - { - return m_firstScene.SceneGridService.RegionLoginsEnabled; - } - else - { - return false; - } - } - } - protected List m_scenes = new List(); protected Scene m_firstScene; @@ -239,67 +224,53 @@ namespace OpenSim.Client.Linden agentData.child = false; } - if (!RegionLoginsEnabled) - { - m_log.InfoFormat( - "[CLIENT]: Denying access for user {0} {1} because region login is currently disabled", - agentData.firstname, agentData.lastname); + bool success = false; + string denyMess = ""; + Scene scene; + if (TryGetRegion(regionHandle, out scene)) + { + if (scene.RegionInfo.EstateSettings.IsBanned(agentData.AgentID)) + { + denyMess = "User is banned from this region"; + m_log.InfoFormat( + "[CLIENT]: Denying access for user {0} {1} because user is banned", + agentData.firstname, agentData.lastname); + } + else + { + string reason; + if (scene.NewUserConnection(agentData, (uint)TeleportFlags.ViaLogin, out reason)) + { + success = true; + } + else + { + denyMess = String.Format("Login refused by region: {0}", reason); + m_log.InfoFormat( + "[CLIENT]: Denying access for user {0} {1} because user connection was refused by the region", + agentData.firstname, agentData.lastname); + } + } + + } + else + { + denyMess = "Region not found"; + } + + if (success) + { Hashtable respdata = new Hashtable(); - respdata["success"] = "FALSE"; - respdata["reason"] = "region login currently disabled"; + respdata["success"] = "TRUE"; resp.Value = respdata; } else { - bool success = false; - string denyMess = ""; - - Scene scene; - if (TryGetRegion(regionHandle, out scene)) - { - if (scene.RegionInfo.EstateSettings.IsBanned(agentData.AgentID)) - { - denyMess = "User is banned from this region"; - m_log.InfoFormat( - "[CLIENT]: Denying access for user {0} {1} because user is banned", - agentData.firstname, agentData.lastname); - } - else - { - string reason; - if (scene.NewUserConnection(agentData, (uint)TeleportFlags.ViaLogin, out reason)) - { - success = true; - } - else - { - denyMess = String.Format("Login refused by region: {0}", reason); - m_log.InfoFormat( - "[CLIENT]: Denying access for user {0} {1} because user connection was refused by the region", - agentData.firstname, agentData.lastname); - } - } - - } - else - { - denyMess = "Region not found"; - } - - if (success) - { - Hashtable respdata = new Hashtable(); - respdata["success"] = "TRUE"; - resp.Value = respdata; - } - else - { - Hashtable respdata = new Hashtable(); - respdata["success"] = "FALSE"; - respdata["reason"] = denyMess; - resp.Value = respdata; - } + Hashtable respdata = new Hashtable(); + respdata["success"] = "FALSE"; + respdata["reason"] = denyMess; + resp.Value = respdata; } } catch (Exception e) diff --git a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs index 8047f74c8e..e51eace0e9 100644 --- a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs +++ b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs @@ -56,21 +56,6 @@ namespace OpenSim.Client.Linden protected bool authenticate; protected string welcomeMessage; - public bool RegionLoginsEnabled - { - get - { - if (m_firstScene != null) - { - return m_firstScene.SceneGridService.RegionLoginsEnabled; - } - else - { - return false; - } - } - } - protected LLStandaloneLoginService m_loginService; #region IRegionModule Members diff --git a/OpenSim/Client/Linden/LLStandaloneLoginService.cs b/OpenSim/Client/Linden/LLStandaloneLoginService.cs index 122110d406..9ab043a59a 100644 --- a/OpenSim/Client/Linden/LLStandaloneLoginService.cs +++ b/OpenSim/Client/Linden/LLStandaloneLoginService.cs @@ -202,20 +202,15 @@ namespace OpenSim.Client.Linden agent.Appearance = new AvatarAppearance(agent.AgentID); } - if (m_regionsConnector.RegionLoginsEnabled) + string reason; + bool success = m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason); + if (!success) { - string reason; - bool success = m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason); - if (!success) - { - response.ErrorReason = "key"; - response.ErrorMessage = reason; - } - return success; - // return m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason); + response.ErrorReason = "key"; + response.ErrorMessage = reason; } - - return false; + return success; + // return m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason); } public override void LogOffUser(UserProfileData theUser, string message) diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs index 60f0ba8ef6..a274ae7239 100644 --- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs @@ -388,12 +388,6 @@ namespace OpenSim.Framework.Communications.Tests } } - #region ILoginRegionsConnector Members - public bool RegionLoginsEnabled - { - get { return true; } - } - public void LogOffUserFromGrid(ulong regionHandle, OpenMetaverse.UUID AvatarID, OpenMetaverse.UUID RegionSecret, string message) { } @@ -454,8 +448,6 @@ namespace OpenSim.Framework.Communications.Tests return null; } - - #endregion } } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/ILoginServiceToRegionsConnector.cs b/OpenSim/Framework/ILoginServiceToRegionsConnector.cs index 2aee88e557..5a155c1127 100644 --- a/OpenSim/Framework/ILoginServiceToRegionsConnector.cs +++ b/OpenSim/Framework/ILoginServiceToRegionsConnector.cs @@ -32,7 +32,6 @@ namespace OpenSim.Framework { public interface ILoginServiceToRegionsConnector { - bool RegionLoginsEnabled { get; } void LogOffUserFromGrid(ulong regionHandle, UUID AvatarID, UUID RegionSecret, string message); bool NewUserConnection(ulong regionHandle, AgentCircuitData agent, out string reason); RegionInfo RequestClosestRegion(string region); diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 82b2fd4e28..c9f2cfaee1 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -287,18 +287,6 @@ namespace OpenSim "create region", "Create a new region", HandleCreateRegion); - m_console.Commands.AddCommand("region", false, "login enable", - "login enable", - "Enable logins to the simulator", HandleLoginEnable); - - m_console.Commands.AddCommand("region", false, "login disable", - "login disable", - "Disable logins to the simulator", HandleLoginDisable); - - m_console.Commands.AddCommand("region", false, "login status", - "login status", - "Display status of logins", HandleLoginStatus); - m_console.Commands.AddCommand("region", false, "restart", "restart", "Restart all sims in this instance", RunCommand); @@ -558,42 +546,6 @@ namespace OpenSim } } - /// - /// Enable logins - /// - /// - /// - private void HandleLoginEnable(string module, string[] cmd) - { - ProcessLogin(true); - } - - - /// - /// Disable logins - /// - /// - /// - private void HandleLoginDisable(string module, string[] cmd) - { - ProcessLogin(false); - } - - /// - /// Log login status to the console - /// - /// - /// - private void HandleLoginStatus(string module, string[] cmd) - { - if (m_sceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled == false) - - m_log.Info("[ Login ] Login are disabled "); - else - m_log.Info("[ Login ] Login are enabled"); - } - - /// /// Change and load configuration file data. /// diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 391856bbc2..cf2ab65b22 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -203,12 +203,6 @@ namespace OpenSim plugin.PostInitialise(); } - // Only enable logins to the regions once we have completely finished starting up (apart from scripts) - if ((SceneManager.CurrentOrFirstScene != null) && (SceneManager.CurrentOrFirstScene.SceneGridService != null)) - { - SceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled = true; - } - AddPluginCommands(); } @@ -278,31 +272,6 @@ namespace OpenSim m_sceneManager.OnRestartSim += handleRestartRegion; } - /// - /// Initialises the asset cache. This supports legacy configuration values - /// to ensure consistent operation, but values outside of that namespace - /// are handled by the more generic resolution mechanism provided by - /// the ResolveAssetServer virtual method. If extended resolution fails, - /// then the normal default action is taken. - /// Creation of the AssetCache is handled by ResolveAssetCache. This - /// function accepts a reference to the instantiated AssetServer and - /// returns an IAssetCache implementation, if possible. This is a virtual - /// method. - /// - public void ProcessLogin(bool LoginEnabled) - { - if (LoginEnabled) - { - m_log.Info("[LOGIN]: Login is now enabled."); - SceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled = true; - } - else - { - m_log.Info("[LOGIN]: Login is now disabled."); - SceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled = false; - } - } - /// /// Execute the region creation process. This includes setting up scene infrastructure. /// diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs index 46ee3c005a..0b54746f19 100644 --- a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs +++ b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs @@ -55,21 +55,6 @@ namespace OpenSim.Region.CoreModules.Hypergrid protected bool m_enabled = false; // Module is only enabled if running in standalone mode - public bool RegionLoginsEnabled - { - get - { - if (m_firstScene != null) - { - return m_firstScene.SceneGridService.RegionLoginsEnabled; - } - else - { - return false; - } - } - } - protected HGLoginAuthService m_loginService; #region IRegionModule Members diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs index 93cb60c9d2..f9cd90fc8c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs @@ -696,8 +696,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid public bool CheckUserAtEntry(UUID userID, UUID sessionID, out bool comingHome) { comingHome = false; - if (!m_aScene.SceneGridService.RegionLoginsEnabled) - return false; CachedUserInfo uinfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(userID); if (uinfo != null) diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index f49d072087..6164368153 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -65,13 +65,6 @@ namespace OpenSim.Region.Framework.Scenes protected List m_agentsInTransit; - public bool RegionLoginsEnabled - { - get { return m_regionLoginsEnabled; } - set { m_regionLoginsEnabled = value; } - } - private bool m_regionLoginsEnabled = false; - /// /// An agent is crossing into this region ///