From 70de6956ff6a3d833149156b6293122ef734b73d Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 21 Feb 2010 18:56:44 -0800 Subject: Small bug fixes for making tests work. --- OpenSim/Services/GridService/GridService.cs | 30 +++++++++++++------------ OpenSim/Services/GridService/HypergridLinker.cs | 26 +++++++++++---------- 2 files changed, 30 insertions(+), 26 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 4dee7a4..1368e46 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs @@ -82,20 +82,22 @@ namespace OpenSim.Services.GridService { m_RootInstance = this; - MainConsole.Instance.Commands.AddCommand("grid", true, - "show region", - "show region ", - "Show details on a region", - String.Empty, - HandleShowRegion); - - MainConsole.Instance.Commands.AddCommand("grid", true, - "set region flags", - "set region flags ", - "Set database flags for region", - String.Empty, - HandleSetFlags); - + if (MainConsole.Instance != null) + { + MainConsole.Instance.Commands.AddCommand("grid", true, + "show region", + "show region ", + "Show details on a region", + String.Empty, + HandleShowRegion); + + MainConsole.Instance.Commands.AddCommand("grid", true, + "set region flags", + "set region flags ", + "Set database flags for region", + String.Empty, + HandleSetFlags); + } m_HypergridLinker = new HypergridLinker(m_config, this, m_Database); } } diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 18d0586..de5df9d 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs @@ -113,18 +113,20 @@ namespace OpenSim.Services.GridService m_log.DebugFormat("[HYPERGRID LINKER]: Loaded all services..."); } - - - MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", - "link-region :[:] ", - "Link a hypergrid region", RunCommand); - MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region", - "unlink-region or : ", - "Unlink a hypergrid region", RunCommand); - MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [ ] ", - "Set local coordinate to map HG regions to", RunCommand); - MainConsole.Instance.Commands.AddCommand("hypergrid", false, "show hyperlinks", "show hyperlinks ", - "List the HG regions", HandleShow); + + if (MainConsole.Instance != null) + { + MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", + "link-region :[:] ", + "Link a hypergrid region", RunCommand); + MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region", + "unlink-region or : ", + "Unlink a hypergrid region", RunCommand); + MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [ ] ", + "Set local coordinate to map HG regions to", RunCommand); + MainConsole.Instance.Commands.AddCommand("hypergrid", false, "show hyperlinks", "show hyperlinks ", + "List the HG regions", HandleShow); + } } -- cgit v1.1