diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e6887b4..3b8fbfd 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3865,7 +3865,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3865 | if (!AuthorizationService.IsAuthorizedForRegion( | 3865 | if (!AuthorizationService.IsAuthorizedForRegion( |
3866 | agent.AgentID.ToString(), agent.firstname, agent.lastname, RegionInfo.RegionID.ToString(), out reason)) | 3866 | agent.AgentID.ToString(), agent.firstname, agent.lastname, RegionInfo.RegionID.ToString(), out reason)) |
3867 | { | 3867 | { |
3868 | m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because {4}", | 3868 | m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because: {4}", |
3869 | agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName, reason); | 3869 | agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName, reason); |
3870 | 3870 | ||
3871 | return false; | 3871 | return false; |
@@ -5463,9 +5463,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
5463 | /// <param name='position'></param> | 5463 | /// <param name='position'></param> |
5464 | /// <param name='reason'></param> | 5464 | /// <param name='reason'></param> |
5465 | /// <returns></returns> | 5465 | /// <returns></returns> |
5466 | public bool QueryAccess(UUID agentID, string agentHomeURI, Vector3 position, out string reason) | 5466 | public bool QueryAccess(UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string reason) |
5467 | { | 5467 | { |
5468 | reason = "You are banned from the region"; | 5468 | reason = string.Empty; |
5469 | 5469 | ||
5470 | if (Permissions.IsGod(agentID)) | 5470 | if (Permissions.IsGod(agentID)) |
5471 | { | 5471 | { |
@@ -5525,10 +5525,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
5525 | catch (Exception e) | 5525 | catch (Exception e) |
5526 | { | 5526 | { |
5527 | m_log.DebugFormat("[SCENE]: Exception authorizing agent: {0} "+ e.StackTrace, e.Message); | 5527 | m_log.DebugFormat("[SCENE]: Exception authorizing agent: {0} "+ e.StackTrace, e.Message); |
5528 | reason = "Error authorizing agent: " + e.Message; | ||
5528 | return false; | 5529 | return false; |
5529 | } | 5530 | } |
5530 | 5531 | ||
5531 | if (position == Vector3.Zero) // Teleport | 5532 | if (viaTeleport) |
5532 | { | 5533 | { |
5533 | if (!RegionInfo.EstateSettings.AllowDirectTeleport) | 5534 | if (!RegionInfo.EstateSettings.AllowDirectTeleport) |
5534 | { | 5535 | { |
@@ -5568,6 +5569,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5568 | if (!TestLandRestrictions(agentID, out reason, ref posX, ref posY)) | 5569 | if (!TestLandRestrictions(agentID, out reason, ref posX, ref posY)) |
5569 | { | 5570 | { |
5570 | // m_log.DebugFormat("[SCENE]: Denying {0} because they are banned on all parcels", agentID); | 5571 | // m_log.DebugFormat("[SCENE]: Denying {0} because they are banned on all parcels", agentID); |
5572 | reason = "You are banned from the region on all parcels"; | ||
5571 | return false; | 5573 | return false; |
5572 | } | 5574 | } |
5573 | } | 5575 | } |
@@ -5575,13 +5577,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
5575 | { | 5577 | { |
5576 | ILandObject land = LandChannel.GetLandObject(position.X, position.Y); | 5578 | ILandObject land = LandChannel.GetLandObject(position.X, position.Y); |
5577 | if (land == null) | 5579 | if (land == null) |
5580 | { | ||
5581 | reason = "No parcel found"; | ||
5578 | return false; | 5582 | return false; |
5583 | } | ||
5579 | 5584 | ||
5580 | bool banned = land.IsBannedFromLand(agentID); | 5585 | bool banned = land.IsBannedFromLand(agentID); |
5581 | bool restricted = land.IsRestrictedFromLand(agentID); | 5586 | bool restricted = land.IsRestrictedFromLand(agentID); |
5582 | 5587 | ||
5583 | if (banned || restricted) | 5588 | if (banned || restricted) |
5589 | { | ||
5590 | if (banned) | ||
5591 | reason = "You are banned from the parcel"; | ||
5592 | else | ||
5593 | reason = "The parcel is restricted"; | ||
5584 | return false; | 5594 | return false; |
5595 | } | ||
5585 | } | 5596 | } |
5586 | 5597 | ||
5587 | reason = String.Empty; | 5598 | reason = String.Empty; |