29 using System.Collections.Generic;
31 using System.Reflection;
34 using OpenSim.Framework;
35 using OpenSim.Framework.Console;
37 using OpenSim.Server.Base;
38 using OpenSim.Services.Interfaces;
46 private static readonly ILog m_log =
48 MethodBase.GetCurrentMethod().DeclaringType);
49 private string LogHeader =
"[GRID SERVICE]";
51 private bool m_DeleteOnUnregister =
true;
57 protected bool m_AllowDuplicateNames =
false;
58 protected bool m_AllowHypergridMapSearch =
false;
61 protected bool m_SuppressVarregionOverlapCheckOnRegistration =
false;
63 private static Dictionary<string,object> m_ExtraFeatures =
new Dictionary<string, object>();
68 m_log.DebugFormat(
"[GRID SERVICE]: Starting...");
71 IConfig gridConfig = config.Configs[
"GridService"];
73 bool suppressConsoleCommands =
false;
75 if (gridConfig != null)
77 m_DeleteOnUnregister = gridConfig.GetBoolean(
"DeleteOnUnregister",
true);
79 string authService = gridConfig.GetString(
"AuthenticationService", String.Empty);
81 if (authService != String.Empty)
83 Object[] args =
new Object[] { config };
86 m_AllowDuplicateNames = gridConfig.GetBoolean(
"AllowDuplicateNames", m_AllowDuplicateNames);
87 m_AllowHypergridMapSearch = gridConfig.GetBoolean(
"AllowHypergridMapSearch", m_AllowHypergridMapSearch);
89 m_SuppressVarregionOverlapCheckOnRegistration = gridConfig.GetBoolean(
"SuppressVarregionOverlapCheckOnRegistration", m_SuppressVarregionOverlapCheckOnRegistration);
93 suppressConsoleCommands = gridConfig.GetBoolean(
"SuppressConsoleCommands", suppressConsoleCommands);
96 if (m_RootInstance == null)
98 m_RootInstance =
this;
102 MainConsole.Instance.Commands.AddCommand(
"Regions",
true,
103 "deregister region id",
104 "deregister region id <region-id>+",
105 "Deregister a region manually.",
107 HandleDeregisterRegion);
109 MainConsole.Instance.Commands.AddCommand(
"Regions",
true,
112 "Show details on all regions",
116 MainConsole.Instance.Commands.AddCommand(
"Regions",
true,
118 "show region name <Region name>",
119 "Show details on a region",
123 MainConsole.Instance.Commands.AddCommand(
"Regions",
true,
125 "show region at <x-coord> <y-coord>",
126 "Show details on a region at the given co-ordinate.",
127 "For example, show region at 1000 1000",
130 MainConsole.Instance.Commands.AddCommand(
"General",
true,
133 "Show the current grid size (excluding hyperlink references)",
137 MainConsole.Instance.Commands.AddCommand(
"Regions",
true,
139 "set region flags <Region name> <flags>",
140 "Set database flags for region",
145 if (!suppressConsoleCommands)
146 SetExtraServiceURLs(config);
152 private void SetExtraServiceURLs(IConfigSource config)
154 IConfig loginConfig = config.Configs[
"LoginService"];
155 IConfig gridConfig = config.Configs[
"GridService"];
157 if (loginConfig == null || gridConfig == null)
162 configVal = loginConfig.GetString(
"SearchURL", string.Empty);
163 if (!
string.IsNullOrEmpty(configVal))
164 m_ExtraFeatures[
"search-server-url"] = configVal;
166 configVal = loginConfig.GetString(
"MapTileURL", string.Empty);
167 if (!
string.IsNullOrEmpty(configVal))
170 configVal = configVal.Trim();
171 if (!configVal.EndsWith(
"/"))
172 configVal = configVal +
"/";
173 m_ExtraFeatures[
"map-server-url"] = configVal;
176 configVal = loginConfig.GetString(
"DestinationGuide", string.Empty);
177 if (!
string.IsNullOrEmpty(configVal))
178 m_ExtraFeatures[
"destination-guide-url"] = configVal;
180 configVal = Util.GetConfigVarFromSections<
string>(
181 config,
"GatekeeperURI",
new string[] {
"Startup",
"Hypergrid" }, String.Empty);
182 if (!
string.IsNullOrEmpty(configVal))
183 m_ExtraFeatures[
"GridURL"] = configVal;
185 configVal = Util.GetConfigVarFromSections<
string>(
186 config,
"GridName",
new string[] {
"Const",
"Hypergrid" }, String.Empty);
187 if (
string.IsNullOrEmpty(configVal))
188 configVal = Util.GetConfigVarFromSections<
string>(
189 config,
"gridname",
new string[] {
"GridInfo" }, String.Empty);
190 if (!
string.IsNullOrEmpty(configVal))
191 m_ExtraFeatures[
"GridName"] = configVal;
193 m_ExtraFeatures[
"ExportSupported"] = gridConfig.GetString(
"ExportSupported",
"true");
200 IConfig gridConfig = m_config.Configs[
"GridService"];
202 if (regionInfos.
RegionID == UUID.Zero)
203 return "Invalid RegionID - cannot be zero UUID";
205 String reason =
"Region overlaps another region";
208 RegionData region = m_Database.Get(regionInfos.RegionLocX, regionInfos.RegionLocY, scopeID);
209 if ((region != null) && (region.RegionID != regionInfos.RegionID))
212 m_log.WarnFormat(
"{0} Register region conflict in scope {1}. {2}", LogHeader, scopeID, reason);
226 if ((rflags &
OpenSim.Framework.RegionFlags.Reservation) != 0)
229 if ((
string)region.
Data[
"PrincipalID"] == UUID.Zero.ToString())
230 return "Region location is reserved";
237 rflags |= OpenSim.Framework.RegionFlags.Authenticate;
240 if ((rflags &
OpenSim.Framework.RegionFlags.Authenticate) != 0)
244 if (m_AuthenticationService == null)
245 return "No authentication possible";
247 if (!m_AuthenticationService.Verify(
new UUID(region.
Data[
"PrincipalID"].ToString()), regionInfos.
Token, 30))
248 return "Bad authentication";
254 if (!m_AllowDuplicateNames)
256 List<RegionData> dupe = m_Database.Get(Util.EscapeForLike(regionInfos.RegionName), scopeID);
257 if (dupe != null && dupe.Count > 0)
263 m_log.WarnFormat(
"[GRID SERVICE]: Region tried to register using a duplicate name. New region: {0} ({1}), existing region: {2} ({3}).",
264 regionInfos.RegionName, regionInfos.RegionID, d.RegionName, d.RegionID);
265 return "Duplicate region name";
272 region = m_Database.Get(regionInfos.RegionID, scopeID);
273 if ((region != null) && (region.RegionID == regionInfos.RegionID) &&
274 ((region.
posX != regionInfos.
RegionLocX) || (region.posY != regionInfos.RegionLocY)))
276 if ((Convert.ToInt32(region.
Data[
"flags"]) & (int)
OpenSim.Framework.RegionFlags.NoMove) != 0)
277 return "Can't move this region";
279 if ((Convert.ToInt32(region.
Data[
"flags"]) & (int)
OpenSim.Framework.RegionFlags.LockedOut) != 0)
280 return "Region locked out";
283 m_log.DebugFormat(
"[GRID SERVICE]: Region {0} ({1}) was previously registered at {2}-{3}. Deleting old entry.",
284 regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionLocX, regionInfos.RegionLocY);
288 m_Database.Delete(regionInfos.RegionID);
292 m_log.DebugFormat(
"[GRID SERVICE]: Database exception: {0}", e);
297 RegionData rdata = RegionInfo2RegionData(regionInfos);
298 rdata.ScopeID = scopeID;
302 int oldFlags = Convert.ToInt32(region.Data[
"flags"]);
304 oldFlags &= ~(int)
OpenSim.Framework.RegionFlags.Reservation;
306 rdata.
Data[
"flags"] = oldFlags.ToString();
310 rdata.Data[
"flags"] =
"0";
311 if ((gridConfig != null) && rdata.
RegionName !=
string.Empty)
314 string regionName = rdata.RegionName.Trim().Replace(
' ',
'_');
315 newFlags = ParseFlags(newFlags, gridConfig.GetString(
"DefaultRegionFlags", String.Empty));
316 newFlags = ParseFlags(newFlags, gridConfig.GetString(
"Region_" + regionName, String.Empty));
317 newFlags = ParseFlags(newFlags, gridConfig.GetString(
"Region_" + rdata.
RegionID.ToString(), String.Empty));
318 rdata.Data[
"flags"] = newFlags.ToString();
322 int flags = Convert.ToInt32(rdata.Data[
"flags"]);
323 flags |= (int)
OpenSim.Framework.RegionFlags.RegionOnline;
324 rdata.
Data[
"flags"] = flags.ToString();
328 rdata.Data[
"last_seen"] = Util.UnixTimeSinceEpoch();
329 m_Database.Store(rdata);
333 m_log.DebugFormat(
"[GRID SERVICE]: Database exception: {0}", e);
337 (
"[GRID SERVICE]: Region {0} ({1}, {2}x{3}) registered at {4},{5} with flags {6}",
338 regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionSizeX, regionInfos.RegionSizeY,
339 regionInfos.RegionCoordX, regionInfos.RegionCoordY,
355 private RegionData FindAnyConflictingRegion(
GridRegion regionInfos, UUID scopeID, out
string reason)
357 reason =
"Reregistration";
360 RegionData noErrorRegion = m_Database.Get(regionInfos.RegionLocX, regionInfos.RegionLocY, scopeID);
363 && region.RegionID == regionInfos.
RegionID
369 m_log.DebugFormat(
"{0} FindAnyConflictingRegion: re-register of {1}",
370 LogHeader, RegionString(regionInfos));
378 int ymin = regionInfos.
RegionLocY - (
int)Constants.MaximumRegionSize + 10;
379 int ymax = regionInfos.RegionLocY;
380 List<RegionData> rdatas = m_Database.Get(xmin, ymin, xmax, ymax, scopeID);
385 && (rdata.posY + rdata.sizeY > regionInfos.RegionLocY) )
388 m_log.WarnFormat(
"{0} FindAnyConflictingRegion: conflict of {1} by existing varregion {2}",
389 LogHeader, RegionString(regionInfos), RegionString(region));
390 reason = String.Format(
"Region location is overlapped by existing varregion {0}",
391 RegionString(region));
393 if (m_SuppressVarregionOverlapCheckOnRegistration)
394 region = noErrorRegion;
407 xmin = regionInfos.RegionLocX;
408 xmax = regionInfos.RegionLocX + regionInfos.RegionSizeX - 10;
409 ymin = regionInfos.RegionLocY;
410 ymax = regionInfos.RegionLocY + regionInfos.RegionSizeY - 10;
411 rdatas = m_Database.Get(xmin, ymin, xmax, ymax, scopeID);
417 if (region == null || region.RegionID != regionInfos.
RegionID)
420 m_log.WarnFormat(
"{0} FindAnyConflictingRegion: conflict of varregion {1} overlaps existing region {2}",
421 LogHeader, RegionString(regionInfos), RegionString(region));
422 reason = String.Format(
"Region {0} would overlap existing region {1}",
423 RegionString(regionInfos), RegionString(region));
425 if (m_SuppressVarregionOverlapCheckOnRegistration)
426 region = noErrorRegion;
440 return String.Format(
"{0}/{1} at <{2},{3}>",
441 reg.RegionName, reg.RegionID, reg.coordX, reg.coordY);
447 return String.Format(
"{0}/{1} at <{2},{3}>",
448 reg.RegionName, reg.RegionID, reg.RegionCoordX, reg.RegionCoordY);
453 RegionData region = m_Database.Get(regionID, UUID.Zero);
458 "[GRID SERVICE]: Deregistering region {0} ({1}) at {2}-{3}",
459 region.RegionName, region.RegionID, region.coordX, region.coordY);
461 int flags = Convert.ToInt32(region.Data[
"flags"]);
463 if ((!m_DeleteOnUnregister) || ((flags & (int)
OpenSim.Framework.RegionFlags.Persistent) != 0))
465 flags &= ~(int)
OpenSim.Framework.RegionFlags.RegionOnline;
466 region.
Data[
"flags"] = flags.ToString();
467 region.Data[
"last_seen"] = Util.UnixTimeSinceEpoch();
470 m_Database.Store(region);
474 m_log.DebugFormat(
"[GRID SERVICE]: Database exception: {0}", e);
480 return m_Database.Delete(regionID);
485 List<GridRegion> rinfos =
new List<GridRegion>();
486 RegionData region = m_Database.Get(regionID, scopeID);
490 List<RegionData> rdatas = m_Database.Get(
491 region.posX - 1, region.posY - 1,
492 region.posX + region.sizeX + 1, region.posY + region.sizeY + 1, scopeID);
498 int flags = Convert.ToInt32(rdata.Data[
"flags"]);
499 if ((flags & (
int)Framework.RegionFlags.Hyperlink) == 0)
500 rinfos.Add(RegionData2RegionInfo(rdata));
513 "[GRID SERVICE]: GetNeighbours() called for scope {0}, region {1} but no such region found",
522 RegionData rdata = m_Database.Get(regionID, scopeID);
524 return RegionData2RegionInfo(rdata);
537 uint regionX = Util.WorldToRegionLoc((uint)x);
538 uint regionY = Util.WorldToRegionLoc((uint)y);
539 int snapX = (int)Util.RegionToWorldLoc(regionX);
540 int snapY = (int)Util.RegionToWorldLoc(regionY);
542 RegionData rdata = m_Database.Get(snapX, snapY, scopeID);
545 m_log.DebugFormat(
"{0} GetRegionByPosition. Found region {1} in database. Pos=<{2},{3}>",
546 LogHeader, rdata.RegionName, regionX, regionY);
547 return RegionData2RegionInfo(rdata);
551 m_log.DebugFormat(
"{0} GetRegionByPosition. Did not find region in database. Pos=<{1},{2}>",
552 LogHeader, regionX, regionY);
559 List<RegionData> rdatas = m_Database.Get(Util.EscapeForLike(name), scopeID);
560 if ((rdatas != null) && (rdatas.Count > 0))
561 return RegionData2RegionInfo(rdatas[0]);
563 if (m_AllowHypergridMapSearch)
565 GridRegion r = GetHypergridRegionByName(scopeID, name);
577 List<RegionData> rdatas = m_Database.Get(Util.EscapeForLike(name) +
"%", scopeID);
580 List<GridRegion> rinfos =
new List<GridRegion>();
587 if (count++ < maxNumber)
588 rinfos.Add(RegionData2RegionInfo(rdata));
592 if (m_AllowHypergridMapSearch && (rdatas == null || (rdatas != null && rdatas.Count == 0)))
594 GridRegion r = GetHypergridRegionByName(scopeID, name);
610 if (name.Contains(
"."))
611 return m_HypergridLinker.LinkRegion(scopeID, name);
616 public List<GridRegion>
GetRegionRange(UUID scopeID,
int xmin,
int xmax,
int ymin,
int ymax)
619 int xmaxSnap = (
int)(xmax / Constants.RegionSize) * (
int)Constants.RegionSize;
621 int ymaxSnap = (
int)(ymax / Constants.RegionSize) * (
int)Constants.RegionSize;
623 List<RegionData> rdatas = m_Database.Get(xminSnap, yminSnap, xmaxSnap, ymaxSnap, scopeID);
624 List<GridRegion> rinfos =
new List<GridRegion>();
626 rinfos.Add(RegionData2RegionInfo(rdata));
633 #region Data structure conversions
639 rdata.
posY = (
int)rinfo.RegionLocY;
640 rdata.sizeX = rinfo.RegionSizeX;
641 rdata.sizeY = rinfo.RegionSizeY;
642 rdata.RegionID = rinfo.RegionID;
643 rdata.RegionName = rinfo.RegionName;
644 rdata.Data = rinfo.ToKeyValuePairs();
645 rdata.Data[
"regionHandle"] = Utils.UIntsToLong((uint)rdata.
posX, (uint)rdata.posY);
646 rdata.Data[
"owner_uuid"] = rinfo.EstateOwner.ToString();
653 rinfo.RegionLocX = rdata.posX;
654 rinfo.RegionLocY = rdata.posY;
655 rinfo.RegionSizeX = rdata.sizeX;
656 rinfo.RegionSizeY = rdata.sizeY;
657 rinfo.RegionID = rdata.RegionID;
658 rinfo.RegionName = rdata.RegionName;
659 rinfo.ScopeID = rdata.ScopeID;
668 List<GridRegion> ret =
new List<GridRegion>();
670 List<RegionData> regions = m_Database.GetDefaultRegions(scopeID);
674 if ((Convert.ToInt32(r.
Data[
"flags"]) & (int)
OpenSim.Framework.RegionFlags.RegionOnline) != 0)
675 ret.Add(RegionData2RegionInfo(r));
678 m_log.DebugFormat(
"[GRID SERVICE]: GetDefaultRegions returning {0} regions", ret.Count);
684 List<GridRegion> ret =
new List<GridRegion>();
686 List<RegionData> regions = m_Database.GetDefaultHypergridRegions(scopeID);
690 if ((Convert.ToInt32(r.
Data[
"flags"]) & (int)
OpenSim.Framework.RegionFlags.RegionOnline) != 0)
691 ret.Add(RegionData2RegionInfo(r));
694 int hgDefaultRegionsFoundOnline = regions.Count;
698 ret.AddRange(GetDefaultRegions(scopeID));
700 int normalDefaultRegionsFoundOnline = ret.Count - hgDefaultRegionsFoundOnline;
703 "[GRID SERVICE]: GetDefaultHypergridRegions returning {0} hypergrid default and {1} normal default regions",
704 hgDefaultRegionsFoundOnline, normalDefaultRegionsFoundOnline);
711 List<GridRegion> ret =
new List<GridRegion>();
713 List<RegionData> regions = m_Database.GetFallbackRegions(scopeID, x, y);
717 if ((Convert.ToInt32(r.
Data[
"flags"]) & (int)
OpenSim.Framework.RegionFlags.RegionOnline) != 0)
718 ret.Add(RegionData2RegionInfo(r));
721 m_log.DebugFormat(
"[GRID SERVICE]: Fallback returned {0} regions", ret.Count);
727 List<GridRegion> ret =
new List<GridRegion>();
729 List<RegionData> regions = m_Database.GetHyperlinks(scopeID);
733 if ((Convert.ToInt32(r.
Data[
"flags"]) & (int)
OpenSim.Framework.RegionFlags.RegionOnline) != 0)
734 ret.Add(RegionData2RegionInfo(r));
737 m_log.DebugFormat(
"[GRID SERVICE]: Hyperlinks returned {0} regions", ret.Count);
743 RegionData region = m_Database.Get(regionID, scopeID);
747 int flags = Convert.ToInt32(region.Data[
"flags"]);
755 private void HandleDeregisterRegion(
string module,
string[] cmd)
759 MainConsole.Instance.Output(
"Usage: degregister region id <region-id>+");
763 for (
int i = 3; i < cmd.Length; i++)
765 string rawRegionUuid = cmd[i];
768 if (!UUID.TryParse(rawRegionUuid, out regionUuid))
770 MainConsole.Instance.OutputFormat(
"{0} is not a valid region uuid", rawRegionUuid);
774 GridRegion region = GetRegionByUUID(UUID.Zero, regionUuid);
778 MainConsole.Instance.OutputFormat(
"No region with UUID {0}", regionUuid);
782 if (DeregisterRegion(regionUuid))
784 MainConsole.Instance.OutputFormat(
"Deregistered {0} {1}", region.RegionName, regionUuid);
789 MainConsole.Instance.OutputFormat(
"Error deregistering {0} {1}", region.RegionName, regionUuid);
794 private void HandleShowRegions(
string module,
string[] cmd)
798 MainConsole.Instance.Output(
"Syntax: show regions");
802 List<RegionData> regions = m_Database.Get(int.MinValue, int.MinValue, int.MaxValue, int.MaxValue, UUID.Zero);
804 OutputRegionsToConsoleSummary(regions);
807 private void HandleShowGridSize(
string module,
string[] cmd)
809 List<RegionData> regions = m_Database.Get(int.MinValue, int.MinValue, int.MaxValue, int.MaxValue, UUID.Zero);
815 int flags = Convert.ToInt32(region.Data[
"flags"]);
817 if ((flags & (
int)Framework.RegionFlags.Hyperlink) == 0)
818 size += region.sizeX * region.sizeY;
821 MainConsole.Instance.Output(
"This is a very rough approximation.");
822 MainConsole.Instance.Output(
"Although it will not count regions that are actually links to others over the Hypergrid, ");
823 MainConsole.Instance.Output(
"it will count regions that are inactive but were not deregistered from the grid service");
824 MainConsole.Instance.Output(
"(e.g. simulator crashed rather than shutting down cleanly).\n");
826 MainConsole.Instance.OutputFormat(
"Grid size: {0} km squared.", size / 1000000);
829 private void HandleShowRegion(
string module,
string[] cmd)
833 MainConsole.Instance.Output(
"Syntax: show region name <region name>");
837 string regionName = cmd[3];
839 List<RegionData> regions = m_Database.Get(Util.EscapeForLike(regionName),
UUID.Zero);
840 if (regions == null || regions.Count < 1)
842 MainConsole.Instance.Output(
"No region with name {0} found", regionName);
846 OutputRegionsToConsole(regions);
849 private void HandleShowRegionAt(
string module,
string[] cmd)
853 MainConsole.Instance.Output(
"Syntax: show region at <x-coord> <y-coord>");
858 if (!uint.TryParse(cmd[3], out x))
860 MainConsole.Instance.Output(
"x-coord must be an integer");
864 if (!uint.TryParse(cmd[4], out y))
866 MainConsole.Instance.Output(
"y-coord must be an integer");
871 RegionData region = m_Database.Get((int)Util.RegionToWorldLoc(x), (int)Util.RegionToWorldLoc(y), UUID.Zero);
875 MainConsole.Instance.OutputFormat(
"No region found at {0},{1}", x, y);
879 OutputRegionToConsole(region);
882 private void OutputRegionToConsole(
RegionData r)
887 dispList.AddRow(
"Region Name", r.RegionName);
888 dispList.AddRow(
"Region ID", r.RegionID);
889 dispList.AddRow(
"Location", string.Format(
"{0},{1}", r.coordX, r.coordY));
890 dispList.AddRow(
"Size", string.Format(
"{0}x{1}", r.sizeX, r.sizeY));
891 dispList.AddRow(
"URI", r.Data[
"serverURI"]);
892 dispList.AddRow(
"Owner ID", r.Data[
"owner_uuid"]);
893 dispList.AddRow(
"Flags", flags);
895 MainConsole.Instance.Output(dispList.ToString());
898 private void OutputRegionsToConsole(List<RegionData> regions)
901 OutputRegionToConsole(r);
904 private void OutputRegionsToConsoleSummary(List<RegionData> regions)
907 dispTable.AddColumn(
"Name", 44);
908 dispTable.AddColumn(
"ID", 36);
909 dispTable.AddColumn(
"Position", 11);
910 dispTable.AddColumn(
"Size", 11);
911 dispTable.AddColumn(
"Flags", 60);
918 r.RegionID.ToString(),
920 string.Format(
"{0}x{1}", r.sizeX, r.sizeY),
924 MainConsole.Instance.Output(dispTable.ToString());
927 private int ParseFlags(
int prev,
string flags)
931 string[] parts = flags.Split(
new char[] {
',',
' '}, StringSplitOptions.RemoveEmptyEntries);
933 foreach (
string p
in parts)
939 if (p.StartsWith(
"+"))
941 val = (int)Enum.Parse(typeof(OpenSim.Framework.RegionFlags), p.Substring(1));
944 else if (p.StartsWith(
"-"))
946 val = (int)Enum.Parse(typeof(OpenSim.Framework.RegionFlags), p.Substring(1));
951 val = (int)Enum.Parse(typeof(OpenSim.Framework.RegionFlags), p);
957 MainConsole.Instance.Output(
"Error in flag specification: " + p);
964 private void HandleSetFlags(
string module,
string[] cmd)
968 MainConsole.Instance.Output(
"Syntax: set region flags <region name> <flags>");
972 List<RegionData> regions = m_Database.Get(Util.EscapeForLike(cmd[3]),
UUID.Zero);
973 if (regions == null || regions.Count < 1)
975 MainConsole.Instance.Output(
"Region not found");
981 int flags = Convert.ToInt32(r.Data[
"flags"]);
982 flags = ParseFlags(flags, cmd[4]);
983 r.Data[
"flags"] = flags.ToString();
986 MainConsole.Instance.Output(String.Format(
"Set region {0} to {1}", r.RegionName, f));
1001 return m_ExtraFeatures;
Used to generated a formatted table for the console.
int posX
The position in meters of this region.
List< GridRegion > GetNeighbours(UUID scopeID, UUID regionID)
Get information about the regions neighbouring the given co-ordinates (in meters).
const uint MaximumRegionSize
Used to generated a formatted table for the console.
int coordX
Return the x-coordinate of this region in region units.
string RegisterRegion(UUID scopeID, GridRegion regionInfos)
Register a region with the grid service.
List< GridRegion > GetDefaultRegions(UUID scopeID)
GridRegion GetRegionByName(UUID scopeID, string name)
Get information about a region which exactly matches the name given.
RegionData RegionInfo2RegionData(GridRegion rinfo)
Dictionary< string, object > GetExtraFeatures()
Gets the grid extra service URls we wish for the region to send in OpenSimExtras to dynamically refre...
List< GridRegion > GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax)
List< GridRegion > GetRegionsByName(UUID scopeID, string name, int maxNumber)
Get information about regions starting with the provided name.
GridService(IConfigSource config)
int GetRegionFlags(UUID scopeID, UUID regionID)
Get internal OpenSimulator region flags.
int posY
The position in meters of this region.
Dictionary< string, object > Data
int RegionLocX
The location of this region in meters. DANGER DANGER! Note that this name means something different i...
bool DeregisterRegion(UUID regionID)
Deregister a region with the grid service.
List< GridRegion > GetDefaultHypergridRegions(UUID scopeID)
RegionFlags
Region flags used internally by OpenSimulator to store installation specific information about region...
static ICommandConsole Instance
int RegionLocY
The location of this region in meters. DANGER DANGER! Note that this name means something different i...
List< GridRegion > GetFallbackRegions(UUID scopeID, int x, int y)
GridRegion GetHypergridRegionByName(UUID scopeID, string name)
Get a hypergrid region.
Interactive OpenSim region server
int coordY
Return the y-coordinate of this region in region units.
static HypergridLinker m_HypergridLinker
GridRegion GetRegionByUUID(UUID scopeID, UUID regionID)
GridRegion RegionData2RegionInfo(RegionData rdata)
OpenSim.Services.Interfaces.GridRegion GridRegion
GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
Get the region at the given position (in meters)
List< GridRegion > GetHyperlinks(UUID scopeID)