aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs43
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs8
3 files changed, 54 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
index c023a6f..cbc2fd6 100644
--- a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
@@ -88,7 +88,13 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
88 88
89 public void AddCapsHandler(UUID agentId) 89 public void AddCapsHandler(UUID agentId)
90 { 90 {
91 if (m_scene.RegionInfo.EstateSettings.IsBanned(agentId)) 91 int flags = 0;
92 ScenePresence sp;
93 if (m_scene.TryGetScenePresence(agentId, out sp))
94 {
95 flags = sp.UserFlags;
96 }
97 if (m_scene.RegionInfo.EstateSettings.IsBanned(agentId, flags))
92 return; 98 return;
93 99
94 String capsObjectPath = GetCapsPath(agentId); 100 String capsObjectPath = GetCapsPath(agentId);
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;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 6a3983f..c4ae0f0 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -113,6 +113,7 @@ namespace OpenSim.Region.Framework.Scenes
113 { 113 {
114 get { return m_attachments; } 114 get { return m_attachments; }
115 } 115 }
116
116 protected List<SceneObjectGroup> m_attachments = new List<SceneObjectGroup>(); 117 protected List<SceneObjectGroup> m_attachments = new List<SceneObjectGroup>();
117 118
118 private Dictionary<UUID, ScriptControllers> scriptedcontrols = new Dictionary<UUID, ScriptControllers>(); 119 private Dictionary<UUID, ScriptControllers> scriptedcontrols = new Dictionary<UUID, ScriptControllers>();
@@ -136,6 +137,12 @@ namespace OpenSim.Region.Framework.Scenes
136 private bool m_updateflag; 137 private bool m_updateflag;
137 private byte m_movementflag; 138 private byte m_movementflag;
138 private Vector3? m_forceToApply; 139 private Vector3? m_forceToApply;
140 private int m_userFlags;
141 public int UserFlags
142 {
143 get { return m_userFlags; }
144 }
145
139 private uint m_requestedSitTargetID; 146 private uint m_requestedSitTargetID;
140 private UUID m_requestedSitTargetUUID; 147 private UUID m_requestedSitTargetUUID;
141 public bool SitGround = false; 148 public bool SitGround = false;
@@ -763,6 +770,7 @@ namespace OpenSim.Region.Framework.Scenes
763 m_localId = m_scene.AllocateLocalId(); 770 m_localId = m_scene.AllocateLocalId();
764 771
765 UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid); 772 UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid);
773 m_userFlags = account.UserFlags;
766 774
767 if (account != null) 775 if (account != null)
768 m_userLevel = account.UserLevel; 776 m_userLevel = account.UserLevel;