diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 61 |
1 files changed, 29 insertions, 32 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 705660d..6d0b13f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2805,6 +2805,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2805 | { | 2805 | { |
2806 | ScenePresence sp; | 2806 | ScenePresence sp; |
2807 | bool vialogin; | 2807 | bool vialogin; |
2808 | bool reallyNew = true; | ||
2808 | 2809 | ||
2809 | // Validation occurs in LLUDPServer | 2810 | // Validation occurs in LLUDPServer |
2810 | // | 2811 | // |
@@ -2856,6 +2857,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2856 | m_log.WarnFormat( | 2857 | m_log.WarnFormat( |
2857 | "[SCENE]: Already found {0} scene presence for {1} in {2} when asked to add new scene presence", | 2858 | "[SCENE]: Already found {0} scene presence for {1} in {2} when asked to add new scene presence", |
2858 | sp.IsChildAgent ? "child" : "root", sp.Name, RegionInfo.RegionName); | 2859 | sp.IsChildAgent ? "child" : "root", sp.Name, RegionInfo.RegionName); |
2860 | reallyNew = false; | ||
2859 | } | 2861 | } |
2860 | 2862 | ||
2861 | // We must set this here so that TriggerOnNewClient and TriggerOnClientLogin can determine whether the | 2863 | // We must set this here so that TriggerOnNewClient and TriggerOnClientLogin can determine whether the |
@@ -2867,7 +2869,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2867 | // places. However, we still need to do it here for NPCs. | 2869 | // places. However, we still need to do it here for NPCs. |
2868 | CacheUserName(sp, aCircuit); | 2870 | CacheUserName(sp, aCircuit); |
2869 | 2871 | ||
2870 | EventManager.TriggerOnNewClient(client); | 2872 | if (reallyNew) |
2873 | EventManager.TriggerOnNewClient(client); | ||
2874 | |||
2871 | if (vialogin) | 2875 | if (vialogin) |
2872 | EventManager.TriggerOnClientLogin(client); | 2876 | EventManager.TriggerOnClientLogin(client); |
2873 | } | 2877 | } |
@@ -3426,15 +3430,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3426 | if (closeChildAgents && isChildAgent) | 3430 | if (closeChildAgents && isChildAgent) |
3427 | { | 3431 | { |
3428 | // Tell a single agent to disconnect from the region. | 3432 | // Tell a single agent to disconnect from the region. |
3429 | IEventQueue eq = RequestModuleInterface<IEventQueue>(); | 3433 | // Let's do this via UDP |
3430 | if (eq != null) | 3434 | avatar.ControllingClient.SendShutdownConnectionNotice(); |
3431 | { | ||
3432 | eq.DisableSimulator(RegionInfo.RegionHandle, avatar.UUID); | ||
3433 | } | ||
3434 | else | ||
3435 | { | ||
3436 | avatar.ControllingClient.SendShutdownConnectionNotice(); | ||
3437 | } | ||
3438 | } | 3435 | } |
3439 | 3436 | ||
3440 | // Only applies to root agents. | 3437 | // Only applies to root agents. |
@@ -3686,21 +3683,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
3686 | { | 3683 | { |
3687 | if (!sp.IsChildAgent) | 3684 | if (!sp.IsChildAgent) |
3688 | { | 3685 | { |
3689 | // We have a zombie from a crashed session. | 3686 | // We have a root agent. Is it in transit? |
3690 | // Or the same user is trying to be root twice here, won't work. | 3687 | if (!EntityTransferModule.IsInTransit(sp.UUID)) |
3691 | // Kill it. | 3688 | { |
3692 | m_log.WarnFormat( | 3689 | // We have a zombie from a crashed session. |
3693 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", | 3690 | // Or the same user is trying to be root twice here, won't work. |
3694 | sp.Name, sp.UUID, RegionInfo.RegionName); | 3691 | // Kill it. |
3695 | 3692 | m_log.WarnFormat( | |
3696 | if (sp.ControllingClient != null) | 3693 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", |
3697 | sp.ControllingClient.Close(true); | 3694 | sp.Name, sp.UUID, RegionInfo.RegionName); |
3695 | |||
3696 | if (sp.ControllingClient != null) | ||
3697 | sp.ControllingClient.Close(true); | ||
3698 | 3698 | ||
3699 | sp = null; | 3699 | sp = null; |
3700 | } | ||
3701 | else | ||
3702 | m_log.WarnFormat("[SCENE]: Existing root scene presence for {0} {1} in {2}, but agent is in trasit", sp.Name, sp.UUID, RegionInfo.RegionName); | ||
3700 | } | 3703 | } |
3701 | else | 3704 | else |
3702 | { | 3705 | { |
3706 | // We have a child agent here | ||
3703 | sp.DoNotCloseAfterTeleport = true; | 3707 | sp.DoNotCloseAfterTeleport = true; |
3708 | //m_log.WarnFormat("[SCENE]: Existing child scene presence for {0} {1} in {2}", sp.Name, sp.UUID, RegionInfo.RegionName); | ||
3704 | } | 3709 | } |
3705 | } | 3710 | } |
3706 | 3711 | ||
@@ -3785,9 +3790,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
3785 | agent.AgentID, RegionInfo.RegionName); | 3790 | agent.AgentID, RegionInfo.RegionName); |
3786 | 3791 | ||
3787 | sp.AdjustKnownSeeds(); | 3792 | sp.AdjustKnownSeeds(); |
3788 | 3793 | ||
3789 | if (CapsModule != null) | 3794 | if (CapsModule != null) |
3795 | { | ||
3790 | CapsModule.SetAgentCapsSeeds(agent); | 3796 | CapsModule.SetAgentCapsSeeds(agent); |
3797 | CapsModule.CreateCaps(agent.AgentID); | ||
3798 | } | ||
3791 | } | 3799 | } |
3792 | } | 3800 | } |
3793 | 3801 | ||
@@ -5545,17 +5553,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
5545 | { | 5553 | { |
5546 | reason = "You are banned from the region"; | 5554 | reason = "You are banned from the region"; |
5547 | 5555 | ||
5548 | if (EntityTransferModule.IsInTransit(agentID)) | ||
5549 | { | ||
5550 | reason = "Agent is still in transit from this region"; | ||
5551 | |||
5552 | m_log.WarnFormat( | ||
5553 | "[SCENE]: Denying agent {0} entry into {1} since region still has them registered as in transit", | ||
5554 | agentID, RegionInfo.RegionName); | ||
5555 | |||
5556 | return false; | ||
5557 | } | ||
5558 | |||
5559 | if (Permissions.IsGod(agentID)) | 5556 | if (Permissions.IsGod(agentID)) |
5560 | { | 5557 | { |
5561 | reason = String.Empty; | 5558 | reason = String.Empty; |