From 5eb091ceee98f334fbb4c37e25f8217d1c40701f Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 30 Nov 2007 01:20:31 +0000 Subject: * Temporary fix for 'User already online' issue in standalone mode. * Revert this once we get a working logoff. --- OpenSim/Framework/Communications/LoginService.cs | 5 +++++ OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 2 +- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 11 +++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index 118668c..9177704 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs @@ -96,10 +96,15 @@ namespace OpenSim.Framework.UserManagement else { // If we already have a session... + if (userProfile.currentAgent != null && userProfile.currentAgent.agentOnline) { + userProfile.currentAgent.agentOnline = false; + m_userManager.CommitAgent(ref userProfile); + // Reject the login return logResponse.CreateAlreadyLoggedInResponse(); + } // Otherwise... // Create a new agent session diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 7d09c9a..cc0b8ba 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -1487,7 +1487,7 @@ namespace OpenSim.Region.Environment.Scenes } } } - + /// /// /// diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 843ae3d..c94bfd9 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -1201,6 +1201,17 @@ namespace OpenSim.Region.Environment.Scenes } break; } + else + { + // If you can't edit it, send the base permissions minus the flag to edit + if (!ParentGroup.m_scene.PermissionsMngr.CanEditObject(remoteClient.AgentId, this.ParentGroup.UUID)) + { + clientFlags = ObjectFlags &= ~(uint)LLObject.ObjectFlags.ObjectModify; + clientFlags = clientFlags &= ~(uint)LLObject.ObjectFlags.ObjectMove; + clientFlags = clientFlags &= ~(uint)LLObject.ObjectFlags.AllowInventoryDrop; + clientFlags = clientFlags &= ~(uint)LLObject.ObjectFlags.ObjectTransfer; + } + } } byte[] color = new byte[] { m_color.R, m_color.G, m_color.B, m_color.A }; -- cgit v1.1