diff options
Diffstat (limited to 'OpenSim/Region')
55 files changed, 377 insertions, 293 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index ef6dedb..2c2d80a 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -245,7 +245,10 @@ namespace OpenSim.Region.ClientStack.Linden | |||
245 | 245 | ||
246 | if (!m_Scene.CheckClient(m_HostCapsObj.AgentID, httpRequest.RemoteIPEndPoint)) | 246 | if (!m_Scene.CheckClient(m_HostCapsObj.AgentID, httpRequest.RemoteIPEndPoint)) |
247 | { | 247 | { |
248 | m_log.DebugFormat("[CAPS]: Unauthorized CAPS client"); | 248 | m_log.DebugFormat( |
249 | "[CAPS]: Unauthorized CAPS client {0} from {1}", | ||
250 | m_HostCapsObj.AgentID, httpRequest.RemoteIPEndPoint); | ||
251 | |||
249 | return string.Empty; | 252 | return string.Empty; |
250 | } | 253 | } |
251 | 254 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs index a5209b7..c25b58c 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs | |||
@@ -60,7 +60,7 @@ namespace OpenSim.Region.ClientStack.Linden.Tests | |||
60 | CapabilitiesModule capsModule = new CapabilitiesModule(); | 60 | CapabilitiesModule capsModule = new CapabilitiesModule(); |
61 | EventQueueGetModule eqgModule = new EventQueueGetModule(); | 61 | EventQueueGetModule eqgModule = new EventQueueGetModule(); |
62 | 62 | ||
63 | m_scene = SceneHelpers.SetupScene(); | 63 | m_scene = new SceneHelpers().SetupScene(); |
64 | SceneHelpers.SetupSceneModules(m_scene, config, capsModule, eqgModule); | 64 | SceneHelpers.SetupSceneModules(m_scene, config, capsModule, eqgModule); |
65 | } | 65 | } |
66 | 66 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 75f783b..dda4444 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -916,7 +916,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
916 | UDPPacketBuffer buffer = (UDPPacketBuffer)array[0]; | 916 | UDPPacketBuffer buffer = (UDPPacketBuffer)array[0]; |
917 | UseCircuitCodePacket uccp = (UseCircuitCodePacket)array[1]; | 917 | UseCircuitCodePacket uccp = (UseCircuitCodePacket)array[1]; |
918 | 918 | ||
919 | m_log.DebugFormat("[LLUDPSERVER]: Handling UseCircuitCode request from {0}", buffer.RemoteEndPoint); | 919 | m_log.DebugFormat( |
920 | "[LLUDPSERVER]: Handling UseCircuitCode request for circuit {0} from {1}", | ||
921 | uccp.CircuitCode.Code, buffer.RemoteEndPoint); | ||
920 | 922 | ||
921 | remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint; | 923 | remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint; |
922 | 924 | ||
@@ -1352,7 +1354,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1352 | } | 1354 | } |
1353 | else | 1355 | else |
1354 | { | 1356 | { |
1355 | m_log.DebugFormat("[LLUDPSERVER]: Dropping incoming {0} packet for dead client {1}", packet.Type, udpClient.AgentID); | 1357 | m_log.DebugFormat( |
1358 | "[LLUDPSERVER]: Dropped incoming {0} for dead client {1} in {2}", | ||
1359 | packet.Type, udpClient.AgentID, m_scene.RegionInfo.RegionName); | ||
1356 | } | 1360 | } |
1357 | } | 1361 | } |
1358 | 1362 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs index a575e36..1321470 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs | |||
@@ -158,7 +158,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests | |||
158 | TestHelpers.InMethod(); | 158 | TestHelpers.InMethod(); |
159 | // XmlConfigurator.Configure(); | 159 | // XmlConfigurator.Configure(); |
160 | 160 | ||
161 | TestScene scene = SceneHelpers.SetupScene(); | 161 | TestScene scene = new SceneHelpers().SetupScene(); |
162 | uint myCircuitCode = 123456; | 162 | uint myCircuitCode = 123456; |
163 | UUID myAgentUuid = TestHelpers.ParseTail(0x1); | 163 | UUID myAgentUuid = TestHelpers.ParseTail(0x1); |
164 | UUID mySessionUuid = TestHelpers.ParseTail(0x2); | 164 | UUID mySessionUuid = TestHelpers.ParseTail(0x2); |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs index 1b68d68..221f02b 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests | |||
79 | 79 | ||
80 | J2KDecoderModule j2kdm = new J2KDecoderModule(); | 80 | J2KDecoderModule j2kdm = new J2KDecoderModule(); |
81 | 81 | ||
82 | scene = SceneHelpers.SetupScene(); | 82 | scene = new SceneHelpers().SetupScene(); |
83 | SceneHelpers.SetupSceneModules(scene, j2kdm); | 83 | SceneHelpers.SetupSceneModules(scene, j2kdm); |
84 | 84 | ||
85 | tc = new TestClient(SceneHelpers.GenerateAgentData(userId), scene); | 85 | tc = new TestClient(SceneHelpers.GenerateAgentData(userId), scene); |
diff --git a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs index 5adb845..c91b25f 100644 --- a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs +++ b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.Asset.Tests | |||
65 | config.Configs["AssetCache"].Set("MemoryCacheEnabled", "true"); | 65 | config.Configs["AssetCache"].Set("MemoryCacheEnabled", "true"); |
66 | 66 | ||
67 | m_cache = new FlotsamAssetCache(); | 67 | m_cache = new FlotsamAssetCache(); |
68 | m_scene = SceneHelpers.SetupScene(); | 68 | m_scene = new SceneHelpers().SetupScene(); |
69 | SceneHelpers.SetupSceneModules(m_scene, config, m_cache); | 69 | SceneHelpers.SetupSceneModules(m_scene, config, m_cache); |
70 | } | 70 | } |
71 | 71 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index bfe5e4a..42d07fd 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
72 | config.AddConfig("Modules"); | 72 | config.AddConfig("Modules"); |
73 | config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule"); | 73 | config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule"); |
74 | 74 | ||
75 | scene = SceneHelpers.SetupScene(); | 75 | scene = new SceneHelpers().SetupScene(); |
76 | m_attMod = new AttachmentsModule(); | 76 | m_attMod = new AttachmentsModule(); |
77 | SceneHelpers.SetupSceneModules(scene, config, m_attMod, new BasicInventoryAccessModule()); | 77 | SceneHelpers.SetupSceneModules(scene, config, m_attMod, new BasicInventoryAccessModule()); |
78 | } | 78 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs index 11a0a86..848b3bf 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs | |||
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
53 | UUID userId = TestHelpers.ParseTail(0x1); | 53 | UUID userId = TestHelpers.ParseTail(0x1); |
54 | 54 | ||
55 | AvatarFactoryModule afm = new AvatarFactoryModule(); | 55 | AvatarFactoryModule afm = new AvatarFactoryModule(); |
56 | TestScene scene = SceneHelpers.SetupScene(); | 56 | TestScene scene = new SceneHelpers().SetupScene(); |
57 | SceneHelpers.SetupSceneModules(scene, afm); | 57 | SceneHelpers.SetupSceneModules(scene, afm); |
58 | ScenePresence sp = SceneHelpers.AddScenePresence(scene, userId); | 58 | ScenePresence sp = SceneHelpers.AddScenePresence(scene, userId); |
59 | 59 | ||
@@ -81,7 +81,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
81 | CoreAssetCache assetCache = new CoreAssetCache(); | 81 | CoreAssetCache assetCache = new CoreAssetCache(); |
82 | 82 | ||
83 | AvatarFactoryModule afm = new AvatarFactoryModule(); | 83 | AvatarFactoryModule afm = new AvatarFactoryModule(); |
84 | TestScene scene = SceneHelpers.SetupScene(assetCache); | 84 | TestScene scene = new SceneHelpers(assetCache).SetupScene(); |
85 | SceneHelpers.SetupSceneModules(scene, afm); | 85 | SceneHelpers.SetupSceneModules(scene, afm); |
86 | ScenePresence sp = SceneHelpers.AddScenePresence(scene, userId); | 86 | ScenePresence sp = SceneHelpers.AddScenePresence(scene, userId); |
87 | 87 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs index 45b4264..7a197f7 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs | |||
@@ -78,7 +78,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends.Tests | |||
78 | config.AddConfig("FriendsService"); | 78 | config.AddConfig("FriendsService"); |
79 | config.Configs["FriendsService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); | 79 | config.Configs["FriendsService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); |
80 | 80 | ||
81 | m_scene = SceneHelpers.SetupScene(); | 81 | m_scene = new SceneHelpers().SetupScene(); |
82 | m_fm = new FriendsModule(); | 82 | m_fm = new FriendsModule(); |
83 | SceneHelpers.SetupSceneModules(m_scene, config, m_fm); | 83 | SceneHelpers.SetupSceneModules(m_scene, config, m_fm); |
84 | } | 84 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs index 19ef571..90ae69d 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs | |||
@@ -100,7 +100,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
100 | // log4net.Config.XmlConfigurator.Configure(); | 100 | // log4net.Config.XmlConfigurator.Configure(); |
101 | 101 | ||
102 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); | 102 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); |
103 | Scene scene = SceneHelpers.SetupScene(); | 103 | Scene scene = new SceneHelpers().SetupScene(); |
104 | SceneHelpers.SetupSceneModules(scene, archiverModule); | 104 | SceneHelpers.SetupSceneModules(scene, archiverModule); |
105 | 105 | ||
106 | UserAccountHelpers.CreateUserWithInventory(scene, m_uaLL1, "hampshire"); | 106 | UserAccountHelpers.CreateUserWithInventory(scene, m_uaLL1, "hampshire"); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index e409c8e..b112b6d 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
61 | SerialiserModule serialiserModule = new SerialiserModule(); | 61 | SerialiserModule serialiserModule = new SerialiserModule(); |
62 | m_archiverModule = new InventoryArchiverModule(); | 62 | m_archiverModule = new InventoryArchiverModule(); |
63 | 63 | ||
64 | m_scene = SceneHelpers.SetupScene(); | 64 | m_scene = new SceneHelpers().SetupScene(); |
65 | SceneHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule); | 65 | SceneHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule); |
66 | } | 66 | } |
67 | 67 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs index 417c20c..6eb3605 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/PathTests.cs | |||
@@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
62 | 62 | ||
63 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); | 63 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); |
64 | 64 | ||
65 | Scene scene = SceneHelpers.SetupScene(); | 65 | Scene scene = new SceneHelpers().SetupScene(); |
66 | SceneHelpers.SetupSceneModules(scene, archiverModule); | 66 | SceneHelpers.SetupSceneModules(scene, archiverModule); |
67 | 67 | ||
68 | // Create user | 68 | // Create user |
@@ -179,7 +179,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
179 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); | 179 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); |
180 | 180 | ||
181 | // Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene | 181 | // Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene |
182 | Scene scene = SceneHelpers.SetupScene(); | 182 | Scene scene = new SceneHelpers().SetupScene(); |
183 | 183 | ||
184 | SceneHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); | 184 | SceneHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); |
185 | 185 | ||
@@ -222,7 +222,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
222 | 222 | ||
223 | SerialiserModule serialiserModule = new SerialiserModule(); | 223 | SerialiserModule serialiserModule = new SerialiserModule(); |
224 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); | 224 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); |
225 | Scene scene = SceneHelpers.SetupScene(); | 225 | Scene scene = new SceneHelpers().SetupScene(); |
226 | SceneHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); | 226 | SceneHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); |
227 | 227 | ||
228 | UserAccountHelpers.CreateUserWithInventory(scene, m_uaMT, "password"); | 228 | UserAccountHelpers.CreateUserWithInventory(scene, m_uaMT, "password"); |
@@ -247,7 +247,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
247 | 247 | ||
248 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); | 248 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(); |
249 | 249 | ||
250 | Scene scene = SceneHelpers.SetupScene(); | 250 | Scene scene = new SceneHelpers().SetupScene(); |
251 | SceneHelpers.SetupSceneModules(scene, archiverModule); | 251 | SceneHelpers.SetupSceneModules(scene, archiverModule); |
252 | 252 | ||
253 | // Create user | 253 | // Create user |
@@ -326,7 +326,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
326 | TestHelpers.InMethod(); | 326 | TestHelpers.InMethod(); |
327 | // log4net.Config.XmlConfigurator.Configure(); | 327 | // log4net.Config.XmlConfigurator.Configure(); |
328 | 328 | ||
329 | Scene scene = SceneHelpers.SetupScene(); | 329 | Scene scene = new SceneHelpers().SetupScene(); |
330 | UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene); | 330 | UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene); |
331 | 331 | ||
332 | Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>(); | 332 | Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>(); |
@@ -393,7 +393,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
393 | TestHelpers.InMethod(); | 393 | TestHelpers.InMethod(); |
394 | //log4net.Config.XmlConfigurator.Configure(); | 394 | //log4net.Config.XmlConfigurator.Configure(); |
395 | 395 | ||
396 | Scene scene = SceneHelpers.SetupScene(); | 396 | Scene scene = new SceneHelpers().SetupScene(); |
397 | UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene); | 397 | UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene); |
398 | 398 | ||
399 | string folder1ExistingName = "a"; | 399 | string folder1ExistingName = "a"; |
@@ -444,7 +444,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
444 | TestHelpers.InMethod(); | 444 | TestHelpers.InMethod(); |
445 | // log4net.Config.XmlConfigurator.Configure(); | 445 | // log4net.Config.XmlConfigurator.Configure(); |
446 | 446 | ||
447 | Scene scene = SceneHelpers.SetupScene(); | 447 | Scene scene = new SceneHelpers().SetupScene(); |
448 | UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene); | 448 | UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene); |
449 | 449 | ||
450 | string folder1ExistingName = "a"; | 450 | string folder1ExistingName = "a"; |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 903009e..eb581b4 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -178,7 +178,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
178 | destinationRegionName = sp.Scene.RegionInfo.RegionName; | 178 | destinationRegionName = sp.Scene.RegionInfo.RegionName; |
179 | 179 | ||
180 | m_log.DebugFormat( | 180 | m_log.DebugFormat( |
181 | "[ENTITY TRANSFER MODULE]: RequestTeleportToLocation for {0} to {1} within existing region {2}", | 181 | "[ENTITY TRANSFER MODULE]: Teleport for {0} to {1} within {2}", |
182 | sp.Name, position, destinationRegionName); | 182 | sp.Name, position, destinationRegionName); |
183 | 183 | ||
184 | // Teleport within the same region | 184 | // Teleport within the same region |
@@ -232,7 +232,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
232 | GridRegion finalDestination = GetFinalDestination(reg); | 232 | GridRegion finalDestination = GetFinalDestination(reg); |
233 | if (finalDestination == null) | 233 | if (finalDestination == null) |
234 | { | 234 | { |
235 | m_log.WarnFormat("[ENTITY TRANSFER MODULE]: Final destination is having problems. Unable to teleport agent."); | 235 | m_log.WarnFormat( |
236 | "[ENTITY TRANSFER MODULE]: Final destination is having problems. Unable to teleport {0} {1}", | ||
237 | sp.Name, sp.UUID); | ||
238 | |||
236 | sp.ControllingClient.SendTeleportFailed("Problem at destination"); | 239 | sp.ControllingClient.SendTeleportFailed("Problem at destination"); |
237 | return; | 240 | return; |
238 | } | 241 | } |
@@ -321,10 +324,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
321 | } | 324 | } |
322 | 325 | ||
323 | if (IsInTransit(sp.UUID)) // Avie is already on the way. Caller shouldn't do this. | 326 | if (IsInTransit(sp.UUID)) // Avie is already on the way. Caller shouldn't do this. |
327 | { | ||
328 | m_log.DebugFormat( | ||
329 | "[ENTITY TRANSFER MODULE]: Ignoring teleport request of {0} {1} to {2} ({3}) {4}/{5} - agent is already in transit.", | ||
330 | sp.Name, sp.UUID, reg.ServerURI, finalDestination.ServerURI, finalDestination.RegionName, position); | ||
331 | |||
324 | return; | 332 | return; |
333 | } | ||
325 | 334 | ||
326 | m_log.DebugFormat( | 335 | m_log.DebugFormat( |
327 | "[ENTITY TRANSFER MODULE]: Request Teleport to {0} ({1}) {2}/{3}", | 336 | "[ENTITY TRANSFER MODULE]: Teleporting {0} {1} from {2} to {3} ({4}) {5}/{6}", |
337 | sp.Name, sp.UUID, sp.Scene.RegionInfo.RegionName, | ||
328 | reg.ServerURI, finalDestination.ServerURI, finalDestination.RegionName, position); | 338 | reg.ServerURI, finalDestination.ServerURI, finalDestination.RegionName, position); |
329 | 339 | ||
330 | uint newRegionX = (uint)(reg.RegionHandle >> 40); | 340 | uint newRegionX = (uint)(reg.RegionHandle >> 40); |
@@ -445,7 +455,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
445 | capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); | 455 | capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); |
446 | } | 456 | } |
447 | 457 | ||
448 | |||
449 | SetInTransit(sp.UUID); | 458 | SetInTransit(sp.UUID); |
450 | 459 | ||
451 | // Let's send a full update of the agent. This is a synchronous call. | 460 | // Let's send a full update of the agent. This is a synchronous call. |
@@ -589,7 +598,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
589 | 598 | ||
590 | protected virtual void AgentHasMovedAway(ScenePresence sp, bool logout) | 599 | protected virtual void AgentHasMovedAway(ScenePresence sp, bool logout) |
591 | { | 600 | { |
592 | sp.Scene.AttachmentsModule.DeleteAttachmentsFromScene(sp, true); | 601 | if (sp.Scene.AttachmentsModule != null) |
602 | sp.Scene.AttachmentsModule.DeleteAttachmentsFromScene(sp, true); | ||
593 | } | 603 | } |
594 | 604 | ||
595 | protected void KillEntity(Scene scene, uint localID) | 605 | protected void KillEntity(Scene scene, uint localID) |
@@ -662,7 +672,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
662 | 672 | ||
663 | public virtual bool TeleportHome(UUID id, IClientAPI client) | 673 | public virtual bool TeleportHome(UUID id, IClientAPI client) |
664 | { | 674 | { |
665 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.FirstName, client.LastName); | 675 | m_log.DebugFormat( |
676 | "[ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.Name, client.AgentId); | ||
666 | 677 | ||
667 | //OpenSim.Services.Interfaces.PresenceInfo pinfo = m_aScene.PresenceService.GetAgent(client.SessionId); | 678 | //OpenSim.Services.Interfaces.PresenceInfo pinfo = m_aScene.PresenceService.GetAgent(client.SessionId); |
668 | GridUserInfo uinfo = m_aScene.GridUserService.GetGridUserInfo(client.AgentId.ToString()); | 679 | GridUserInfo uinfo = m_aScene.GridUserService.GetGridUserInfo(client.AgentId.ToString()); |
@@ -683,8 +694,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
683 | return false; | 694 | return false; |
684 | } | 695 | } |
685 | 696 | ||
686 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: User's home region is {0} {1} ({2}-{3})", | 697 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Home region of {0} is {1} ({2}-{3})", |
687 | regionInfo.RegionName, regionInfo.RegionID, regionInfo.RegionLocX / Constants.RegionSize, regionInfo.RegionLocY / Constants.RegionSize); | 698 | client.Name, regionInfo.RegionName, regionInfo.RegionCoordX, regionInfo.RegionCoordY); |
688 | 699 | ||
689 | // a little eekie that this goes back to Scene and with a forced cast, will fix that at some point... | 700 | // a little eekie that this goes back to Scene and with a forced cast, will fix that at some point... |
690 | ((Scene)(client.Scene)).RequestTeleportLocation( | 701 | ((Scene)(client.Scene)).RequestTeleportLocation( |
@@ -1321,19 +1332,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1321 | // after a cross here | 1332 | // after a cross here |
1322 | Thread.Sleep(500); | 1333 | Thread.Sleep(500); |
1323 | 1334 | ||
1324 | Scene m_scene = sp.Scene; | 1335 | Scene scene = sp.Scene; |
1325 | 1336 | ||
1326 | uint x, y; | 1337 | m_log.DebugFormat( |
1327 | Utils.LongToUInts(reg.RegionHandle, out x, out y); | 1338 | "[ENTITY TRANSFER MODULE]: Informing {0} {1} about neighbour {2} {3} at ({4},{5})", |
1328 | x = x / Constants.RegionSize; | 1339 | sp.Name, sp.UUID, reg.RegionName, endPoint, reg.RegionCoordX, reg.RegionCoordY); |
1329 | y = y / Constants.RegionSize; | ||
1330 | m_log.Debug("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint + ")"); | ||
1331 | 1340 | ||
1332 | string capsPath = reg.ServerURI + CapsUtil.GetCapsSeedPath(a.CapsPath); | 1341 | string capsPath = reg.ServerURI + CapsUtil.GetCapsSeedPath(a.CapsPath); |
1333 | 1342 | ||
1334 | string reason = String.Empty; | 1343 | string reason = String.Empty; |
1335 | 1344 | ||
1336 | bool regionAccepted = m_scene.SimulationService.CreateAgent(reg, a, (uint)TeleportFlags.Default, out reason); | 1345 | bool regionAccepted = scene.SimulationService.CreateAgent(reg, a, (uint)TeleportFlags.Default, out reason); |
1337 | 1346 | ||
1338 | if (regionAccepted && newAgent) | 1347 | if (regionAccepted && newAgent) |
1339 | { | 1348 | { |
@@ -1350,7 +1359,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1350 | 1359 | ||
1351 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: {0} is sending {1} EnableSimulator for neighbour region {2} @ {3} " + | 1360 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: {0} is sending {1} EnableSimulator for neighbour region {2} @ {3} " + |
1352 | "and EstablishAgentCommunication with seed cap {4}", | 1361 | "and EstablishAgentCommunication with seed cap {4}", |
1353 | m_scene.RegionInfo.RegionName, sp.Name, reg.RegionName, reg.RegionHandle, capsPath); | 1362 | scene.RegionInfo.RegionName, sp.Name, reg.RegionName, reg.RegionHandle, capsPath); |
1354 | 1363 | ||
1355 | eq.EnableSimulator(reg.RegionHandle, endPoint, sp.UUID); | 1364 | eq.EnableSimulator(reg.RegionHandle, endPoint, sp.UUID); |
1356 | eq.EstablishAgentCommunication(sp.UUID, endPoint, capsPath); | 1365 | eq.EstablishAgentCommunication(sp.UUID, endPoint, capsPath); |
@@ -1361,8 +1370,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1361 | // TODO: make Event Queue disablable! | 1370 | // TODO: make Event Queue disablable! |
1362 | } | 1371 | } |
1363 | 1372 | ||
1364 | m_log.Debug("[ENTITY TRANSFER MODULE]: Completed inform client about neighbour " + endPoint.ToString()); | 1373 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Completed inform {0} {1} about neighbour {2}", sp.Name, sp.UUID, endPoint); |
1365 | } | 1374 | } |
1375 | |||
1376 | if (!regionAccepted) | ||
1377 | m_log.WarnFormat( | ||
1378 | "[ENTITY TRANSFER MODULE]: Region {0} did not accept {1} {2}: {3}", | ||
1379 | reg.RegionName, sp.Name, sp.UUID, reason); | ||
1366 | } | 1380 | } |
1367 | 1381 | ||
1368 | /// <summary> | 1382 | /// <summary> |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 93c5773..12bd6bc 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -206,7 +206,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
206 | 206 | ||
207 | public override bool TeleportHome(UUID id, IClientAPI client) | 207 | public override bool TeleportHome(UUID id, IClientAPI client) |
208 | { | 208 | { |
209 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.FirstName, client.LastName); | 209 | m_log.DebugFormat( |
210 | "[ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.Name, client.AgentId); | ||
210 | 211 | ||
211 | // Let's find out if this is a foreign user or a local user | 212 | // Let's find out if this is a foreign user or a local user |
212 | IUserManagement uMan = m_aScene.RequestModuleInterface<IUserManagement>(); | 213 | IUserManagement uMan = m_aScene.RequestModuleInterface<IUserManagement>(); |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs index e74310c..d6afaa9 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests | |||
65 | config.AddConfig("Modules"); | 65 | config.AddConfig("Modules"); |
66 | config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule"); | 66 | config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule"); |
67 | 67 | ||
68 | m_scene = SceneHelpers.SetupScene(); | 68 | m_scene = new SceneHelpers().SetupScene(); |
69 | SceneHelpers.SetupSceneModules(m_scene, config, m_iam); | 69 | SceneHelpers.SetupSceneModules(m_scene, config, m_iam); |
70 | 70 | ||
71 | // Create user | 71 | // Create user |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index 6e75692..de089f3 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | |||
@@ -191,7 +191,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
191 | { | 191 | { |
192 | if (s.RegionInfo.RegionHandle == destination.RegionHandle) | 192 | if (s.RegionInfo.RegionHandle == destination.RegionHandle) |
193 | { | 193 | { |
194 | m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Found region {0} to send SendCreateChildAgent", destination.RegionName); | 194 | // m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Found region {0} to send SendCreateChildAgent", destination.RegionName); |
195 | return s.NewUserConnection(aCircuit, teleportFlags, out reason); | 195 | return s.NewUserConnection(aCircuit, teleportFlags, out reason); |
196 | } | 196 | } |
197 | } | 197 | } |
@@ -209,9 +209,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
209 | { | 209 | { |
210 | if (s.RegionInfo.RegionHandle == destination.RegionHandle) | 210 | if (s.RegionInfo.RegionHandle == destination.RegionHandle) |
211 | { | 211 | { |
212 | m_log.DebugFormat( | 212 | // m_log.DebugFormat( |
213 | "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", | 213 | // "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", |
214 | s.RegionInfo.RegionName, destination.RegionHandle); | 214 | // s.RegionInfo.RegionName, destination.RegionHandle); |
215 | 215 | ||
216 | s.IncomingChildAgentDataUpdate(cAgentData); | 216 | s.IncomingChildAgentDataUpdate(cAgentData); |
217 | return true; | 217 | return true; |
@@ -280,7 +280,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
280 | { | 280 | { |
281 | if (s.RegionInfo.RegionID == origin) | 281 | if (s.RegionInfo.RegionID == origin) |
282 | { | 282 | { |
283 | m_log.Debug("[LOCAL COMMS]: Found region to SendReleaseAgent"); | 283 | // m_log.Debug("[LOCAL COMMS]: Found region to SendReleaseAgent"); |
284 | AgentTransferModule.AgentArrivedAtDestination(id); | 284 | AgentTransferModule.AgentArrivedAtDestination(id); |
285 | return true; | 285 | return true; |
286 | // return s.IncomingReleaseAgent(id); | 286 | // return s.IncomingReleaseAgent(id); |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index 4d459bf..ab3cc41 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -297,10 +297,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
297 | if (checkPermissions.Contains("T") && !canTransfer) | 297 | if (checkPermissions.Contains("T") && !canTransfer) |
298 | partPermitted = false; | 298 | partPermitted = false; |
299 | 299 | ||
300 | // If the user is the Creator of the object then it can always be included in the OAR | ||
301 | bool creator = (obj.CreatorID.Guid == user.Guid); | ||
302 | if (creator) | ||
303 | partPermitted = true; | ||
304 | |||
300 | //string name = (objGroup.PrimCount == 1) ? objGroup.Name : string.Format("{0} ({1}/{2})", obj.Name, primNumber, objGroup.PrimCount); | 305 | //string name = (objGroup.PrimCount == 1) ? objGroup.Name : string.Format("{0} ({1}/{2})", obj.Name, primNumber, objGroup.PrimCount); |
301 | //m_log.DebugFormat("[ARCHIVER]: Object permissions: {0}: Base={1:X4}, Owner={2:X4}, Everyone={3:X4}, permissionClass={4}, checkPermissions={5}, canCopy={6}, canTransfer={7}, permitted={8}", | 306 | //m_log.DebugFormat("[ARCHIVER]: Object permissions: {0}: Base={1:X4}, Owner={2:X4}, Everyone={3:X4}, permissionClass={4}, checkPermissions={5}, canCopy={6}, canTransfer={7}, creator={8}, permitted={9}", |
302 | // name, obj.BaseMask, obj.OwnerMask, obj.EveryoneMask, | 307 | // name, obj.BaseMask, obj.OwnerMask, obj.EveryoneMask, |
303 | // permissionClass, checkPermissions, canCopy, canTransfer, permitted); | 308 | // permissionClass, checkPermissions, canCopy, canTransfer, creator, partPermitted); |
304 | 309 | ||
305 | if (!partPermitted) | 310 | if (!partPermitted) |
306 | { | 311 | { |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index e05e8f6..053c6f5 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | |||
@@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
68 | SerialiserModule serialiserModule = new SerialiserModule(); | 68 | SerialiserModule serialiserModule = new SerialiserModule(); |
69 | TerrainModule terrainModule = new TerrainModule(); | 69 | TerrainModule terrainModule = new TerrainModule(); |
70 | 70 | ||
71 | m_scene = SceneHelpers.SetupScene(); | 71 | m_scene = new SceneHelpers().SetupScene(); |
72 | SceneHelpers.SetupSceneModules(m_scene, m_archiverModule, serialiserModule, terrainModule); | 72 | SceneHelpers.SetupSceneModules(m_scene, m_archiverModule, serialiserModule, terrainModule); |
73 | } | 73 | } |
74 | 74 | ||
@@ -463,7 +463,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
463 | SerialiserModule serialiserModule = new SerialiserModule(); | 463 | SerialiserModule serialiserModule = new SerialiserModule(); |
464 | TerrainModule terrainModule = new TerrainModule(); | 464 | TerrainModule terrainModule = new TerrainModule(); |
465 | 465 | ||
466 | TestScene scene2 = SceneHelpers.SetupScene(); | 466 | TestScene scene2 = new SceneHelpers().SetupScene(); |
467 | SceneHelpers.SetupSceneModules(scene2, archiverModule, serialiserModule, terrainModule); | 467 | SceneHelpers.SetupSceneModules(scene2, archiverModule, serialiserModule, terrainModule); |
468 | 468 | ||
469 | // Make sure there's a valid owner for the owner we saved (this should have been wiped if the code is | 469 | // Make sure there's a valid owner for the owner we saved (this should have been wiped if the code is |
@@ -607,7 +607,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
607 | SerialiserModule serialiserModule = new SerialiserModule(); | 607 | SerialiserModule serialiserModule = new SerialiserModule(); |
608 | TerrainModule terrainModule = new TerrainModule(); | 608 | TerrainModule terrainModule = new TerrainModule(); |
609 | 609 | ||
610 | Scene scene = SceneHelpers.SetupScene(); | 610 | Scene scene = new SceneHelpers().SetupScene(); |
611 | SceneHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule); | 611 | SceneHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule); |
612 | 612 | ||
613 | m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false); | 613 | m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false); |
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs index e553ffa..b5ee4d2 100644 --- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs +++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs | |||
@@ -64,7 +64,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
64 | { | 64 | { |
65 | m_pcm = new PrimCountModule(); | 65 | m_pcm = new PrimCountModule(); |
66 | LandManagementModule lmm = new LandManagementModule(); | 66 | LandManagementModule lmm = new LandManagementModule(); |
67 | m_scene = SceneHelpers.SetupScene(); | 67 | m_scene = new SceneHelpers().SetupScene(); |
68 | SceneHelpers.SetupSceneModules(m_scene, lmm, m_pcm); | 68 | SceneHelpers.SetupSceneModules(m_scene, lmm, m_pcm); |
69 | 69 | ||
70 | int xParcelDivider = (int)Constants.RegionSize - 1; | 70 | int xParcelDivider = (int)Constants.RegionSize - 1; |
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs index 4326606..0545250 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs | |||
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests | |||
53 | public void SetUp() | 53 | public void SetUp() |
54 | { | 54 | { |
55 | m_module = new MoapModule(); | 55 | m_module = new MoapModule(); |
56 | m_scene = SceneHelpers.SetupScene(); | 56 | m_scene = new SceneHelpers().SetupScene(); |
57 | SceneHelpers.SetupSceneModules(m_scene, m_module); | 57 | SceneHelpers.SetupSceneModules(m_scene, m_module); |
58 | } | 58 | } |
59 | 59 | ||
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs index d1d2020..7825e3e 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs | |||
@@ -343,7 +343,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests | |||
343 | public void Init() | 343 | public void Init() |
344 | { | 344 | { |
345 | m_serialiserModule = new SerialiserModule(); | 345 | m_serialiserModule = new SerialiserModule(); |
346 | m_scene = SceneHelpers.SetupScene(); | 346 | m_scene = new SceneHelpers().SetupScene(); |
347 | SceneHelpers.SetupSceneModules(m_scene, m_serialiserModule); | 347 | SceneHelpers.SetupSceneModules(m_scene, m_serialiserModule); |
348 | } | 348 | } |
349 | 349 | ||
diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs index dc3ff89..b4dc3c3 100644 --- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs +++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs | |||
@@ -135,6 +135,36 @@ namespace OpenSim.Region.Framework.Interfaces | |||
135 | bool Say(UUID agentID, Scene scene, string text); | 135 | bool Say(UUID agentID, Scene scene, string text); |
136 | 136 | ||
137 | /// <summary> | 137 | /// <summary> |
138 | /// Get the NPC to say something. | ||
139 | /// </summary> | ||
140 | /// <param name="agentID">The UUID of the NPC</param> | ||
141 | /// <param name="scene"></param> | ||
142 | /// <param name="text"></param> | ||
143 | /// <param name="channel"></param> | ||
144 | /// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns> | ||
145 | bool Say(UUID agentID, Scene scene, string text, int channel); | ||
146 | |||
147 | /// <summary> | ||
148 | /// Get the NPC to shout something. | ||
149 | /// </summary> | ||
150 | /// <param name="agentID">The UUID of the NPC</param> | ||
151 | /// <param name="scene"></param> | ||
152 | /// <param name="text"></param> | ||
153 | /// <param name="channel"></param> | ||
154 | /// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns> | ||
155 | bool Shout(UUID agentID, Scene scene, string text, int channel); | ||
156 | |||
157 | /// <summary> | ||
158 | /// Get the NPC to whisper something. | ||
159 | /// </summary> | ||
160 | /// <param name="agentID">The UUID of the NPC</param> | ||
161 | /// <param name="scene"></param> | ||
162 | /// <param name="text"></param> | ||
163 | /// <param name="channel"></param> | ||
164 | /// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns> | ||
165 | bool Whisper(UUID agentID, Scene scene, string text, int channel); | ||
166 | |||
167 | /// <summary> | ||
138 | /// Sit the NPC. | 168 | /// Sit the NPC. |
139 | /// </summary> | 169 | /// </summary> |
140 | /// <param name="agentID"></param> | 170 | /// <param name="agentID"></param> |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 515332f..ff2c46f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -103,6 +103,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
103 | public bool m_trustBinaries; | 103 | public bool m_trustBinaries; |
104 | public bool m_allowScriptCrossings; | 104 | public bool m_allowScriptCrossings; |
105 | public bool m_useFlySlow; | 105 | public bool m_useFlySlow; |
106 | public bool m_useTrashOnDelete = true; | ||
106 | 107 | ||
107 | /// <summary> | 108 | /// <summary> |
108 | /// Temporarily setting to trigger appearance resends at 60 second intervals. | 109 | /// Temporarily setting to trigger appearance resends at 60 second intervals. |
@@ -458,6 +459,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
458 | { | 459 | { |
459 | if (m_simulationService == null) | 460 | if (m_simulationService == null) |
460 | m_simulationService = RequestModuleInterface<ISimulationService>(); | 461 | m_simulationService = RequestModuleInterface<ISimulationService>(); |
462 | |||
461 | return m_simulationService; | 463 | return m_simulationService; |
462 | } | 464 | } |
463 | } | 465 | } |
@@ -735,6 +737,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
735 | m_clampPrimSize = true; | 737 | m_clampPrimSize = true; |
736 | } | 738 | } |
737 | 739 | ||
740 | m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete",m_useTrashOnDelete); | ||
738 | m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries); | 741 | m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries); |
739 | m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings); | 742 | m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings); |
740 | m_dontPersistBefore = | 743 | m_dontPersistBefore = |
@@ -3378,8 +3381,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3378 | try | 3381 | try |
3379 | { | 3382 | { |
3380 | m_log.DebugFormat( | 3383 | m_log.DebugFormat( |
3381 | "[SCENE]: Removing {0} agent {1} from region {2}", | 3384 | "[SCENE]: Removing {0} agent {1} {2} from region {3}", |
3382 | (isChildAgent ? "child" : "root"), agentID, RegionInfo.RegionName); | 3385 | (isChildAgent ? "child" : "root"), avatar.Name, agentID, RegionInfo.RegionName); |
3383 | 3386 | ||
3384 | m_sceneGraph.removeUserCount(!isChildAgent); | 3387 | m_sceneGraph.removeUserCount(!isChildAgent); |
3385 | 3388 | ||
@@ -3977,41 +3980,41 @@ namespace OpenSim.Region.Framework.Scenes | |||
3977 | return m_authenticateHandler.TryChangeCiruitCode(oldcc, newcc); | 3980 | return m_authenticateHandler.TryChangeCiruitCode(oldcc, newcc); |
3978 | } | 3981 | } |
3979 | 3982 | ||
3980 | /// <summary> | 3983 | // /// <summary> |
3981 | /// The Grid has requested that we log-off a user. Log them off. | 3984 | // /// The Grid has requested that we log-off a user. Log them off. |
3982 | /// </summary> | 3985 | // /// </summary> |
3983 | /// <param name="AvatarID">Unique ID of the avatar to log-off</param> | 3986 | // /// <param name="AvatarID">Unique ID of the avatar to log-off</param> |
3984 | /// <param name="RegionSecret">SecureSessionID of the user, or the RegionSecret text when logging on to the grid</param> | 3987 | // /// <param name="RegionSecret">SecureSessionID of the user, or the RegionSecret text when logging on to the grid</param> |
3985 | /// <param name="message">message to display to the user. Reason for being logged off</param> | 3988 | // /// <param name="message">message to display to the user. Reason for being logged off</param> |
3986 | public void HandleLogOffUserFromGrid(UUID AvatarID, UUID RegionSecret, string message) | 3989 | // public void HandleLogOffUserFromGrid(UUID AvatarID, UUID RegionSecret, string message) |
3987 | { | 3990 | // { |
3988 | ScenePresence loggingOffUser = GetScenePresence(AvatarID); | 3991 | // ScenePresence loggingOffUser = GetScenePresence(AvatarID); |
3989 | if (loggingOffUser != null) | 3992 | // if (loggingOffUser != null) |
3990 | { | 3993 | // { |
3991 | UUID localRegionSecret = UUID.Zero; | 3994 | // UUID localRegionSecret = UUID.Zero; |
3992 | bool parsedsecret = UUID.TryParse(m_regInfo.regionSecret, out localRegionSecret); | 3995 | // bool parsedsecret = UUID.TryParse(m_regInfo.regionSecret, out localRegionSecret); |
3993 | 3996 | // | |
3994 | // Region Secret is used here in case a new sessionid overwrites an old one on the user server. | 3997 | // // Region Secret is used here in case a new sessionid overwrites an old one on the user server. |
3995 | // Will update the user server in a few revisions to use it. | 3998 | // // Will update the user server in a few revisions to use it. |
3996 | 3999 | // | |
3997 | if (RegionSecret == loggingOffUser.ControllingClient.SecureSessionId || (parsedsecret && RegionSecret == localRegionSecret)) | 4000 | // if (RegionSecret == loggingOffUser.ControllingClient.SecureSessionId || (parsedsecret && RegionSecret == localRegionSecret)) |
3998 | { | 4001 | // { |
3999 | m_sceneGridService.SendCloseChildAgentConnections(loggingOffUser.UUID, loggingOffUser.KnownRegionHandles); | 4002 | // m_sceneGridService.SendCloseChildAgentConnections(loggingOffUser.UUID, loggingOffUser.KnownRegionHandles); |
4000 | loggingOffUser.ControllingClient.Kick(message); | 4003 | // loggingOffUser.ControllingClient.Kick(message); |
4001 | // Give them a second to receive the message! | 4004 | // // Give them a second to receive the message! |
4002 | Thread.Sleep(1000); | 4005 | // Thread.Sleep(1000); |
4003 | loggingOffUser.ControllingClient.Close(); | 4006 | // loggingOffUser.ControllingClient.Close(); |
4004 | } | 4007 | // } |
4005 | else | 4008 | // else |
4006 | { | 4009 | // { |
4007 | m_log.Info("[USERLOGOFF]: System sending the LogOff user message failed to sucessfully authenticate"); | 4010 | // m_log.Info("[USERLOGOFF]: System sending the LogOff user message failed to sucessfully authenticate"); |
4008 | } | 4011 | // } |
4009 | } | 4012 | // } |
4010 | else | 4013 | // else |
4011 | { | 4014 | // { |
4012 | m_log.InfoFormat("[USERLOGOFF]: Got a logoff request for {0} but the user isn't here. The user might already have been logged out", AvatarID.ToString()); | 4015 | // m_log.InfoFormat("[USERLOGOFF]: Got a logoff request for {0} but the user isn't here. The user might already have been logged out", AvatarID.ToString()); |
4013 | } | 4016 | // } |
4014 | } | 4017 | // } |
4015 | 4018 | ||
4016 | /// <summary> | 4019 | /// <summary> |
4017 | /// Triggered when an agent crosses into this sim. Also happens on initial login. | 4020 | /// Triggered when an agent crosses into this sim. Also happens on initial login. |
@@ -4067,7 +4070,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
4067 | ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, Constants.RegionSize / 2, Constants.RegionSize / 2); | 4070 | ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, Constants.RegionSize / 2, Constants.RegionSize / 2); |
4068 | if (nearestParcel == null) | 4071 | if (nearestParcel == null) |
4069 | { | 4072 | { |
4070 | m_log.DebugFormat("[SCENE]: Denying root agent entry to {0}: no allowed parcel", cAgentData.AgentID); | 4073 | m_log.DebugFormat( |
4074 | "[SCENE]: Denying root agent entry to {0} in {1}: no allowed parcel", | ||
4075 | cAgentData.AgentID, RegionInfo.RegionName); | ||
4076 | |||
4071 | return false; | 4077 | return false; |
4072 | } | 4078 | } |
4073 | 4079 | ||
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 18a396f..e0d5055 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1217,7 +1217,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1217 | 1217 | ||
1218 | if ((m_callbackURI != null) && !m_callbackURI.Equals("")) | 1218 | if ((m_callbackURI != null) && !m_callbackURI.Equals("")) |
1219 | { | 1219 | { |
1220 | m_log.DebugFormat("[SCENE PRESENCE]: Releasing agent in URI {0}", m_callbackURI); | 1220 | m_log.DebugFormat( |
1221 | "[SCENE PRESENCE]: Releasing {0} {1} with callback to {2}", | ||
1222 | client.Name, client.AgentId, m_callbackURI); | ||
1223 | |||
1221 | Scene.SimulationService.ReleaseAgent(m_originRegionID, UUID, m_callbackURI); | 1224 | Scene.SimulationService.ReleaseAgent(m_originRegionID, UUID, m_callbackURI); |
1222 | m_callbackURI = null; | 1225 | m_callbackURI = null; |
1223 | } | 1226 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs b/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs index a5d2b23..ea9fc93 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs | |||
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
45 | { | 45 | { |
46 | static public Random random; | 46 | static public Random random; |
47 | SceneObjectGroup found; | 47 | SceneObjectGroup found; |
48 | Scene scene = SceneHelpers.SetupScene(); | 48 | Scene scene = new SceneHelpers().SetupScene(); |
49 | 49 | ||
50 | [Test] | 50 | [Test] |
51 | public void T010_AddObjects() | 51 | public void T010_AddObjects() |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs index 9a60e50..1c33a5f 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
44 | public void TestDuplicateObject() | 44 | public void TestDuplicateObject() |
45 | { | 45 | { |
46 | TestHelpers.InMethod(); | 46 | TestHelpers.InMethod(); |
47 | Scene scene = SceneHelpers.SetupScene(); | 47 | Scene scene = new SceneHelpers().SetupScene(); |
48 | 48 | ||
49 | UUID ownerId = new UUID("00000000-0000-0000-0000-000000000010"); | 49 | UUID ownerId = new UUID("00000000-0000-0000-0000-000000000010"); |
50 | string part1Name = "part1"; | 50 | string part1Name = "part1"; |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs index 7737d8e..453e077 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs | |||
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
88 | { | 88 | { |
89 | TestHelpers.InMethod(); | 89 | TestHelpers.InMethod(); |
90 | 90 | ||
91 | Scene scene = SceneHelpers.SetupScene(); | 91 | Scene scene = new SceneHelpers().SetupScene(); |
92 | int partsToTestCount = 3; | 92 | int partsToTestCount = 3; |
93 | 93 | ||
94 | SceneObjectGroup so | 94 | SceneObjectGroup so |
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
118 | { | 118 | { |
119 | TestHelpers.InMethod(); | 119 | TestHelpers.InMethod(); |
120 | 120 | ||
121 | Scene scene = SceneHelpers.SetupScene(); | 121 | Scene scene = new SceneHelpers().SetupScene(); |
122 | 122 | ||
123 | string obj1Name = "Alfred"; | 123 | string obj1Name = "Alfred"; |
124 | string obj2Name = "Betty"; | 124 | string obj2Name = "Betty"; |
@@ -152,7 +152,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
152 | { | 152 | { |
153 | TestHelpers.InMethod(); | 153 | TestHelpers.InMethod(); |
154 | 154 | ||
155 | Scene scene = SceneHelpers.SetupScene(); | 155 | Scene scene = new SceneHelpers().SetupScene(); |
156 | int partsToTestCount = 3; | 156 | int partsToTestCount = 3; |
157 | 157 | ||
158 | SceneObjectGroup so | 158 | SceneObjectGroup so |
@@ -185,7 +185,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
185 | { | 185 | { |
186 | TestHelpers.InMethod(); | 186 | TestHelpers.InMethod(); |
187 | 187 | ||
188 | TestScene scene = SceneHelpers.SetupScene(); | 188 | TestScene scene = new SceneHelpers().SetupScene(); |
189 | SceneObjectPart part = SceneHelpers.AddSceneObject(scene); | 189 | SceneObjectPart part = SceneHelpers.AddSceneObject(scene); |
190 | scene.DeleteSceneObject(part.ParentGroup, false); | 190 | scene.DeleteSceneObject(part.ParentGroup, false); |
191 | 191 | ||
@@ -204,7 +204,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
204 | 204 | ||
205 | UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); | 205 | UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); |
206 | 206 | ||
207 | TestScene scene = SceneHelpers.SetupScene(); | 207 | TestScene scene = new SceneHelpers().SetupScene(); |
208 | 208 | ||
209 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. | 209 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. |
210 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; | 210 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs index 654b1a2..0076f41 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
61 | 61 | ||
62 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); | 62 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); |
63 | 63 | ||
64 | TestScene scene = SceneHelpers.SetupScene(); | 64 | TestScene scene = new SceneHelpers().SetupScene(); |
65 | IConfigSource configSource = new IniConfigSource(); | 65 | IConfigSource configSource = new IniConfigSource(); |
66 | IConfig config = configSource.AddConfig("Startup"); | 66 | IConfig config = configSource.AddConfig("Startup"); |
67 | config.Set("serverside_object_permissions", true); | 67 | config.Set("serverside_object_permissions", true); |
@@ -100,7 +100,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
100 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); | 100 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); |
101 | UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001"); | 101 | UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001"); |
102 | 102 | ||
103 | TestScene scene = SceneHelpers.SetupScene(); | 103 | TestScene scene = new SceneHelpers().SetupScene(); |
104 | IConfigSource configSource = new IniConfigSource(); | 104 | IConfigSource configSource = new IniConfigSource(); |
105 | IConfig config = configSource.AddConfig("Startup"); | 105 | IConfig config = configSource.AddConfig("Startup"); |
106 | config.Set("serverside_object_permissions", true); | 106 | config.Set("serverside_object_permissions", true); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs index be5b4a8..1add3dd 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
55 | UUID ownerId = TestHelpers.ParseTail(0x1); | 55 | UUID ownerId = TestHelpers.ParseTail(0x1); |
56 | int nParts = 3; | 56 | int nParts = 3; |
57 | 57 | ||
58 | TestScene scene = SceneHelpers.SetupScene(); | 58 | TestScene scene = new SceneHelpers().SetupScene(); |
59 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(nParts, ownerId, "TestLinkToSelf_", 0x10); | 59 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(nParts, ownerId, "TestLinkToSelf_", 0x10); |
60 | scene.AddSceneObject(sog1); | 60 | scene.AddSceneObject(sog1); |
61 | scene.LinkObjects(ownerId, sog1.LocalId, new List<uint>() { sog1.Parts[1].LocalId }); | 61 | scene.LinkObjects(ownerId, sog1.LocalId, new List<uint>() { sog1.Parts[1].LocalId }); |
@@ -71,7 +71,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
71 | 71 | ||
72 | bool debugtest = false; | 72 | bool debugtest = false; |
73 | 73 | ||
74 | Scene scene = SceneHelpers.SetupScene(); | 74 | Scene scene = new SceneHelpers().SetupScene(); |
75 | SceneObjectPart part1 = SceneHelpers.AddSceneObject(scene); | 75 | SceneObjectPart part1 = SceneHelpers.AddSceneObject(scene); |
76 | SceneObjectGroup grp1 = part1.ParentGroup; | 76 | SceneObjectGroup grp1 = part1.ParentGroup; |
77 | SceneObjectPart part2 = SceneHelpers.AddSceneObject(scene); | 77 | SceneObjectPart part2 = SceneHelpers.AddSceneObject(scene); |
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
153 | 153 | ||
154 | bool debugtest = false; | 154 | bool debugtest = false; |
155 | 155 | ||
156 | Scene scene = SceneHelpers.SetupScene(); | 156 | Scene scene = new SceneHelpers().SetupScene(); |
157 | SceneObjectPart part1 = SceneHelpers.AddSceneObject(scene); | 157 | SceneObjectPart part1 = SceneHelpers.AddSceneObject(scene); |
158 | SceneObjectGroup grp1 = part1.ParentGroup; | 158 | SceneObjectGroup grp1 = part1.ParentGroup; |
159 | SceneObjectPart part2 = SceneHelpers.AddSceneObject(scene); | 159 | SceneObjectPart part2 = SceneHelpers.AddSceneObject(scene); |
@@ -286,7 +286,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
286 | TestHelpers.InMethod(); | 286 | TestHelpers.InMethod(); |
287 | //log4net.Config.XmlConfigurator.Configure(); | 287 | //log4net.Config.XmlConfigurator.Configure(); |
288 | 288 | ||
289 | TestScene scene = SceneHelpers.SetupScene(); | 289 | TestScene scene = new SceneHelpers().SetupScene(); |
290 | 290 | ||
291 | string rootPartName = "rootpart"; | 291 | string rootPartName = "rootpart"; |
292 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); | 292 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); |
@@ -325,7 +325,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
325 | TestHelpers.InMethod(); | 325 | TestHelpers.InMethod(); |
326 | //log4net.Config.XmlConfigurator.Configure(); | 326 | //log4net.Config.XmlConfigurator.Configure(); |
327 | 327 | ||
328 | TestScene scene = SceneHelpers.SetupScene(); | 328 | TestScene scene = new SceneHelpers().SetupScene(); |
329 | 329 | ||
330 | string rootPartName = "rootpart"; | 330 | string rootPartName = "rootpart"; |
331 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); | 331 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs index b49c6e7..0a94c19 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectResizeTests.cs | |||
@@ -52,7 +52,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
52 | TestHelpers.InMethod(); | 52 | TestHelpers.InMethod(); |
53 | // log4net.Config.XmlConfigurator.Configure(); | 53 | // log4net.Config.XmlConfigurator.Configure(); |
54 | 54 | ||
55 | Scene scene = SceneHelpers.SetupScene(); | 55 | Scene scene = new SceneHelpers().SetupScene(); |
56 | SceneObjectGroup g1 = SceneHelpers.AddSceneObject(scene).ParentGroup; | 56 | SceneObjectGroup g1 = SceneHelpers.AddSceneObject(scene).ParentGroup; |
57 | 57 | ||
58 | g1.GroupResize(new Vector3(2, 3, 4)); | 58 | g1.GroupResize(new Vector3(2, 3, 4)); |
@@ -75,7 +75,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
75 | TestHelpers.InMethod(); | 75 | TestHelpers.InMethod(); |
76 | //log4net.Config.XmlConfigurator.Configure(); | 76 | //log4net.Config.XmlConfigurator.Configure(); |
77 | 77 | ||
78 | Scene scene = SceneHelpers.SetupScene(); | 78 | Scene scene = new SceneHelpers().SetupScene(); |
79 | 79 | ||
80 | SceneObjectGroup g1 = SceneHelpers.CreateSceneObject(2, UUID.Zero); | 80 | SceneObjectGroup g1 = SceneHelpers.CreateSceneObject(2, UUID.Zero); |
81 | g1.RootPart.Scale = new Vector3(2, 3, 4); | 81 | g1.RootPart.Scale = new Vector3(2, 3, 4); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs index c582cf6..d2361f8 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectScriptTests.cs | |||
@@ -52,7 +52,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
52 | // UUID itemId = TestHelpers.ParseTail(0x2); | 52 | // UUID itemId = TestHelpers.ParseTail(0x2); |
53 | string itemName = "Test Script Item"; | 53 | string itemName = "Test Script Item"; |
54 | 54 | ||
55 | Scene scene = SceneHelpers.SetupScene(); | 55 | Scene scene = new SceneHelpers().SetupScene(); |
56 | SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId); | 56 | SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId); |
57 | scene.AddNewSceneObject(so, true); | 57 | scene.AddNewSceneObject(so, true); |
58 | 58 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs index 9fea3c6..6d255aa 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs | |||
@@ -50,7 +50,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
50 | [SetUp] | 50 | [SetUp] |
51 | public void SetUp() | 51 | public void SetUp() |
52 | { | 52 | { |
53 | m_scene = SceneHelpers.SetupScene(); | 53 | m_scene = new SceneHelpers().SetupScene(); |
54 | } | 54 | } |
55 | 55 | ||
56 | [Test] | 56 | [Test] |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs index 360566d..742c769 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs | |||
@@ -52,7 +52,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
52 | [SetUp] | 52 | [SetUp] |
53 | public void Init() | 53 | public void Init() |
54 | { | 54 | { |
55 | m_scene = SceneHelpers.SetupScene(); | 55 | m_scene = new SceneHelpers().SetupScene(); |
56 | m_so1 = SceneHelpers.CreateSceneObject(1, m_ownerId, "so1", 0x10); | 56 | m_so1 = SceneHelpers.CreateSceneObject(1, m_ownerId, "so1", 0x10); |
57 | m_so2 = SceneHelpers.CreateSceneObject(1, m_ownerId, "so2", 0x20); | 57 | m_so2 = SceneHelpers.CreateSceneObject(1, m_ownerId, "so2", 0x20); |
58 | } | 58 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs index c13d82e..c7eaff9 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
58 | 58 | ||
59 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); | 59 | UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); |
60 | 60 | ||
61 | TestScene scene = SceneHelpers.SetupScene(); | 61 | TestScene scene = new SceneHelpers().SetupScene(); |
62 | IConfigSource configSource = new IniConfigSource(); | 62 | IConfigSource configSource = new IniConfigSource(); |
63 | 63 | ||
64 | IConfig startupConfig = configSource.AddConfig("Startup"); | 64 | IConfig startupConfig = configSource.AddConfig("Startup"); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs index ed9b179..2e46377 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs | |||
@@ -67,10 +67,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
67 | public void Init() | 67 | public void Init() |
68 | { | 68 | { |
69 | TestHelpers.InMethod(); | 69 | TestHelpers.InMethod(); |
70 | 70 | ||
71 | scene = SceneHelpers.SetupScene("Neighbour x", UUID.Random(), 1000, 1000); | 71 | SceneHelpers sh = new SceneHelpers(); |
72 | scene2 = SceneHelpers.SetupScene("Neighbour x+1", UUID.Random(), 1001, 1000); | 72 | |
73 | scene3 = SceneHelpers.SetupScene("Neighbour x-1", UUID.Random(), 999, 1000); | 73 | scene = sh.SetupScene("Neighbour x", UUID.Random(), 1000, 1000); |
74 | scene2 = sh.SetupScene("Neighbour x+1", UUID.Random(), 1001, 1000); | ||
75 | scene3 = sh.SetupScene("Neighbour x-1", UUID.Random(), 999, 1000); | ||
74 | 76 | ||
75 | ISharedRegionModule interregionComms = new LocalSimulationConnectorModule(); | 77 | ISharedRegionModule interregionComms = new LocalSimulationConnectorModule(); |
76 | interregionComms.Initialise(new IniConfigSource()); | 78 | interregionComms.Initialise(new IniConfigSource()); |
@@ -101,7 +103,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
101 | TestHelpers.InMethod(); | 103 | TestHelpers.InMethod(); |
102 | // log4net.Config.XmlConfigurator.Configure(); | 104 | // log4net.Config.XmlConfigurator.Configure(); |
103 | 105 | ||
104 | TestScene scene = SceneHelpers.SetupScene(); | 106 | TestScene scene = new SceneHelpers().SetupScene(); |
105 | ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1)); | 107 | ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1)); |
106 | 108 | ||
107 | Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(sp.UUID), Is.Not.Null); | 109 | Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(sp.UUID), Is.Not.Null); |
@@ -126,7 +128,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
126 | IConfig config = configSource.AddConfig("Modules"); | 128 | IConfig config = configSource.AddConfig("Modules"); |
127 | config.Set("SimulationServices", "LocalSimulationConnectorModule"); | 129 | config.Set("SimulationServices", "LocalSimulationConnectorModule"); |
128 | 130 | ||
129 | TestScene scene = SceneHelpers.SetupScene(); | 131 | TestScene scene = new SceneHelpers().SetupScene(); |
130 | SceneHelpers.SetupSceneModules(scene, configSource, lsc); | 132 | SceneHelpers.SetupSceneModules(scene, configSource, lsc); |
131 | 133 | ||
132 | UUID agentId = TestHelpers.ParseTail(0x01); | 134 | UUID agentId = TestHelpers.ParseTail(0x01); |
@@ -176,8 +178,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
176 | 178 | ||
177 | // UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001"); | 179 | // UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001"); |
178 | 180 | ||
179 | TestScene myScene1 = SceneHelpers.SetupScene("Neighbour y", UUID.Random(), 1000, 1000); | 181 | TestScene myScene1 = new SceneHelpers().SetupScene("Neighbour y", UUID.Random(), 1000, 1000); |
180 | TestScene myScene2 = SceneHelpers.SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000); | 182 | TestScene myScene2 = new SceneHelpers().SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000); |
181 | 183 | ||
182 | IConfigSource configSource = new IniConfigSource(); | 184 | IConfigSource configSource = new IniConfigSource(); |
183 | IConfig config = configSource.AddConfig("Startup"); | 185 | IConfig config = configSource.AddConfig("Startup"); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs index 89f8007..646e5fa 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAnimationTests.cs | |||
@@ -59,7 +59,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
59 | TestHelpers.InMethod(); | 59 | TestHelpers.InMethod(); |
60 | // log4net.Config.XmlConfigurator.Configure(); | 60 | // log4net.Config.XmlConfigurator.Configure(); |
61 | 61 | ||
62 | TestScene scene = SceneHelpers.SetupScene(); | 62 | TestScene scene = new SceneHelpers().SetupScene(); |
63 | ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1)); | 63 | ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1)); |
64 | sp.Flying = true; | 64 | sp.Flying = true; |
65 | sp.PhysicsCollisionUpdate(new CollisionEventUpdate()); | 65 | sp.PhysicsCollisionUpdate(new CollisionEventUpdate()); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs index cfea10d..1d1ff88 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs | |||
@@ -64,7 +64,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
64 | [SetUp] | 64 | [SetUp] |
65 | public void Init() | 65 | public void Init() |
66 | { | 66 | { |
67 | m_scene = SceneHelpers.SetupScene(); | 67 | m_scene = new SceneHelpers().SetupScene(); |
68 | } | 68 | } |
69 | 69 | ||
70 | [Test] | 70 | [Test] |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs index b7b8db4..313e350 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs | |||
@@ -50,7 +50,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
50 | [SetUp] | 50 | [SetUp] |
51 | public void Init() | 51 | public void Init() |
52 | { | 52 | { |
53 | m_scene = SceneHelpers.SetupScene(); | 53 | m_scene = new SceneHelpers().SetupScene(); |
54 | m_sp = SceneHelpers.AddScenePresence(m_scene, TestHelpers.ParseTail(0x1)); | 54 | m_sp = SceneHelpers.AddScenePresence(m_scene, TestHelpers.ParseTail(0x1)); |
55 | } | 55 | } |
56 | 56 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs index eb7bfbd..19542ff 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
61 | // Not strictly necessary since FriendsModule assumes it is the default (!) | 61 | // Not strictly necessary since FriendsModule assumes it is the default (!) |
62 | config.Configs["Modules"].Set("EntityTransferModule", etm.Name); | 62 | config.Configs["Modules"].Set("EntityTransferModule", etm.Name); |
63 | 63 | ||
64 | TestScene scene = SceneHelpers.SetupScene("sceneA", TestHelpers.ParseTail(0x100), 1000, 1000); | 64 | TestScene scene = new SceneHelpers().SetupScene("sceneA", TestHelpers.ParseTail(0x100), 1000, 1000); |
65 | SceneHelpers.SetupSceneModules(scene, config, etm); | 65 | SceneHelpers.SetupSceneModules(scene, config, etm); |
66 | 66 | ||
67 | Vector3 teleportPosition = new Vector3(10, 11, 12); | 67 | Vector3 teleportPosition = new Vector3(10, 11, 12); |
@@ -83,145 +83,58 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
83 | // Assert.That(sp.Lookat, Is.EqualTo(teleportLookAt)); | 83 | // Assert.That(sp.Lookat, Is.EqualTo(teleportLookAt)); |
84 | } | 84 | } |
85 | 85 | ||
86 | /// <summary> | 86 | [Test] |
87 | /// Test a teleport between two regions that are not neighbours and do not share any neighbours in common. | 87 | public void TestSameSimulatorSeparatedRegionsTeleport() |
88 | /// </summary> | ||
89 | /// Does not yet do what is says on the tin. | ||
90 | /// Commenting for now | ||
91 | //[Test, LongRunning] | ||
92 | public void TestSimpleNotNeighboursTeleport() | ||
93 | { | 88 | { |
94 | TestHelpers.InMethod(); | 89 | TestHelpers.InMethod(); |
95 | ThreadRunResults results = new ThreadRunResults(); | 90 | // log4net.Config.XmlConfigurator.Configure(); |
96 | results.Result = false; | ||
97 | results.Message = "Test did not run"; | ||
98 | TestRunning testClass = new TestRunning(results); | ||
99 | 91 | ||
100 | Thread testThread = new Thread(testClass.run); | 92 | UUID userId = TestHelpers.ParseTail(0x1); |
101 | 93 | ||
102 | // Seems kind of redundant to start a thread and then join it, however.. We need to protect against | 94 | EntityTransferModule etm = new EntityTransferModule(); |
103 | // A thread abort exception in the simulator code. | 95 | LocalSimulationConnectorModule lscm = new LocalSimulationConnectorModule(); |
104 | testThread.Start(); | ||
105 | testThread.Join(); | ||
106 | 96 | ||
107 | Assert.That(testClass.results.Result, Is.EqualTo(true), testClass.results.Message); | 97 | IConfigSource config = new IniConfigSource(); |
108 | // Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); | 98 | config.AddConfig("Modules"); |
109 | } | 99 | // Not strictly necessary since FriendsModule assumes it is the default (!) |
100 | config.Configs["Modules"].Set("EntityTransferModule", etm.Name); | ||
101 | config.Configs["Modules"].Set("SimulationServices", lscm.Name); | ||
110 | 102 | ||
111 | [TearDown] | 103 | SceneHelpers sh = new SceneHelpers(); |
112 | public void TearDown() | 104 | TestScene sceneA = sh.SetupScene("sceneA", TestHelpers.ParseTail(0x100), 1000, 1000); |
113 | { | 105 | TestScene sceneB = sh.SetupScene("sceneB", TestHelpers.ParseTail(0x200), 1002, 1000); |
114 | try | ||
115 | { | ||
116 | if (MainServer.Instance != null) MainServer.Instance.Stop(); | ||
117 | } | ||
118 | catch (NullReferenceException) | ||
119 | { } | ||
120 | } | ||
121 | 106 | ||
122 | } | 107 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, etm, lscm); |
123 | 108 | ||
124 | public class ThreadRunResults | 109 | Vector3 teleportPosition = new Vector3(10, 11, 12); |
125 | { | 110 | Vector3 teleportLookAt = new Vector3(20, 21, 22); |
126 | public bool Result = false; | ||
127 | public string Message = string.Empty; | ||
128 | } | ||
129 | 111 | ||
130 | public class TestRunning | 112 | ScenePresence sp = SceneHelpers.AddScenePresence(sceneA, userId); |
131 | { | 113 | sp.AbsolutePosition = new Vector3(30, 31, 32); |
132 | public ThreadRunResults results; | 114 | |
133 | public TestRunning(ThreadRunResults t) | 115 | // XXX: A very nasty hack to tell the client about the destination scene without having to crank the whole |
134 | { | 116 | // UDP stack (?) |
135 | results = t; | 117 | ((TestClient)sp.ControllingClient).TeleportTargetScene = sceneB; |
136 | } | 118 | |
137 | public void run(object o) | 119 | sceneA.RequestTeleportLocation( |
138 | { | 120 | sp.ControllingClient, |
139 | 121 | sceneB.RegionInfo.RegionHandle, | |
140 | //results.Result = true; | 122 | teleportPosition, |
141 | log4net.Config.XmlConfigurator.Configure(); | 123 | teleportLookAt, |
142 | 124 | (uint)TeleportFlags.ViaLocation); | |
143 | UUID sceneAId = UUID.Parse("00000000-0000-0000-0000-000000000100"); | 125 | |
144 | UUID sceneBId = UUID.Parse("00000000-0000-0000-0000-000000000200"); | 126 | Assert.That(sceneA.GetScenePresence(userId), Is.Null); |
145 | 127 | ||
146 | // shared module | 128 | ScenePresence sceneBSp = sceneB.GetScenePresence(userId); |
147 | ISharedRegionModule interregionComms = new LocalSimulationConnectorModule(); | 129 | Assert.That(sceneBSp, Is.Not.Null); |
148 | 130 | Assert.That(sceneBSp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneB.RegionInfo.RegionName)); | |
149 | 131 | Assert.That(sceneBSp.AbsolutePosition, Is.EqualTo(teleportPosition)); | |
150 | Scene sceneB = SceneHelpers.SetupScene("sceneB", sceneBId, 1010, 1010); | 132 | |
151 | SceneHelpers.SetupSceneModules(sceneB, new IniConfigSource(), interregionComms); | 133 | // TODO: Add assertions to check correct circuit details in both scenes. |
152 | sceneB.RegisterRegionWithGrid(); | 134 | |
153 | 135 | // Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera | |
154 | Scene sceneA = SceneHelpers.SetupScene("sceneA", sceneAId, 1000, 1000); | 136 | // position instead). |
155 | SceneHelpers.SetupSceneModules(sceneA, new IniConfigSource(), interregionComms); | 137 | // Assert.That(sp.Lookat, Is.EqualTo(teleportLookAt)); |
156 | sceneA.RegisterRegionWithGrid(); | ||
157 | |||
158 | UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000041"); | ||
159 | TestClient client = (TestClient)SceneHelpers.AddScenePresence(sceneA, agentId).ControllingClient; | ||
160 | |||
161 | ICapabilitiesModule sceneACapsModule = sceneA.RequestModuleInterface<ICapabilitiesModule>(); | ||
162 | |||
163 | results.Result = (sceneACapsModule.GetCapsPath(agentId) == client.CapsSeedUrl); | ||
164 | |||
165 | if (!results.Result) | ||
166 | { | ||
167 | results.Message = "Incorrect caps object path set up in sceneA"; | ||
168 | return; | ||
169 | } | ||
170 | |||
171 | /* | ||
172 | Assert.That( | ||
173 | sceneACapsModule.GetCapsPath(agentId), | ||
174 | Is.EqualTo(client.CapsSeedUrl), | ||
175 | "Incorrect caps object path set up in sceneA"); | ||
176 | */ | ||
177 | // FIXME: This is a hack to get the test working - really the normal OpenSim mechanisms should be used. | ||
178 | |||
179 | |||
180 | client.TeleportTargetScene = sceneB; | ||
181 | client.Teleport(sceneB.RegionInfo.RegionHandle, new Vector3(100, 100, 100), new Vector3(40, 40, 40)); | ||
182 | |||
183 | results.Result = (sceneB.GetScenePresence(agentId) != null); | ||
184 | if (!results.Result) | ||
185 | { | ||
186 | results.Message = "Client does not have an agent in sceneB"; | ||
187 | return; | ||
188 | } | ||
189 | |||
190 | //Assert.That(sceneB.GetScenePresence(agentId), Is.Not.Null, "Client does not have an agent in sceneB"); | ||
191 | |||
192 | //Assert.That(sceneA.GetScenePresence(agentId), Is.Null, "Client still had an agent in sceneA"); | ||
193 | |||
194 | results.Result = (sceneA.GetScenePresence(agentId) == null); | ||
195 | if (!results.Result) | ||
196 | { | ||
197 | results.Message = "Client still had an agent in sceneA"; | ||
198 | return; | ||
199 | } | ||
200 | |||
201 | ICapabilitiesModule sceneBCapsModule = sceneB.RequestModuleInterface<ICapabilitiesModule>(); | ||
202 | |||
203 | |||
204 | results.Result = ("http://" + sceneB.RegionInfo.ExternalHostName + ":" + sceneB.RegionInfo.HttpPort + | ||
205 | "/CAPS/" + sceneBCapsModule.GetCapsPath(agentId) + "0000/" == client.CapsSeedUrl); | ||
206 | if (!results.Result) | ||
207 | { | ||
208 | results.Message = "Incorrect caps object path set up in sceneB"; | ||
209 | return; | ||
210 | } | ||
211 | |||
212 | // Temporary assertion - caps url construction should at least be doable through a method. | ||
213 | /* | ||
214 | Assert.That( | ||
215 | "http://" + sceneB.RegionInfo.ExternalHostName + ":" + sceneB.RegionInfo.HttpPort + "/CAPS/" + sceneBCapsModule.GetCapsPath(agentId) + "0000/", | ||
216 | Is.EqualTo(client.CapsSeedUrl), | ||
217 | "Incorrect caps object path set up in sceneB"); | ||
218 | */ | ||
219 | // This assertion will currently fail since we don't remove the caps paths when no longer needed | ||
220 | //Assert.That(sceneACapsModule.GetCapsPath(agentId), Is.Null, "sceneA still had a caps object path"); | ||
221 | |||
222 | // TODO: Check that more of everything is as it should be | ||
223 | |||
224 | // TODO: test what happens if we try to teleport to a region that doesn't exist | ||
225 | } | 138 | } |
226 | } | 139 | } |
227 | } | 140 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs index 5c9a77d..d722a09 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs | |||
@@ -60,7 +60,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
60 | { | 60 | { |
61 | TestHelpers.InMethod(); | 61 | TestHelpers.InMethod(); |
62 | 62 | ||
63 | Scene scene = SceneHelpers.SetupScene(); | 63 | Scene scene = new SceneHelpers().SetupScene(); |
64 | scene.Update(1); | 64 | scene.Update(1); |
65 | 65 | ||
66 | Assert.That(scene.Frame, Is.EqualTo(1)); | 66 | Assert.That(scene.Frame, Is.EqualTo(1)); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs index 55c80f5..d15141b 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.Framework.Tests | |||
58 | TestHelpers.InMethod(); | 58 | TestHelpers.InMethod(); |
59 | // log4net.Config.XmlConfigurator.Configure(); | 59 | // log4net.Config.XmlConfigurator.Configure(); |
60 | 60 | ||
61 | Scene scene = SceneHelpers.SetupScene(); | 61 | Scene scene = new SceneHelpers().SetupScene(); |
62 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); | 62 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); |
63 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); | 63 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); |
64 | SceneObjectPart sop1 = sog1.RootPart; | 64 | SceneObjectPart sop1 = sog1.RootPart; |
@@ -81,7 +81,7 @@ namespace OpenSim.Region.Framework.Tests | |||
81 | TestHelpers.InMethod(); | 81 | TestHelpers.InMethod(); |
82 | // log4net.Config.XmlConfigurator.Configure(); | 82 | // log4net.Config.XmlConfigurator.Configure(); |
83 | 83 | ||
84 | Scene scene = SceneHelpers.SetupScene(); | 84 | Scene scene = new SceneHelpers().SetupScene(); |
85 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); | 85 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); |
86 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); | 86 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); |
87 | SceneObjectPart sop1 = sog1.RootPart; | 87 | SceneObjectPart sop1 = sog1.RootPart; |
@@ -124,7 +124,7 @@ namespace OpenSim.Region.Framework.Tests | |||
124 | TestHelpers.InMethod(); | 124 | TestHelpers.InMethod(); |
125 | // log4net.Config.XmlConfigurator.Configure(); | 125 | // log4net.Config.XmlConfigurator.Configure(); |
126 | 126 | ||
127 | Scene scene = SceneHelpers.SetupScene(); | 127 | Scene scene = new SceneHelpers().SetupScene(); |
128 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); | 128 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); |
129 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); | 129 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); |
130 | SceneObjectPart sop1 = sog1.RootPart; | 130 | SceneObjectPart sop1 = sog1.RootPart; |
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Framework.Tests | |||
153 | TestHelpers.InMethod(); | 153 | TestHelpers.InMethod(); |
154 | // log4net.Config.XmlConfigurator.Configure(); | 154 | // log4net.Config.XmlConfigurator.Configure(); |
155 | 155 | ||
156 | Scene scene = SceneHelpers.SetupScene(); | 156 | Scene scene = new SceneHelpers().SetupScene(); |
157 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); | 157 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); |
158 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); | 158 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); |
159 | SceneObjectPart sop1 = sog1.RootPart; | 159 | SceneObjectPart sop1 = sog1.RootPart; |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs index 55fc1e7..44d2d45 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.Framework.Tests | |||
58 | TestHelpers.InMethod(); | 58 | TestHelpers.InMethod(); |
59 | // log4net.Config.XmlConfigurator.Configure(); | 59 | // log4net.Config.XmlConfigurator.Configure(); |
60 | 60 | ||
61 | Scene scene = SceneHelpers.SetupScene(); | 61 | Scene scene = new SceneHelpers().SetupScene(); |
62 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1001)); | 62 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1001)); |
63 | UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1002)); | 63 | UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1002)); |
64 | InventoryItemBase item1 = UserInventoryHelpers.CreateInventoryItem(scene, "item1", user1.PrincipalID); | 64 | InventoryItemBase item1 = UserInventoryHelpers.CreateInventoryItem(scene, "item1", user1.PrincipalID); |
@@ -85,7 +85,7 @@ namespace OpenSim.Region.Framework.Tests | |||
85 | TestHelpers.InMethod(); | 85 | TestHelpers.InMethod(); |
86 | // log4net.Config.XmlConfigurator.Configure(); | 86 | // log4net.Config.XmlConfigurator.Configure(); |
87 | 87 | ||
88 | Scene scene = SceneHelpers.SetupScene(); | 88 | Scene scene = new SceneHelpers().SetupScene(); |
89 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1001)); | 89 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1001)); |
90 | UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1002)); | 90 | UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1002)); |
91 | InventoryFolderBase folder1 | 91 | InventoryFolderBase folder1 |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs index d9fe87c..198e487 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
47 | public void Init() | 47 | public void Init() |
48 | { | 48 | { |
49 | // FIXME: We don't need a full scene here - it would be enough to set up the asset service. | 49 | // FIXME: We don't need a full scene here - it would be enough to set up the asset service. |
50 | Scene scene = SceneHelpers.SetupScene(); | 50 | Scene scene = new SceneHelpers().SetupScene(); |
51 | m_assetService = scene.AssetService; | 51 | m_assetService = scene.AssetService; |
52 | m_uuidGatherer = new UuidGatherer(m_assetService); | 52 | m_uuidGatherer = new UuidGatherer(m_assetService); |
53 | } | 53 | } |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs index d2f6327..ac638f1 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs | |||
@@ -50,7 +50,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests | |||
50 | TestHelpers.InMethod(); | 50 | TestHelpers.InMethod(); |
51 | // log4net.Config.XmlConfigurator.Configure(); | 51 | // log4net.Config.XmlConfigurator.Configure(); |
52 | 52 | ||
53 | TestScene scene = SceneHelpers.SetupScene(); | 53 | TestScene scene = new SceneHelpers().SetupScene(); |
54 | IConfigSource configSource = new IniConfigSource(); | 54 | IConfigSource configSource = new IniConfigSource(); |
55 | IConfig config = configSource.AddConfig("Groups"); | 55 | IConfig config = configSource.AddConfig("Groups"); |
56 | config.Set("Enabled", true); | 56 | config.Set("Enabled", true); |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index c3335f0..c9c12c6 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -76,22 +76,27 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
76 | 76 | ||
77 | public void Say(string message) | 77 | public void Say(string message) |
78 | { | 78 | { |
79 | SendOnChatFromClient(message, ChatTypeEnum.Say); | 79 | SendOnChatFromClient(0, message, ChatTypeEnum.Say); |
80 | } | 80 | } |
81 | 81 | ||
82 | public void Shout(string message) | 82 | public void Say(int channel, string message) |
83 | { | 83 | { |
84 | SendOnChatFromClient(message, ChatTypeEnum.Shout); | 84 | SendOnChatFromClient(channel, message, ChatTypeEnum.Say); |
85 | } | 85 | } |
86 | 86 | ||
87 | public void Whisper(string message) | 87 | public void Shout(int channel, string message) |
88 | { | 88 | { |
89 | SendOnChatFromClient(message, ChatTypeEnum.Whisper); | 89 | SendOnChatFromClient(channel, message, ChatTypeEnum.Shout); |
90 | } | ||
91 | |||
92 | public void Whisper(int channel, string message) | ||
93 | { | ||
94 | SendOnChatFromClient(channel, message, ChatTypeEnum.Whisper); | ||
90 | } | 95 | } |
91 | 96 | ||
92 | public void Broadcast(string message) | 97 | public void Broadcast(string message) |
93 | { | 98 | { |
94 | SendOnChatFromClient(message, ChatTypeEnum.Broadcast); | 99 | SendOnChatFromClient(0, message, ChatTypeEnum.Broadcast); |
95 | } | 100 | } |
96 | 101 | ||
97 | public void GiveMoney(UUID target, int amount) | 102 | public void GiveMoney(UUID target, int amount) |
@@ -146,10 +151,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
146 | 151 | ||
147 | #region Internal Functions | 152 | #region Internal Functions |
148 | 153 | ||
149 | private void SendOnChatFromClient(string message, ChatTypeEnum chatType) | 154 | private void SendOnChatFromClient(int channel, string message, ChatTypeEnum chatType) |
150 | { | 155 | { |
151 | OSChatMessage chatFromClient = new OSChatMessage(); | 156 | OSChatMessage chatFromClient = new OSChatMessage(); |
152 | chatFromClient.Channel = 0; | 157 | chatFromClient.Channel = channel; |
153 | chatFromClient.From = Name; | 158 | chatFromClient.From = Name; |
154 | chatFromClient.Message = message; | 159 | chatFromClient.Message = message; |
155 | chatFromClient.Position = StartPos; | 160 | chatFromClient.Position = StartPos; |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 4f80dea..9c77b59 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -213,6 +213,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
213 | 213 | ||
214 | public bool Say(UUID agentID, Scene scene, string text) | 214 | public bool Say(UUID agentID, Scene scene, string text) |
215 | { | 215 | { |
216 | return Say(agentID, scene, text, 0); | ||
217 | } | ||
218 | |||
219 | public bool Say(UUID agentID, Scene scene, string text, int channel) | ||
220 | { | ||
216 | lock (m_avatars) | 221 | lock (m_avatars) |
217 | { | 222 | { |
218 | if (m_avatars.ContainsKey(agentID)) | 223 | if (m_avatars.ContainsKey(agentID)) |
@@ -220,7 +225,25 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
220 | ScenePresence sp; | 225 | ScenePresence sp; |
221 | scene.TryGetScenePresence(agentID, out sp); | 226 | scene.TryGetScenePresence(agentID, out sp); |
222 | 227 | ||
223 | m_avatars[agentID].Say(text); | 228 | m_avatars[agentID].Say(channel, text); |
229 | |||
230 | return true; | ||
231 | } | ||
232 | } | ||
233 | |||
234 | return false; | ||
235 | } | ||
236 | |||
237 | public bool Shout(UUID agentID, Scene scene, string text, int channel) | ||
238 | { | ||
239 | lock (m_avatars) | ||
240 | { | ||
241 | if (m_avatars.ContainsKey(agentID)) | ||
242 | { | ||
243 | ScenePresence sp; | ||
244 | scene.TryGetScenePresence(agentID, out sp); | ||
245 | |||
246 | m_avatars[agentID].Shout(channel, text); | ||
224 | 247 | ||
225 | return true; | 248 | return true; |
226 | } | 249 | } |
@@ -247,6 +270,24 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
247 | return false; | 270 | return false; |
248 | } | 271 | } |
249 | 272 | ||
273 | public bool Whisper(UUID agentID, Scene scene, string text, int channel) | ||
274 | { | ||
275 | lock (m_avatars) | ||
276 | { | ||
277 | if (m_avatars.ContainsKey(agentID)) | ||
278 | { | ||
279 | ScenePresence sp; | ||
280 | scene.TryGetScenePresence(agentID, out sp); | ||
281 | |||
282 | m_avatars[agentID].Whisper(channel, text); | ||
283 | |||
284 | return true; | ||
285 | } | ||
286 | } | ||
287 | |||
288 | return false; | ||
289 | } | ||
290 | |||
250 | public bool Stand(UUID agentID, Scene scene) | 291 | public bool Stand(UUID agentID, Scene scene) |
251 | { | 292 | { |
252 | lock (m_avatars) | 293 | lock (m_avatars) |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index eea0b2e..a39257e 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | |||
@@ -85,7 +85,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests | |||
85 | m_attMod = new AttachmentsModule(); | 85 | m_attMod = new AttachmentsModule(); |
86 | m_npcMod = new NPCModule(); | 86 | m_npcMod = new NPCModule(); |
87 | 87 | ||
88 | m_scene = SceneHelpers.SetupScene(); | 88 | m_scene = new SceneHelpers().SetupScene(); |
89 | SceneHelpers.SetupSceneModules(m_scene, config, m_afMod, m_umMod, m_attMod, m_npcMod, new BasicInventoryAccessModule()); | 89 | SceneHelpers.SetupSceneModules(m_scene, config, m_afMod, m_umMod, m_attMod, m_npcMod, new BasicInventoryAccessModule()); |
90 | } | 90 | } |
91 | 91 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 3f77f38..60568a8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -360,7 +360,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
360 | 360 | ||
361 | UUID ownerID = ti.OwnerID; | 361 | UUID ownerID = ti.OwnerID; |
362 | 362 | ||
363 | //OSSL only may be used if objet is in the same group as the parcel | 363 | //OSSL only may be used if object is in the same group as the parcel |
364 | if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("PARCEL_GROUP_MEMBER")) | 364 | if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("PARCEL_GROUP_MEMBER")) |
365 | { | 365 | { |
366 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); | 366 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); |
@@ -738,11 +738,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
738 | 738 | ||
739 | m_host.AddScriptLPS(1); | 739 | m_host.AddScriptLPS(1); |
740 | 740 | ||
741 | // For safety, we add another permission check here, and don't rely only on the standard OSSL permissions | ||
741 | if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) | 742 | if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) |
742 | { | 743 | { |
743 | MainConsole.Instance.RunCommand(command); | 744 | MainConsole.Instance.RunCommand(command); |
744 | return true; | 745 | return true; |
745 | } | 746 | } |
747 | |||
746 | return false; | 748 | return false; |
747 | } | 749 | } |
748 | 750 | ||
@@ -2569,6 +2571,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2569 | 2571 | ||
2570 | public void osNpcSay(LSL_Key npc, string message) | 2572 | public void osNpcSay(LSL_Key npc, string message) |
2571 | { | 2573 | { |
2574 | osNpcSay(npc, 0, message); | ||
2575 | } | ||
2576 | |||
2577 | public void osNpcSay(LSL_Key npc, int channel, string message) | ||
2578 | { | ||
2572 | CheckThreatLevel(ThreatLevel.High, "osNpcSay"); | 2579 | CheckThreatLevel(ThreatLevel.High, "osNpcSay"); |
2573 | m_host.AddScriptLPS(1); | 2580 | m_host.AddScriptLPS(1); |
2574 | 2581 | ||
@@ -2580,7 +2587,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2580 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) | 2587 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) |
2581 | return; | 2588 | return; |
2582 | 2589 | ||
2583 | module.Say(npcId, World, message); | 2590 | module.Say(npcId, World, message, channel); |
2591 | } | ||
2592 | } | ||
2593 | |||
2594 | public void osNpcShout(LSL_Key npc, int channel, string message) | ||
2595 | { | ||
2596 | CheckThreatLevel(ThreatLevel.High, "osNpcShout"); | ||
2597 | m_host.AddScriptLPS(1); | ||
2598 | |||
2599 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | ||
2600 | if (module != null) | ||
2601 | { | ||
2602 | UUID npcId = new UUID(npc.m_string); | ||
2603 | |||
2604 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) | ||
2605 | return; | ||
2606 | |||
2607 | module.Shout(npcId, World, message, channel); | ||
2584 | } | 2608 | } |
2585 | } | 2609 | } |
2586 | 2610 | ||
@@ -2681,6 +2705,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2681 | } | 2705 | } |
2682 | } | 2706 | } |
2683 | 2707 | ||
2708 | public void osNpcWhisper(LSL_Key npc, int channel, string message) | ||
2709 | { | ||
2710 | CheckThreatLevel(ThreatLevel.High, "osNpcWhisper"); | ||
2711 | m_host.AddScriptLPS(1); | ||
2712 | |||
2713 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | ||
2714 | if (module != null) | ||
2715 | { | ||
2716 | UUID npcId = new UUID(npc.m_string); | ||
2717 | |||
2718 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) | ||
2719 | return; | ||
2720 | |||
2721 | module.Whisper(npcId, World, message, channel); | ||
2722 | } | ||
2723 | } | ||
2724 | |||
2684 | /// <summary> | 2725 | /// <summary> |
2685 | /// Save the current appearance of the script owner permanently to the named notecard. | 2726 | /// Save the current appearance of the script owner permanently to the named notecard. |
2686 | /// </summary> | 2727 | /// </summary> |
@@ -2832,21 +2873,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2832 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); | 2873 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); |
2833 | m_host.AddScriptLPS(1); | 2874 | m_host.AddScriptLPS(1); |
2834 | 2875 | ||
2835 | if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) | 2876 | World.ForEachRootScenePresence(delegate(ScenePresence sp) |
2836 | { | 2877 | { |
2837 | World.ForEachRootScenePresence(delegate(ScenePresence sp) | 2878 | if (sp.Firstname == FirstName && sp.Lastname == SurName) |
2838 | { | 2879 | { |
2839 | if (sp.Firstname == FirstName && sp.Lastname == SurName) | 2880 | // kick client... |
2840 | { | 2881 | if (alert != null) |
2841 | // kick client... | 2882 | sp.ControllingClient.Kick(alert); |
2842 | if (alert != null) | ||
2843 | sp.ControllingClient.Kick(alert); | ||
2844 | 2883 | ||
2845 | // ...and close on our side | 2884 | // ...and close on our side |
2846 | sp.Scene.IncomingCloseAgent(sp.UUID); | 2885 | sp.Scene.IncomingCloseAgent(sp.UUID); |
2847 | } | 2886 | } |
2848 | }); | 2887 | }); |
2849 | } | ||
2850 | } | 2888 | } |
2851 | 2889 | ||
2852 | public void osCauseDamage(string avatar, double damage) | 2890 | public void osCauseDamage(string avatar, double damage) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index fc77d05..7382495 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -217,11 +217,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
217 | void osNpcSetRot(LSL_Key npc, rotation rot); | 217 | void osNpcSetRot(LSL_Key npc, rotation rot); |
218 | void osNpcStopMoveToTarget(LSL_Key npc); | 218 | void osNpcStopMoveToTarget(LSL_Key npc); |
219 | void osNpcSay(key npc, string message); | 219 | void osNpcSay(key npc, string message); |
220 | void osNpcSay(key npc, int channel, string message); | ||
221 | void osNpcShout(key npc, int channel, string message); | ||
220 | void osNpcSit(key npc, key target, int options); | 222 | void osNpcSit(key npc, key target, int options); |
221 | void osNpcStand(LSL_Key npc); | 223 | void osNpcStand(LSL_Key npc); |
222 | void osNpcRemove(key npc); | 224 | void osNpcRemove(key npc); |
223 | void osNpcPlayAnimation(LSL_Key npc, string animation); | 225 | void osNpcPlayAnimation(LSL_Key npc, string animation); |
224 | void osNpcStopAnimation(LSL_Key npc, string animation); | 226 | void osNpcStopAnimation(LSL_Key npc, string animation); |
227 | void osNpcWhisper(key npc, int channel, string message); | ||
225 | 228 | ||
226 | LSL_Key osOwnerSaveAppearance(string notecard); | 229 | LSL_Key osOwnerSaveAppearance(string notecard); |
227 | LSL_Key osAgentSaveAppearance(key agentId, string notecard); | 230 | LSL_Key osAgentSaveAppearance(key agentId, string notecard); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 36ac0e3..d230662 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -580,6 +580,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
580 | m_OSSL_Functions.osNpcSay(npc, message); | 580 | m_OSSL_Functions.osNpcSay(npc, message); |
581 | } | 581 | } |
582 | 582 | ||
583 | public void osNpcSay(key npc, int channel, string message) | ||
584 | { | ||
585 | m_OSSL_Functions.osNpcSay(npc, channel, message); | ||
586 | } | ||
587 | |||
588 | |||
589 | public void osNpcShout(key npc, int channel, string message) | ||
590 | { | ||
591 | m_OSSL_Functions.osNpcShout(npc, channel, message); | ||
592 | } | ||
593 | |||
583 | public void osNpcSit(LSL_Key npc, LSL_Key target, int options) | 594 | public void osNpcSit(LSL_Key npc, LSL_Key target, int options) |
584 | { | 595 | { |
585 | m_OSSL_Functions.osNpcSit(npc, target, options); | 596 | m_OSSL_Functions.osNpcSit(npc, target, options); |
@@ -605,6 +616,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
605 | m_OSSL_Functions.osNpcStopAnimation(npc, animation); | 616 | m_OSSL_Functions.osNpcStopAnimation(npc, animation); |
606 | } | 617 | } |
607 | 618 | ||
619 | public void osNpcWhisper(key npc, int channel, string message) | ||
620 | { | ||
621 | m_OSSL_Functions.osNpcWhisper(npc, channel, message); | ||
622 | } | ||
623 | |||
608 | public LSL_Key osOwnerSaveAppearance(string notecard) | 624 | public LSL_Key osOwnerSaveAppearance(string notecard) |
609 | { | 625 | { |
610 | return m_OSSL_Functions.osOwnerSaveAppearance(notecard); | 626 | return m_OSSL_Functions.osOwnerSaveAppearance(notecard); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs index e2d0db2..49266e9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs | |||
@@ -63,7 +63,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
63 | IConfig config = initConfigSource.AddConfig("XEngine"); | 63 | IConfig config = initConfigSource.AddConfig("XEngine"); |
64 | config.Set("Enabled", "true"); | 64 | config.Set("Enabled", "true"); |
65 | 65 | ||
66 | m_scene = SceneHelpers.SetupScene(); | 66 | m_scene = new SceneHelpers().SetupScene(); |
67 | SceneHelpers.SetupSceneModules(m_scene, initConfigSource); | 67 | SceneHelpers.SetupSceneModules(m_scene, initConfigSource); |
68 | 68 | ||
69 | m_engine = new XEngine.XEngine(); | 69 | m_engine = new XEngine.XEngine(); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs index 9cf9258..92a63bf 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
58 | IConfig config = initConfigSource.AddConfig("XEngine"); | 58 | IConfig config = initConfigSource.AddConfig("XEngine"); |
59 | config.Set("Enabled", "true"); | 59 | config.Set("Enabled", "true"); |
60 | 60 | ||
61 | Scene scene = SceneHelpers.SetupScene(); | 61 | Scene scene = new SceneHelpers().SetupScene(); |
62 | SceneObjectPart part = SceneHelpers.AddSceneObject(scene); | 62 | SceneObjectPart part = SceneHelpers.AddSceneObject(scene); |
63 | 63 | ||
64 | XEngine.XEngine engine = new XEngine.XEngine(); | 64 | XEngine.XEngine engine = new XEngine.XEngine(); |
@@ -261,7 +261,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
261 | TestHelpers.InMethod(); | 261 | TestHelpers.InMethod(); |
262 | 262 | ||
263 | // Create Prim1. | 263 | // Create Prim1. |
264 | Scene scene = SceneHelpers.SetupScene(); | 264 | Scene scene = new SceneHelpers().SetupScene(); |
265 | string obj1Name = "Prim1"; | 265 | string obj1Name = "Prim1"; |
266 | UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001"); | 266 | UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001"); |
267 | SceneObjectPart part1 = | 267 | SceneObjectPart part1 = |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs index 7573dff..c51227b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs | |||
@@ -67,7 +67,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
67 | config = initConfigSource.AddConfig("NPC"); | 67 | config = initConfigSource.AddConfig("NPC"); |
68 | config.Set("Enabled", "true"); | 68 | config.Set("Enabled", "true"); |
69 | 69 | ||
70 | m_scene = SceneHelpers.SetupScene(); | 70 | m_scene = new SceneHelpers().SetupScene(); |
71 | SceneHelpers.SetupSceneModules(m_scene, initConfigSource, new AvatarFactoryModule(), new NPCModule()); | 71 | SceneHelpers.SetupSceneModules(m_scene, initConfigSource, new AvatarFactoryModule(), new NPCModule()); |
72 | 72 | ||
73 | m_engine = new XEngine.XEngine(); | 73 | m_engine = new XEngine.XEngine(); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs index 9d9fc51..9c36108 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs | |||
@@ -68,7 +68,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
68 | config = initConfigSource.AddConfig("NPC"); | 68 | config = initConfigSource.AddConfig("NPC"); |
69 | config.Set("Enabled", "true"); | 69 | config.Set("Enabled", "true"); |
70 | 70 | ||
71 | m_scene = SceneHelpers.SetupScene(); | 71 | m_scene = new SceneHelpers().SetupScene(); |
72 | SceneHelpers.SetupSceneModules(m_scene, initConfigSource, new AvatarFactoryModule(), new NPCModule()); | 72 | SceneHelpers.SetupSceneModules(m_scene, initConfigSource, new AvatarFactoryModule(), new NPCModule()); |
73 | 73 | ||
74 | m_engine = new XEngine.XEngine(); | 74 | m_engine = new XEngine.XEngine(); |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs index 7d7bd82..a3f848c 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs | |||
@@ -73,7 +73,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Tests | |||
73 | // to AssemblyResolver.OnAssemblyResolve fails. | 73 | // to AssemblyResolver.OnAssemblyResolve fails. |
74 | xEngineConfig.Set("AppDomainLoading", "false"); | 74 | xEngineConfig.Set("AppDomainLoading", "false"); |
75 | 75 | ||
76 | m_scene = SceneHelpers.SetupScene("My Test", UUID.Random(), 1000, 1000, null, configSource); | 76 | m_scene = new SceneHelpers().SetupScene("My Test", UUID.Random(), 1000, 1000, configSource); |
77 | SceneHelpers.SetupSceneModules(m_scene, configSource, m_xEngine, wcModule); | 77 | SceneHelpers.SetupSceneModules(m_scene, configSource, m_xEngine, wcModule); |
78 | m_scene.StartScripts(); | 78 | m_scene.StartScripts(); |
79 | } | 79 | } |