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.cs36
1 files changed, 27 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 5428e5d..c3edeb3 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3394,7 +3394,6 @@ namespace OpenSim.Region.Framework.Scenes
3394 m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName); 3394 m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName);
3395 } 3395 }
3396 3396
3397
3398 /// <summary> 3397 /// <summary>
3399 /// Do the work necessary to initiate a new user connection for a particular scene. 3398 /// Do the work necessary to initiate a new user connection for a particular scene.
3400 /// At the moment, this consists of setting up the caps infrastructure 3399 /// At the moment, this consists of setting up the caps infrastructure
@@ -3407,6 +3406,23 @@ namespace OpenSim.Region.Framework.Scenes
3407 /// also return a reason.</returns> 3406 /// also return a reason.</returns>
3408 public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason) 3407 public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason)
3409 { 3408 {
3409 return NewUserConnection(agent, teleportFlags, out reason, true);
3410 }
3411
3412 /// <summary>
3413 /// Do the work necessary to initiate a new user connection for a particular scene.
3414 /// At the moment, this consists of setting up the caps infrastructure
3415 /// The return bool should allow for connections to be refused, but as not all calling paths
3416 /// take proper notice of it let, we allowed banned users in still.
3417 /// </summary>
3418 /// <param name="agent">CircuitData of the agent who is connecting</param>
3419 /// <param name="reason">Outputs the reason for the false response on this string</param>
3420 /// <param name="requirePresenceLookup">True for normal presence. False for NPC
3421 /// or other applications where a full grid/Hypergrid presence may not be required.</param>
3422 /// <returns>True if the region accepts this agent. False if it does not. False will
3423 /// also return a reason.</returns>
3424 public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason, bool requirePresenceLookup)
3425 {
3410 bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 || 3426 bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 ||
3411 (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0); 3427 (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0);
3412 reason = String.Empty; 3428 reason = String.Empty;
@@ -3456,16 +3472,18 @@ namespace OpenSim.Region.Framework.Scenes
3456 3472
3457 if (sp == null) // We don't have an [child] agent here already 3473 if (sp == null) // We don't have an [child] agent here already
3458 { 3474 {
3459 3475 if (requirePresenceLookup)
3460 try
3461 { 3476 {
3462 if (!VerifyUserPresence(agent, out reason)) 3477 try
3478 {
3479 if (!VerifyUserPresence(agent, out reason))
3480 return false;
3481 }
3482 catch (Exception e)
3483 {
3484 m_log.ErrorFormat("[CONNECTION BEGIN]: Exception verifying presence " + e.ToString());
3463 return false; 3485 return false;
3464 } 3486 }
3465 catch (Exception e)
3466 {
3467 m_log.ErrorFormat("[CONNECTION BEGIN]: Exception verifying presence " + e.ToString());
3468 return false;
3469 } 3487 }
3470 3488
3471 try 3489 try