aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs43
1 files changed, 39 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a4f630a..2ca82ca 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2443,7 +2443,15 @@ namespace OpenSim.Region.Framework.Scenes
2443 // If the user is banned, we won't let any of their objects 2443 // If the user is banned, we won't let any of their objects
2444 // enter. Period. 2444 // enter. Period.
2445 // 2445 //
2446 if (m_regInfo.EstateSettings.IsBanned(sceneObject.OwnerID)) 2446 int flags = 0;
2447 ScenePresence sp;
2448 if (TryGetScenePresence(sceneObject.OwnerID, out sp))
2449 {
2450 flags = sp.UserFlags;
2451 }
2452
2453
2454 if (m_regInfo.EstateSettings.IsBanned(sceneObject.OwnerID, flags))
2447 { 2455 {
2448 m_log.Info("[INTERREGION]: Denied prim crossing for " + 2456 m_log.Info("[INTERREGION]: Denied prim crossing for " +
2449 "banned avatar"); 2457 "banned avatar");
@@ -2472,7 +2480,7 @@ namespace OpenSim.Region.Framework.Scenes
2472 SceneObjectPart RootPrim = sceneObject.RootPart; 2480 SceneObjectPart RootPrim = sceneObject.RootPart;
2473 2481
2474 // Fix up attachment Parent Local ID 2482 // Fix up attachment Parent Local ID
2475 ScenePresence sp = GetScenePresence(sceneObject.OwnerID); 2483 sp = GetScenePresence(sceneObject.OwnerID);
2476 2484
2477 if (sp != null) 2485 if (sp != null)
2478 { 2486 {
@@ -3617,8 +3625,29 @@ namespace OpenSim.Region.Framework.Scenes
3617 3625
3618 if (m_regInfo.EstateSettings != null) 3626 if (m_regInfo.EstateSettings != null)
3619 { 3627 {
3620 if ((!m_seeIntoBannedRegion) && m_regInfo.EstateSettings.IsBanned(agent.AgentID)) 3628 int flags = 0;
3629 ScenePresence sp;
3630 if (TryGetScenePresence(agent.AgentID, out sp))
3621 { 3631 {
3632 flags = sp.UserFlags;
3633 }
3634 if ((!m_seeIntoBannedRegion) && m_regInfo.EstateSettings.IsBanned(agent.AgentID, flags))
3635 {
3636 //Add some more info to help users
3637 if (!m_regInfo.EstateSettings.IsBanned(agent.AgentID, 32))
3638 {
3639 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the region requires age verification",
3640 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);
3641 reason = String.Format("Denied access to region (0): Region requires age verification");
3642 return false;
3643 }
3644 if (!m_regInfo.EstateSettings.IsBanned(agent.AgentID, 4))
3645 {
3646 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the region requires payment info on file",
3647 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);
3648 reason = String.Format("Denied access to region (0): Region requires payment info on file");
3649 return false;
3650 }
3622 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist", 3651 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist",
3623 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); 3652 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);
3624 reason = String.Format("Denied access to region {0}: You have been banned from that region.", 3653 reason = String.Format("Denied access to region {0}: You have been banned from that region.",
@@ -3807,7 +3836,13 @@ namespace OpenSim.Region.Framework.Scenes
3807 3836
3808 // We have to wait until the viewer contacts this region after receiving EAC. 3837 // We have to wait until the viewer contacts this region after receiving EAC.
3809 // That calls AddNewClient, which finally creates the ScenePresence 3838 // That calls AddNewClient, which finally creates the ScenePresence
3810 if (m_regInfo.EstateSettings.IsBanned(cAgentData.AgentID)) 3839 int flags = 0;
3840 ScenePresence sp;
3841 if (TryGetScenePresence(cAgentData.AgentID, out sp))
3842 {
3843 flags = sp.UserFlags;
3844 }
3845 if (m_regInfo.EstateSettings.IsBanned(cAgentData.AgentID, flags))
3811 { 3846 {
3812 m_log.DebugFormat("[SCENE]: Denying root agent entry to {0}: banned", cAgentData.AgentID); 3847 m_log.DebugFormat("[SCENE]: Denying root agent entry to {0}: banned", cAgentData.AgentID);
3813 return false; 3848 return false;