diff options
author | meta7 | 2010-08-07 06:33:51 -0700 |
---|---|---|
committer | meta7 | 2010-08-07 06:33:51 -0700 |
commit | bcb3b57f8dad06b2df1e84900da9a63253fa5a8e (patch) | |
tree | c081310d6b2c6ebf1636c52a91c6b02dd4b37acf /OpenSim/Server | |
parent | Add a CHANGED_POSITION event so scripts don't have to run expensive loops to ... (diff) | |
parent | and another one... (diff) | |
download | opensim-SC-bcb3b57f8dad06b2df1e84900da9a63253fa5a8e.zip opensim-SC-bcb3b57f8dad06b2df1e84900da9a63253fa5a8e.tar.gz opensim-SC-bcb3b57f8dad06b2df1e84900da9a63253fa5a8e.tar.bz2 opensim-SC-bcb3b57f8dad06b2df1e84900da9a63253fa5a8e.tar.xz |
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Server')
-rw-r--r-- | OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | 33 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/Land/LandHandlers.cs | 4 |
2 files changed, 36 insertions, 1 deletions
diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index c90dd6f..913c6c9 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | |||
@@ -109,6 +109,9 @@ namespace OpenSim.Server.Handlers.Grid | |||
109 | case "get_fallback_regions": | 109 | case "get_fallback_regions": |
110 | return GetFallbackRegions(request); | 110 | return GetFallbackRegions(request); |
111 | 111 | ||
112 | case "get_hyperlinks": | ||
113 | return GetHyperlinks(request); | ||
114 | |||
112 | case "get_region_flags": | 115 | case "get_region_flags": |
113 | return GetRegionFlags(request); | 116 | return GetRegionFlags(request); |
114 | } | 117 | } |
@@ -483,6 +486,36 @@ namespace OpenSim.Server.Handlers.Grid | |||
483 | return encoding.GetBytes(xmlString); | 486 | return encoding.GetBytes(xmlString); |
484 | } | 487 | } |
485 | 488 | ||
489 | byte[] GetHyperlinks(Dictionary<string, object> request) | ||
490 | { | ||
491 | //m_log.DebugFormat("[GRID HANDLER]: GetHyperlinks"); | ||
492 | UUID scopeID = UUID.Zero; | ||
493 | if (request.ContainsKey("SCOPEID")) | ||
494 | UUID.TryParse(request["SCOPEID"].ToString(), out scopeID); | ||
495 | else | ||
496 | m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get linked regions"); | ||
497 | |||
498 | List<GridRegion> rinfos = m_GridService.GetHyperlinks(scopeID); | ||
499 | |||
500 | Dictionary<string, object> result = new Dictionary<string, object>(); | ||
501 | if ((rinfos == null) || ((rinfos != null) && (rinfos.Count == 0))) | ||
502 | result["result"] = "null"; | ||
503 | else | ||
504 | { | ||
505 | int i = 0; | ||
506 | foreach (GridRegion rinfo in rinfos) | ||
507 | { | ||
508 | Dictionary<string, object> rinfoDict = rinfo.ToKeyValuePairs(); | ||
509 | result["region" + i] = rinfoDict; | ||
510 | i++; | ||
511 | } | ||
512 | } | ||
513 | string xmlString = ServerUtils.BuildXmlResponse(result); | ||
514 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | ||
515 | UTF8Encoding encoding = new UTF8Encoding(); | ||
516 | return encoding.GetBytes(xmlString); | ||
517 | } | ||
518 | |||
486 | byte[] GetRegionFlags(Dictionary<string, object> request) | 519 | byte[] GetRegionFlags(Dictionary<string, object> request) |
487 | { | 520 | { |
488 | UUID scopeID = UUID.Zero; | 521 | UUID scopeID = UUID.Zero; |
diff --git a/OpenSim/Server/Handlers/Land/LandHandlers.cs b/OpenSim/Server/Handlers/Land/LandHandlers.cs index a21f9de..561f285 100644 --- a/OpenSim/Server/Handlers/Land/LandHandlers.cs +++ b/OpenSim/Server/Handlers/Land/LandHandlers.cs | |||
@@ -66,7 +66,8 @@ namespace OpenSim.Server.Handlers.Land | |||
66 | uint y = Convert.ToUInt32(requestData["y"]); | 66 | uint y = Convert.ToUInt32(requestData["y"]); |
67 | m_log.DebugFormat("[LAND HANDLER]: Got request for land data at {0}, {1} for region {2}", x, y, regionHandle); | 67 | m_log.DebugFormat("[LAND HANDLER]: Got request for land data at {0}, {1} for region {2}", x, y, regionHandle); |
68 | 68 | ||
69 | LandData landData = m_LocalService.GetLandData(regionHandle, x, y); | 69 | byte regionAccess; |
70 | LandData landData = m_LocalService.GetLandData(regionHandle, x, y, out regionAccess); | ||
70 | Hashtable hash = new Hashtable(); | 71 | Hashtable hash = new Hashtable(); |
71 | if (landData != null) | 72 | if (landData != null) |
72 | { | 73 | { |
@@ -83,6 +84,7 @@ namespace OpenSim.Server.Handlers.Land | |||
83 | hash["SalePrice"] = landData.SalePrice.ToString(); | 84 | hash["SalePrice"] = landData.SalePrice.ToString(); |
84 | hash["SnapshotID"] = landData.SnapshotID.ToString(); | 85 | hash["SnapshotID"] = landData.SnapshotID.ToString(); |
85 | hash["UserLocation"] = landData.UserLocation.ToString(); | 86 | hash["UserLocation"] = landData.UserLocation.ToString(); |
87 | hash["RegionAccess"] = regionAccess.ToString(); | ||
86 | } | 88 | } |
87 | 89 | ||
88 | XmlRpcResponse response = new XmlRpcResponse(); | 90 | XmlRpcResponse response = new XmlRpcResponse(); |