aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs26
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs2
3 files changed, 29 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index feab40e..a2d833b 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -448,7 +448,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
448 "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1}. Returning avatar to source region.", 448 "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1}. Returning avatar to source region.",
449 sp.Name, finalDestination.RegionName); 449 sp.Name, finalDestination.RegionName);
450 450
451 Fail(sp, finalDestination); 451 Fail(sp, finalDestination, logout);
452 return; 452 return;
453 } 453 }
454 454
@@ -480,7 +480,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
480 "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} failed due to no callback from destination region. Returning avatar to source region.", 480 "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} failed due to no callback from destination region. Returning avatar to source region.",
481 sp.Name, finalDestination.RegionName); 481 sp.Name, finalDestination.RegionName);
482 482
483 Fail(sp, finalDestination); 483 Fail(sp, finalDestination, logout);
484 return; 484 return;
485 } 485 }
486 486
@@ -531,7 +531,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
531 } 531 }
532 } 532 }
533 533
534 private void Fail(ScenePresence sp, GridRegion finalDestination) 534 protected virtual void Fail(ScenePresence sp, GridRegion finalDestination, bool logout)
535 { 535 {
536 // Client never contacted destination. Let's restore everything back 536 // Client never contacted destination. Let's restore everything back
537 sp.ControllingClient.SendTeleportFailed("Problems connecting to destination."); 537 sp.ControllingClient.SendTeleportFailed("Problems connecting to destination.");
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
index 5c7ca22..4a563f9 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
@@ -50,6 +50,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
50 50
51 private bool m_Initialized = false; 51 private bool m_Initialized = false;
52 52
53 private bool m_RestrictInventoryAccessAbroad = false;
54
53 private GatekeeperServiceConnector m_GatekeeperConnector; 55 private GatekeeperServiceConnector m_GatekeeperConnector;
54 56
55 #region ISharedRegionModule 57 #region ISharedRegionModule
@@ -68,6 +70,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
68 if (name == Name) 70 if (name == Name)
69 { 71 {
70 InitialiseCommon(source); 72 InitialiseCommon(source);
73 IConfig transferConfig = source.Configs["HGEntityTransfer"];
74 if (transferConfig != null)
75 m_RestrictInventoryAccessAbroad = transferConfig.GetBoolean("RestrictInventoryAccessAbroad", false);
76
71 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name); 77 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name);
72 } 78 }
73 } 79 }
@@ -170,6 +176,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
170 bool success = connector.LoginAgentToGrid(agentCircuit, reg, finalDestination, out reason); 176 bool success = connector.LoginAgentToGrid(agentCircuit, reg, finalDestination, out reason);
171 logout = success; // flag for later logout from this grid; this is an HG TP 177 logout = success; // flag for later logout from this grid; this is an HG TP
172 178
179 if (success && m_RestrictInventoryAccessAbroad)
180 {
181 // TODO tell the viewer to remove the root folder
182 }
183
173 return success; 184 return success;
174 } 185 }
175 else 186 else
@@ -288,6 +299,21 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
288 299
289 } 300 }
290 301
302 protected override void Fail(ScenePresence sp, GridRegion finalDestination, bool logout)
303 {
304 base.Fail(sp, finalDestination, logout);
305 if (logout && m_RestrictInventoryAccessAbroad)
306 {
307 // Restore the user's inventory, because we removed it earlier on
308 InventoryFolderBase root = m_Scenes[0].InventoryService.GetRootFolder(sp.UUID);
309 if (root != null)
310 {
311 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Restoring");
312 sp.ControllingClient.SendBulkUpdateInventory(root);
313 }
314 }
315 }
316
291 #endregion 317 #endregion
292 318
293 #region IUserAgentVerificationModule 319 #region IUserAgentVerificationModule
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
index 9159f0c..14e428e 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
@@ -1199,8 +1199,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain
1199 saveToTileCommand.AddArgument("file height", "The height of the file in tiles", "Integer"); 1199 saveToTileCommand.AddArgument("file height", "The height of the file in tiles", "Integer");
1200 saveToTileCommand.AddArgument("minimum X tile", "The X region coordinate of the first section on the file", 1200 saveToTileCommand.AddArgument("minimum X tile", "The X region coordinate of the first section on the file",
1201 "Integer"); 1201 "Integer");
1202 saveToTileCommand.AddArgument("minimum Y tile", "The Y region coordinate of the first section on the file",
1203 "Integer");
1204 saveToTileCommand.AddArgument("minimum Y tile", "The Y region coordinate of the first tile on the file\n" 1202 saveToTileCommand.AddArgument("minimum Y tile", "The Y region coordinate of the first tile on the file\n"
1205 + "= Example =\n" 1203 + "= Example =\n"
1206 + "To save a PNG file for a set of map tiles 2 regions wide and 3 regions high from map co-ordinate (9910,10234)\n" 1204 + "To save a PNG file for a set of map tiles 2 regions wide and 3 regions high from map co-ordinate (9910,10234)\n"