diff options
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Application/ConfigurationLoader.cs | 47 | ||||
-rw-r--r-- | OpenSim/Region/Application/HGCommands.cs | 60 | ||||
-rw-r--r--[-rwxr-xr-x] | OpenSim/Region/Application/OpenSim.cs | 150 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 43 |
5 files changed, 25 insertions, 276 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index 555baa4..7721cdf 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -129,7 +129,6 @@ namespace OpenSim | |||
129 | configSource.AddSwitch("Startup", "inifile"); | 129 | configSource.AddSwitch("Startup", "inifile"); |
130 | configSource.AddSwitch("Startup", "inimaster"); | 130 | configSource.AddSwitch("Startup", "inimaster"); |
131 | configSource.AddSwitch("Startup", "inidirectory"); | 131 | configSource.AddSwitch("Startup", "inidirectory"); |
132 | configSource.AddSwitch("Startup", "gridmode"); | ||
133 | configSource.AddSwitch("Startup", "physics"); | 132 | configSource.AddSwitch("Startup", "physics"); |
134 | configSource.AddSwitch("Startup", "gui"); | 133 | configSource.AddSwitch("Startup", "gui"); |
135 | configSource.AddSwitch("Startup", "console"); | 134 | configSource.AddSwitch("Startup", "console"); |
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index 21edcc5..4ca6595 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim | |||
42 | /// </summary> | 42 | /// </summary> |
43 | public class ConfigurationLoader | 43 | public class ConfigurationLoader |
44 | { | 44 | { |
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | /// <summary> | 47 | /// <summary> |
46 | /// Various Config settings the region needs to start | 48 | /// Various Config settings the region needs to start |
47 | /// Physics Engine, Mesh Engine, GridMode, PhysicsPrim allowed, Neighbor, | 49 | /// Physics Engine, Mesh Engine, GridMode, PhysicsPrim allowed, Neighbor, |
@@ -61,17 +63,6 @@ namespace OpenSim | |||
61 | protected NetworkServersInfo m_networkServersInfo; | 63 | protected NetworkServersInfo m_networkServersInfo; |
62 | 64 | ||
63 | /// <summary> | 65 | /// <summary> |
64 | /// Console logger | ||
65 | /// </summary> | ||
66 | private static readonly ILog m_log = | ||
67 | LogManager.GetLogger( | ||
68 | MethodBase.GetCurrentMethod().DeclaringType); | ||
69 | |||
70 | public ConfigurationLoader() | ||
71 | { | ||
72 | } | ||
73 | |||
74 | /// <summary> | ||
75 | /// Loads the region configuration | 66 | /// Loads the region configuration |
76 | /// </summary> | 67 | /// </summary> |
77 | /// <param name="argvSource">Parameters passed into the process when started</param> | 68 | /// <param name="argvSource">Parameters passed into the process when started</param> |
@@ -164,12 +155,12 @@ namespace OpenSim | |||
164 | m_config.Source = new IniConfigSource(); | 155 | m_config.Source = new IniConfigSource(); |
165 | m_config.Source.Merge(DefaultConfig()); | 156 | m_config.Source.Merge(DefaultConfig()); |
166 | 157 | ||
167 | m_log.Info("[CONFIG] Reading configuration settings"); | 158 | m_log.Info("[CONFIG]: Reading configuration settings"); |
168 | 159 | ||
169 | if (sources.Count == 0) | 160 | if (sources.Count == 0) |
170 | { | 161 | { |
171 | m_log.FatalFormat("[CONFIG] Could not load any configuration"); | 162 | m_log.FatalFormat("[CONFIG]: Could not load any configuration"); |
172 | m_log.FatalFormat("[CONFIG] Did you copy the OpenSim.ini.example file to OpenSim.ini?"); | 163 | m_log.FatalFormat("[CONFIG]: Did you copy the OpenSim.ini.example file to OpenSim.ini?"); |
173 | Environment.Exit(1); | 164 | Environment.Exit(1); |
174 | } | 165 | } |
175 | 166 | ||
@@ -182,13 +173,12 @@ namespace OpenSim | |||
182 | 173 | ||
183 | if (!iniFileExists) | 174 | if (!iniFileExists) |
184 | { | 175 | { |
185 | m_log.FatalFormat("[CONFIG] Could not load any configuration"); | 176 | m_log.FatalFormat("[CONFIG]: Could not load any configuration"); |
186 | m_log.FatalFormat("[CONFIG] Configuration exists, but there was an error loading it!"); | 177 | m_log.FatalFormat("[CONFIG]: Configuration exists, but there was an error loading it!"); |
187 | Environment.Exit(1); | 178 | Environment.Exit(1); |
188 | } | 179 | } |
189 | 180 | ||
190 | // Make sure command line options take precedence | 181 | // Make sure command line options take precedence |
191 | // | ||
192 | m_config.Source.Merge(argvSource); | 182 | m_config.Source.Merge(argvSource); |
193 | 183 | ||
194 | ReadConfigSettings(); | 184 | ReadConfigSettings(); |
@@ -257,20 +247,17 @@ namespace OpenSim | |||
257 | 247 | ||
258 | if (!IsUri(iniPath)) | 248 | if (!IsUri(iniPath)) |
259 | { | 249 | { |
260 | m_log.InfoFormat("[CONFIG] Reading configuration file {0}", | 250 | m_log.InfoFormat("[CONFIG]: Reading configuration file {0}", Path.GetFullPath(iniPath)); |
261 | Path.GetFullPath(iniPath)); | ||
262 | 251 | ||
263 | m_config.Source.Merge(new IniConfigSource(iniPath)); | 252 | m_config.Source.Merge(new IniConfigSource(iniPath)); |
264 | success = true; | 253 | success = true; |
265 | } | 254 | } |
266 | else | 255 | else |
267 | { | 256 | { |
268 | m_log.InfoFormat("[CONFIG] {0} is a http:// URI, fetching ...", | 257 | m_log.InfoFormat("[CONFIG]: {0} is a http:// URI, fetching ...", iniPath); |
269 | iniPath); | ||
270 | 258 | ||
271 | // The ini file path is a http URI | 259 | // The ini file path is a http URI |
272 | // Try to read it | 260 | // Try to read it |
273 | // | ||
274 | try | 261 | try |
275 | { | 262 | { |
276 | XmlReader r = XmlReader.Create(iniPath); | 263 | XmlReader r = XmlReader.Create(iniPath); |
@@ -281,7 +268,7 @@ namespace OpenSim | |||
281 | } | 268 | } |
282 | catch (Exception e) | 269 | catch (Exception e) |
283 | { | 270 | { |
284 | m_log.FatalFormat("[CONFIG] Exception reading config from URI {0}\n" + e.ToString(), iniPath); | 271 | m_log.FatalFormat("[CONFIG]: Exception reading config from URI {0}\n" + e.ToString(), iniPath); |
285 | Environment.Exit(1); | 272 | Environment.Exit(1); |
286 | } | 273 | } |
287 | } | 274 | } |
@@ -304,7 +291,6 @@ namespace OpenSim | |||
304 | 291 | ||
305 | config.Set("region_info_source", "filesystem"); | 292 | config.Set("region_info_source", "filesystem"); |
306 | 293 | ||
307 | config.Set("gridmode", false); | ||
308 | config.Set("physics", "OpenDynamicsEngine"); | 294 | config.Set("physics", "OpenDynamicsEngine"); |
309 | config.Set("meshing", "Meshmerizer"); | 295 | config.Set("meshing", "Meshmerizer"); |
310 | config.Set("physical_prim", true); | 296 | config.Set("physical_prim", true); |
@@ -342,19 +328,7 @@ namespace OpenSim | |||
342 | if (null == config) | 328 | if (null == config) |
343 | config = defaultConfig.AddConfig("Network"); | 329 | config = defaultConfig.AddConfig("Network"); |
344 | 330 | ||
345 | config.Set("default_location_x", 1000); | ||
346 | config.Set("default_location_y", 1000); | ||
347 | config.Set("http_listener_port", ConfigSettings.DefaultRegionHttpPort); | 331 | config.Set("http_listener_port", ConfigSettings.DefaultRegionHttpPort); |
348 | config.Set("remoting_listener_port", ConfigSettings.DefaultRegionRemotingPort); | ||
349 | config.Set("grid_server_url", "http://127.0.0.1:" + ConfigSettings.DefaultGridServerHttpPort.ToString()); | ||
350 | config.Set("grid_send_key", "null"); | ||
351 | config.Set("grid_recv_key", "null"); | ||
352 | config.Set("user_server_url", "http://127.0.0.1:" + ConfigSettings.DefaultUserServerHttpPort.ToString()); | ||
353 | config.Set("user_send_key", "null"); | ||
354 | config.Set("user_recv_key", "null"); | ||
355 | config.Set("asset_server_url", "http://127.0.0.1:" + ConfigSettings.DefaultAssetServerHttpPort.ToString()); | ||
356 | config.Set("inventory_server_url", "http://127.0.0.1:" + ConfigSettings.DefaultInventoryServerHttpPort.ToString()); | ||
357 | config.Set("secure_inventory_server", "true"); | ||
358 | } | 332 | } |
359 | 333 | ||
360 | return defaultConfig; | 334 | return defaultConfig; |
@@ -368,7 +342,6 @@ namespace OpenSim | |||
368 | IConfig startupConfig = m_config.Source.Configs["Startup"]; | 342 | IConfig startupConfig = m_config.Source.Configs["Startup"]; |
369 | if (startupConfig != null) | 343 | if (startupConfig != null) |
370 | { | 344 | { |
371 | m_configSettings.Standalone = !startupConfig.GetBoolean("gridmode", false); | ||
372 | m_configSettings.PhysicsEngine = startupConfig.GetString("physics"); | 345 | m_configSettings.PhysicsEngine = startupConfig.GetString("physics"); |
373 | m_configSettings.MeshEngineName = startupConfig.GetString("meshing"); | 346 | m_configSettings.MeshEngineName = startupConfig.GetString("meshing"); |
374 | m_configSettings.PhysicalPrim = startupConfig.GetBoolean("physical_prim", true); | 347 | m_configSettings.PhysicalPrim = startupConfig.GetBoolean("physical_prim", true); |
diff --git a/OpenSim/Region/Application/HGCommands.cs b/OpenSim/Region/Application/HGCommands.cs deleted file mode 100644 index 7ae161d..0000000 --- a/OpenSim/Region/Application/HGCommands.cs +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Reflection; | ||
31 | using System.Xml; | ||
32 | using log4net; | ||
33 | using Nini.Config; | ||
34 | using OpenSim.Framework; | ||
35 | using OpenSim.Framework.Communications; | ||
36 | using OpenSim.Framework.Console; | ||
37 | using OpenSim.Region.Framework; | ||
38 | using OpenSim.Region.Framework.Scenes; | ||
39 | using OpenSim.Region.Framework.Scenes.Hypergrid; | ||
40 | |||
41 | namespace OpenSim | ||
42 | { | ||
43 | public class HGCommands | ||
44 | { | ||
45 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
47 | public static Scene CreateScene(RegionInfo regionInfo, AgentCircuitManager circuitManager, CommunicationsManager m_commsManager, | ||
48 | StorageManager storageManager, ModuleLoader m_moduleLoader, ConfigSettings m_configSettings, OpenSimConfigSource m_config, string m_version) | ||
49 | { | ||
50 | HGSceneCommunicationService sceneGridService = new HGSceneCommunicationService(m_commsManager); | ||
51 | |||
52 | return | ||
53 | new HGScene( | ||
54 | regionInfo, circuitManager, m_commsManager, sceneGridService, storageManager, | ||
55 | m_moduleLoader, false, m_configSettings.PhysicalPrim, | ||
56 | m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version); | ||
57 | } | ||
58 | |||
59 | } | ||
60 | } | ||
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 05e283e..1395030 100755..100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -122,8 +122,7 @@ namespace OpenSim | |||
122 | m_log.Info("===================================================================="); | 122 | m_log.Info("===================================================================="); |
123 | m_log.Info("========================= STARTING OPENSIM ========================="); | 123 | m_log.Info("========================= STARTING OPENSIM ========================="); |
124 | m_log.Info("===================================================================="); | 124 | m_log.Info("===================================================================="); |
125 | m_log.InfoFormat("[OPENSIM MAIN]: Running in {0} mode", | 125 | m_log.InfoFormat("[OPENSIM MAIN]: Running "); |
126 | (ConfigurationSettings.Standalone ? "sandbox" : "grid")); | ||
127 | //m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString()); | 126 | //m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString()); |
128 | // http://msdn.microsoft.com/en-us/library/bb384202.aspx | 127 | // http://msdn.microsoft.com/en-us/library/bb384202.aspx |
129 | //GCSettings.LatencyMode = GCLatencyMode.Batch; | 128 | //GCSettings.LatencyMode = GCLatencyMode.Batch; |
@@ -153,6 +152,11 @@ namespace OpenSim | |||
153 | RegisterConsoleCommands(); | 152 | RegisterConsoleCommands(); |
154 | 153 | ||
155 | base.StartupSpecific(); | 154 | base.StartupSpecific(); |
155 | |||
156 | MainServer.Instance.AddStreamHandler(new OpenSim.SimStatusHandler()); | ||
157 | MainServer.Instance.AddStreamHandler(new OpenSim.XSimStatusHandler(this)); | ||
158 | if (userStatsURI != String.Empty) | ||
159 | MainServer.Instance.AddStreamHandler(new OpenSim.UXSimStatusHandler(this)); | ||
156 | 160 | ||
157 | if (m_console is RemoteConsole) | 161 | if (m_console is RemoteConsole) |
158 | { | 162 | { |
@@ -247,8 +251,9 @@ namespace OpenSim | |||
247 | "Save named prim to XML2", SavePrimsXml2); | 251 | "Save named prim to XML2", SavePrimsXml2); |
248 | 252 | ||
249 | m_console.Commands.AddCommand("region", false, "load oar", | 253 | m_console.Commands.AddCommand("region", false, "load oar", |
250 | "load oar [--merge] <oar name>", | 254 | "load oar [--merge] [--skip-assets] <oar name>", |
251 | "Load a region's data from OAR archive", LoadOar); | 255 | "Load a region's data from OAR archive. --merge will merge the oar with the existing scene. --skip-assets will load the oar but ignore the assets it contains", |
256 | LoadOar); | ||
252 | 257 | ||
253 | m_console.Commands.AddCommand("region", false, "save oar", | 258 | m_console.Commands.AddCommand("region", false, "save oar", |
254 | "save oar <oar name>", | 259 | "save oar <oar name>", |
@@ -350,25 +355,6 @@ namespace OpenSim | |||
350 | "kill uuid <UUID>", | 355 | "kill uuid <UUID>", |
351 | "Kill an object by UUID", KillUUID); | 356 | "Kill an object by UUID", KillUUID); |
352 | 357 | ||
353 | if (ConfigurationSettings.Standalone) | ||
354 | { | ||
355 | m_console.Commands.AddCommand("region", false, "create user", | ||
356 | "create user [<first> [<last> [<pass> [<x> <y> [<email>]]]]]", | ||
357 | "Create a new user", HandleCreateUser); | ||
358 | |||
359 | m_console.Commands.AddCommand("region", false, "reset user password", | ||
360 | "reset user password [<first> [<last> [<password>]]]", | ||
361 | "Reset a user password", HandleResetUserPassword); | ||
362 | } | ||
363 | |||
364 | m_console.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>", | ||
365 | "Set local coordinate to map HG regions to", RunCommand); | ||
366 | m_console.Commands.AddCommand("hypergrid", false, "link-region", | ||
367 | "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", | ||
368 | "Link a hypergrid region", RunCommand); | ||
369 | m_console.Commands.AddCommand("hypergrid", false, "unlink-region", | ||
370 | "unlink-region <local name> or <HostName>:<HttpPort> <cr>", | ||
371 | "Unlink a hypergrid region", RunCommand); | ||
372 | } | 358 | } |
373 | 359 | ||
374 | public override void ShutdownSpecific() | 360 | public override void ShutdownSpecific() |
@@ -421,7 +407,7 @@ namespace OpenSim | |||
421 | 407 | ||
422 | foreach (ScenePresence presence in agents) | 408 | foreach (ScenePresence presence in agents) |
423 | { | 409 | { |
424 | RegionInfo regionInfo = m_sceneManager.GetRegionInfo(presence.RegionHandle); | 410 | RegionInfo regionInfo = presence.Scene.RegionInfo; |
425 | 411 | ||
426 | if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) && | 412 | if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) && |
427 | presence.Lastname.ToLower().Contains(cmdparams[3].ToLower())) | 413 | presence.Lastname.ToLower().Contains(cmdparams[3].ToLower())) |
@@ -777,38 +763,6 @@ namespace OpenSim | |||
777 | } | 763 | } |
778 | 764 | ||
779 | /// <summary> | 765 | /// <summary> |
780 | /// Execute switch for some of the create commands | ||
781 | /// </summary> | ||
782 | /// <param name="args"></param> | ||
783 | private void HandleCreateUser(string module, string[] cmd) | ||
784 | { | ||
785 | if (ConfigurationSettings.Standalone) | ||
786 | { | ||
787 | CreateUser(cmd); | ||
788 | } | ||
789 | else | ||
790 | { | ||
791 | MainConsole.Instance.Output("Create user is not available in grid mode, use the user server."); | ||
792 | } | ||
793 | } | ||
794 | |||
795 | /// <summary> | ||
796 | /// Execute switch for some of the reset commands | ||
797 | /// </summary> | ||
798 | /// <param name="args"></param> | ||
799 | protected void HandleResetUserPassword(string module, string[] cmd) | ||
800 | { | ||
801 | if (ConfigurationSettings.Standalone) | ||
802 | { | ||
803 | ResetUserPassword(cmd); | ||
804 | } | ||
805 | else | ||
806 | { | ||
807 | MainConsole.Instance.Output("Reset user password is not available in grid mode, use the user-server."); | ||
808 | } | ||
809 | } | ||
810 | |||
811 | /// <summary> | ||
812 | /// Turn on some debugging values for OpenSim. | 766 | /// Turn on some debugging values for OpenSim. |
813 | /// </summary> | 767 | /// </summary> |
814 | /// <param name="args"></param> | 768 | /// <param name="args"></param> |
@@ -908,7 +862,7 @@ namespace OpenSim | |||
908 | 862 | ||
909 | foreach (ScenePresence presence in agents) | 863 | foreach (ScenePresence presence in agents) |
910 | { | 864 | { |
911 | RegionInfo regionInfo = m_sceneManager.GetRegionInfo(presence.RegionHandle); | 865 | RegionInfo regionInfo = presence.Scene.RegionInfo; |
912 | string regionName; | 866 | string regionName; |
913 | 867 | ||
914 | if (regionInfo == null) | 868 | if (regionInfo == null) |
@@ -944,7 +898,7 @@ namespace OpenSim | |||
944 | { | 898 | { |
945 | connections.AppendFormat("{0}: {1} ({2}) from {3} on circuit {4}\n", | 899 | connections.AppendFormat("{0}: {1} ({2}) from {3} on circuit {4}\n", |
946 | scene.RegionInfo.RegionName, client.Name, client.AgentId, client.RemoteEndPoint, client.CircuitCode); | 900 | scene.RegionInfo.RegionName, client.Name, client.AgentId, client.RemoteEndPoint, client.CircuitCode); |
947 | }, false | 901 | } |
948 | ); | 902 | ); |
949 | } | 903 | } |
950 | ); | 904 | ); |
@@ -1046,86 +1000,6 @@ namespace OpenSim | |||
1046 | } | 1000 | } |
1047 | 1001 | ||
1048 | /// <summary> | 1002 | /// <summary> |
1049 | /// Create a new user | ||
1050 | /// </summary> | ||
1051 | /// <param name="cmdparams">string array with parameters: firstname, lastname, password, locationX, locationY, email</param> | ||
1052 | protected void CreateUser(string[] cmdparams) | ||
1053 | { | ||
1054 | string firstName; | ||
1055 | string lastName; | ||
1056 | string password; | ||
1057 | string email; | ||
1058 | uint regX = 1000; | ||
1059 | uint regY = 1000; | ||
1060 | |||
1061 | IConfig standalone; | ||
1062 | if ((standalone = m_config.Source.Configs["StandAlone"]) != null) | ||
1063 | { | ||
1064 | regX = (uint)standalone.GetInt("default_location_x", (int)regX); | ||
1065 | regY = (uint)standalone.GetInt("default_location_y", (int)regY); | ||
1066 | } | ||
1067 | |||
1068 | |||
1069 | if (cmdparams.Length < 3) | ||
1070 | firstName = MainConsole.Instance.CmdPrompt("First name", "Default"); | ||
1071 | else firstName = cmdparams[2]; | ||
1072 | |||
1073 | if (cmdparams.Length < 4) | ||
1074 | lastName = MainConsole.Instance.CmdPrompt("Last name", "User"); | ||
1075 | else lastName = cmdparams[3]; | ||
1076 | |||
1077 | if (cmdparams.Length < 5) | ||
1078 | password = MainConsole.Instance.PasswdPrompt("Password"); | ||
1079 | else password = cmdparams[4]; | ||
1080 | |||
1081 | if (cmdparams.Length < 6) | ||
1082 | regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", regX.ToString())); | ||
1083 | else regX = Convert.ToUInt32(cmdparams[5]); | ||
1084 | |||
1085 | if (cmdparams.Length < 7) | ||
1086 | regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString())); | ||
1087 | else regY = Convert.ToUInt32(cmdparams[6]); | ||
1088 | |||
1089 | if (cmdparams.Length < 8) | ||
1090 | email = MainConsole.Instance.CmdPrompt("Email", ""); | ||
1091 | else email = cmdparams[7]; | ||
1092 | |||
1093 | if (null == m_commsManager.UserProfileCacheService.GetUserDetails(firstName, lastName)) | ||
1094 | { | ||
1095 | m_commsManager.UserAdminService.AddUser(firstName, lastName, password, email, regX, regY); | ||
1096 | } | ||
1097 | else | ||
1098 | { | ||
1099 | MainConsole.Instance.Output(string.Format("A user with the name {0} {1} already exists!", firstName, lastName)); | ||
1100 | } | ||
1101 | } | ||
1102 | |||
1103 | /// <summary> | ||
1104 | /// Reset a user password. | ||
1105 | /// </summary> | ||
1106 | /// <param name="cmdparams"></param> | ||
1107 | private void ResetUserPassword(string[] cmdparams) | ||
1108 | { | ||
1109 | string firstName; | ||
1110 | string lastName; | ||
1111 | string newPassword; | ||
1112 | |||
1113 | if (cmdparams.Length < 4) | ||
1114 | firstName = MainConsole.Instance.CmdPrompt("First name"); | ||
1115 | else firstName = cmdparams[3]; | ||
1116 | |||
1117 | if (cmdparams.Length < 5) | ||
1118 | lastName = MainConsole.Instance.CmdPrompt("Last name"); | ||
1119 | else lastName = cmdparams[4]; | ||
1120 | |||
1121 | if (cmdparams.Length < 6) | ||
1122 | newPassword = MainConsole.Instance.PasswdPrompt("New password"); | ||
1123 | else newPassword = cmdparams[5]; | ||
1124 | |||
1125 | m_commsManager.UserAdminService.ResetUserPassword(firstName, lastName, newPassword); | ||
1126 | } | ||
1127 | |||
1128 | /// <summary> | ||
1129 | /// Use XML2 format to serialize data to a file | 1003 | /// Use XML2 format to serialize data to a file |
1130 | /// </summary> | 1004 | /// </summary> |
1131 | /// <param name="module"></param> | 1005 | /// <param name="module"></param> |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index f3aaa76..831269c 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -36,8 +36,7 @@ using Nini.Config; | |||
36 | using OpenMetaverse; | 36 | using OpenMetaverse; |
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Framework.Communications; | 38 | using OpenSim.Framework.Communications; |
39 | using OpenSim.Framework.Communications.Services; | 39 | |
40 | using OpenSim.Framework.Communications.Cache; | ||
41 | using OpenSim.Framework.Console; | 40 | using OpenSim.Framework.Console; |
42 | using OpenSim.Framework.Servers; | 41 | using OpenSim.Framework.Servers; |
43 | using OpenSim.Framework.Servers.HttpServer; | 42 | using OpenSim.Framework.Servers.HttpServer; |
@@ -85,8 +84,6 @@ namespace OpenSim | |||
85 | 84 | ||
86 | protected ConfigurationLoader m_configLoader; | 85 | protected ConfigurationLoader m_configLoader; |
87 | 86 | ||
88 | protected GridInfoService m_gridInfoService; | ||
89 | |||
90 | public ConsoleCommand CreateAccount = null; | 87 | public ConsoleCommand CreateAccount = null; |
91 | 88 | ||
92 | protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); | 89 | protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); |
@@ -600,35 +597,6 @@ namespace OpenSim | |||
600 | scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised()); | 597 | scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised()); |
601 | scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight); | 598 | scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight); |
602 | 599 | ||
603 | // TODO: Remove this cruft once MasterAvatar is fully deprecated | ||
604 | //Master Avatar Setup | ||
605 | UserProfileData masterAvatar; | ||
606 | if (scene.RegionInfo.MasterAvatarAssignedUUID == UUID.Zero) | ||
607 | { | ||
608 | masterAvatar = | ||
609 | m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarFirstName, | ||
610 | scene.RegionInfo.MasterAvatarLastName, | ||
611 | scene.RegionInfo.MasterAvatarSandboxPassword); | ||
612 | } | ||
613 | else | ||
614 | { | ||
615 | masterAvatar = m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarAssignedUUID); | ||
616 | scene.RegionInfo.MasterAvatarFirstName = masterAvatar.FirstName; | ||
617 | scene.RegionInfo.MasterAvatarLastName = masterAvatar.SurName; | ||
618 | } | ||
619 | |||
620 | if (masterAvatar == null) | ||
621 | { | ||
622 | m_log.Info("[PARCEL]: No master avatar found, using null."); | ||
623 | scene.RegionInfo.MasterAvatarAssignedUUID = UUID.Zero; | ||
624 | } | ||
625 | else | ||
626 | { | ||
627 | m_log.InfoFormat("[PARCEL]: Found master avatar {0} {1} [" + masterAvatar.ID.ToString() + "]", | ||
628 | scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName); | ||
629 | scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.ID; | ||
630 | } | ||
631 | |||
632 | return scene; | 600 | return scene; |
633 | } | 601 | } |
634 | 602 | ||
@@ -651,15 +619,10 @@ namespace OpenSim | |||
651 | protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, | 619 | protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, |
652 | AgentCircuitManager circuitManager) | 620 | AgentCircuitManager circuitManager) |
653 | { | 621 | { |
654 | bool hgrid = ConfigSource.Source.Configs["Startup"].GetBoolean("hypergrid", false); | 622 | SceneCommunicationService sceneGridService = new SceneCommunicationService(); |
655 | if (hgrid) | ||
656 | return HGCommands.CreateScene(regionInfo, circuitManager, m_commsManager, | ||
657 | storageManager, m_moduleLoader, m_configSettings, m_config, m_version); | ||
658 | |||
659 | SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager); | ||
660 | 623 | ||
661 | return new Scene( | 624 | return new Scene( |
662 | regionInfo, circuitManager, m_commsManager, sceneGridService, | 625 | regionInfo, circuitManager, sceneGridService, |
663 | storageManager, m_moduleLoader, false, m_configSettings.PhysicalPrim, | 626 | storageManager, m_moduleLoader, false, m_configSettings.PhysicalPrim, |
664 | m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version); | 627 | m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version); |
665 | } | 628 | } |