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.cs59
1 files changed, 33 insertions, 26 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 0d9028c..aa09092 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4174,28 +4174,29 @@ namespace OpenSim.Region.Framework.Scenes
4174 } 4174 }
4175 } 4175 }
4176 4176
4177 if (RegionInfo.EstateSettings != null)
4178 {
4179 if (RegionInfo.EstateSettings.IsBanned(agent.AgentID, 0))
4180 {
4181 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist",
4182 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);
4183 reason = String.Format("Denied access to region {0}: You have been banned from that region.",
4184 RegionInfo.RegionName);
4185 return false;
4186 }
4187 }
4188 else
4189 {
4190 m_log.ErrorFormat("[CONNECTION BEGIN]: Estate Settings is null!");
4191 }
4192
4193 // We only test the things below when we want to cut off 4177 // We only test the things below when we want to cut off
4194 // child agents from being present in the scene for which their root 4178 // child agents from being present in the scene for which their root
4195 // agent isn't allowed. Otherwise, we allow child agents. The test for 4179 // agent isn't allowed. Otherwise, we allow child agents. The test for
4196 // the root is done elsewhere (QueryAccess) 4180 // the root is done elsewhere (QueryAccess)
4197 if (!bypassAccessControl) 4181 if (!bypassAccessControl)
4198 { 4182 {
4183 if (RegionInfo.EstateSettings != null)
4184 {
4185 int flags = GetUserFlags(agent.AgentID);
4186 if (RegionInfo.EstateSettings.IsBanned(agent.AgentID, flags))
4187 {
4188 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist",
4189 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);
4190 reason = String.Format("Denied access to region {0}: You have been banned from that region.",
4191 RegionInfo.RegionName);
4192 return false;
4193 }
4194 }
4195 else
4196 {
4197 m_log.ErrorFormat("[CONNECTION BEGIN]: Estate Settings is null!");
4198 }
4199
4199 List<UUID> agentGroups = new List<UUID>(); 4200 List<UUID> agentGroups = new List<UUID>();
4200 4201
4201 if (m_groupsModule != null) 4202 if (m_groupsModule != null)
@@ -4392,36 +4393,42 @@ namespace OpenSim.Region.Framework.Scenes
4392 } 4393 }
4393 4394
4394 // We have to wait until the viewer contacts this region 4395 // We have to wait until the viewer contacts this region
4395 // after receiving the EnableSimulator HTTP Event Queue message. This triggers the viewer to send 4396 // after receiving the EnableSimulator HTTP Event Queue message (for the v1 teleport protocol)
4397 // or TeleportFinish (for the v2 teleport protocol). This triggers the viewer to send
4396 // a UseCircuitCode packet which in turn calls AddNewClient which finally creates the ScenePresence. 4398 // a UseCircuitCode packet which in turn calls AddNewClient which finally creates the ScenePresence.
4397 ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); 4399 ScenePresence sp = WaitGetScenePresence(cAgentData.AgentID);
4398 4400
4399 if (childAgentUpdate != null) 4401 if (sp != null)
4400 { 4402 {
4401 if (cAgentData.SessionID != childAgentUpdate.ControllingClient.SessionId) 4403 if (cAgentData.SessionID != sp.ControllingClient.SessionId)
4402 { 4404 {
4403 m_log.WarnFormat("[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).", childAgentUpdate.UUID, cAgentData.SessionID); 4405 m_log.WarnFormat(
4406 "[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).",
4407 sp.UUID, cAgentData.SessionID);
4408
4404 Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}", 4409 Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}",
4405 childAgentUpdate.UUID, childAgentUpdate.ControllingClient.SessionId, cAgentData.SessionID)); 4410 sp.UUID, sp.ControllingClient.SessionId, cAgentData.SessionID));
4406 } 4411 }
4407 4412
4408 childAgentUpdate.ChildAgentDataUpdate(cAgentData); 4413 sp.ChildAgentDataUpdate(cAgentData);
4409 4414
4410 int ntimes = 20; 4415 int ntimes = 20;
4411 if (cAgentData.SenderWantsToWaitForRoot) 4416 if (cAgentData.SenderWantsToWaitForRoot)
4412 { 4417 {
4413 while (childAgentUpdate.IsChildAgent && ntimes-- > 0) 4418 while (sp.IsChildAgent && ntimes-- > 0)
4414 Thread.Sleep(1000); 4419 Thread.Sleep(1000);
4415 4420
4416 m_log.DebugFormat( 4421 m_log.DebugFormat(
4417 "[SCENE]: Found presence {0} {1} {2} in {3} after {4} waits", 4422 "[SCENE]: Found presence {0} {1} {2} in {3} after {4} waits",
4418 childAgentUpdate.Name, childAgentUpdate.UUID, childAgentUpdate.IsChildAgent ? "child" : "root", RegionInfo.RegionName, 20 - ntimes); 4423 sp.Name, sp.UUID, sp.IsChildAgent ? "child" : "root", Name, 20 - ntimes);
4419 4424
4420 if (childAgentUpdate.IsChildAgent) 4425 if (sp.IsChildAgent)
4421 return false; 4426 return false;
4422 } 4427 }
4428
4423 return true; 4429 return true;
4424 } 4430 }
4431
4425 return false; 4432 return false;
4426 } 4433 }
4427 4434