diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 65 |
1 files changed, 64 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 58d9455..0d4df6c 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -53,6 +53,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
53 | protected EstateManagementCommands m_commands; | 53 | protected EstateManagementCommands m_commands; |
54 | 54 | ||
55 | private EstateTerrainXferHandler TerrainUploader; | 55 | private EstateTerrainXferHandler TerrainUploader; |
56 | private TelehubManager m_Telehub; | ||
56 | 57 | ||
57 | public event ChangeDelegate OnRegionInfoChange; | 58 | public event ChangeDelegate OnRegionInfoChange; |
58 | public event ChangeDelegate OnEstateInfoChange; | 59 | public event ChangeDelegate OnEstateInfoChange; |
@@ -599,6 +600,65 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
599 | } | 600 | } |
600 | } | 601 | } |
601 | 602 | ||
603 | private void handleOnEstateManageTelehub (IClientAPI client, UUID invoice, UUID senderID, string cmd, uint param1) | ||
604 | { | ||
605 | uint ObjectLocalID; | ||
606 | SceneObjectPart part; | ||
607 | // UUID EstateID = Scene.RegionInfo.EstateSettings.EstateID; | ||
608 | TelehubManager.Telehub telehub; | ||
609 | |||
610 | switch (cmd) | ||
611 | { | ||
612 | case "info ui": | ||
613 | // Send info: | ||
614 | if (m_Telehub.HasTelehub) | ||
615 | { | ||
616 | telehub = m_Telehub.TelehubVals(); | ||
617 | client.SendTelehubInfo(telehub.ObjectID, telehub.ObjectName, telehub.ObjectPosition, | ||
618 | telehub.ObjectRotation, telehub.SpawnPoint); | ||
619 | } | ||
620 | else | ||
621 | { | ||
622 | return; | ||
623 | } | ||
624 | break; | ||
625 | |||
626 | case "connect": | ||
627 | // Add the Telehub | ||
628 | part = Scene.GetSceneObjectPart((uint)param1); | ||
629 | telehub = m_Telehub.Connect(part); | ||
630 | client.SendTelehubInfo(telehub.ObjectID, telehub.ObjectName, telehub.ObjectPosition, | ||
631 | telehub.ObjectRotation, telehub.SpawnPoint); | ||
632 | break; | ||
633 | |||
634 | case "delete": | ||
635 | // Disconnect Telehub | ||
636 | part = Scene.GetSceneObjectPart((uint)param1); | ||
637 | telehub = m_Telehub.DisConnect(part); | ||
638 | client.SendTelehubInfo(telehub.ObjectID, telehub.ObjectName, telehub.ObjectPosition, | ||
639 | telehub.ObjectRotation, telehub.SpawnPoint); | ||
640 | break; | ||
641 | |||
642 | case "spawnpoint add": | ||
643 | // Add SpawnPoint to the Telehub | ||
644 | part = Scene.GetSceneObjectPart((uint)param1); | ||
645 | telehub = m_Telehub.AddSpawnPoint(part.AbsolutePosition); | ||
646 | client.SendTelehubInfo(telehub.ObjectID, telehub.ObjectName, telehub.ObjectPosition, | ||
647 | telehub.ObjectRotation, telehub.SpawnPoint); | ||
648 | break; | ||
649 | |||
650 | case "spawnpoint remove": | ||
651 | // Remove SpawnPoint from Telehub | ||
652 | telehub = m_Telehub.RemoveSpawnPoint((int)param1); | ||
653 | client.SendTelehubInfo(telehub.ObjectID, telehub.ObjectName, telehub.ObjectPosition, | ||
654 | telehub.ObjectRotation, telehub.SpawnPoint); | ||
655 | break; | ||
656 | |||
657 | default: | ||
658 | break; | ||
659 | } | ||
660 | } | ||
661 | |||
602 | private void SendSimulatorBlueBoxMessage( | 662 | private void SendSimulatorBlueBoxMessage( |
603 | IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message) | 663 | IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message) |
604 | { | 664 | { |
@@ -1055,7 +1115,9 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1055 | Scene.RegisterModuleInterface<IEstateModule>(this); | 1115 | Scene.RegisterModuleInterface<IEstateModule>(this); |
1056 | Scene.EventManager.OnNewClient += EventManager_OnNewClient; | 1116 | Scene.EventManager.OnNewClient += EventManager_OnNewClient; |
1057 | Scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight; | 1117 | Scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight; |
1058 | 1118 | ||
1119 | m_Telehub = new TelehubManager(scene); | ||
1120 | |||
1059 | m_commands = new EstateManagementCommands(this); | 1121 | m_commands = new EstateManagementCommands(this); |
1060 | m_commands.Initialise(); | 1122 | m_commands.Initialise(); |
1061 | } | 1123 | } |
@@ -1109,6 +1171,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1109 | client.OnEstateRestartSimRequest += handleEstateRestartSimRequest; | 1171 | client.OnEstateRestartSimRequest += handleEstateRestartSimRequest; |
1110 | client.OnEstateChangeCovenantRequest += handleChangeEstateCovenantRequest; | 1172 | client.OnEstateChangeCovenantRequest += handleChangeEstateCovenantRequest; |
1111 | client.OnEstateChangeInfo += handleEstateChangeInfo; | 1173 | client.OnEstateChangeInfo += handleEstateChangeInfo; |
1174 | client.OnEstateManageTelehub += handleOnEstateManageTelehub; | ||
1112 | client.OnUpdateEstateAccessDeltaRequest += handleEstateAccessDeltaRequest; | 1175 | client.OnUpdateEstateAccessDeltaRequest += handleEstateAccessDeltaRequest; |
1113 | client.OnSimulatorBlueBoxMessageRequest += SendSimulatorBlueBoxMessage; | 1176 | client.OnSimulatorBlueBoxMessageRequest += SendSimulatorBlueBoxMessage; |
1114 | client.OnEstateBlueBoxMessageRequest += SendEstateBlueBoxMessage; | 1177 | client.OnEstateBlueBoxMessageRequest += SendEstateBlueBoxMessage; |