diff options
author | Adam Frisby | 2007-10-23 12:44:12 +0000 |
---|---|---|
committer | Adam Frisby | 2007-10-23 12:44:12 +0000 |
commit | 0c9933fd0f68187a0150f9dfefe4748256e52849 (patch) | |
tree | dadbefe0309422c2bb923a97305dc6d783896d70 /OpenSim/Region/Application/OpenSimMain.cs | |
parent | remove debug line (diff) | |
download | opensim-SC_OLD-0c9933fd0f68187a0150f9dfefe4748256e52849.zip opensim-SC_OLD-0c9933fd0f68187a0150f9dfefe4748256e52849.tar.gz opensim-SC_OLD-0c9933fd0f68187a0150f9dfefe4748256e52849.tar.bz2 opensim-SC_OLD-0c9933fd0f68187a0150f9dfefe4748256e52849.tar.xz |
* Added "create-region" console command. Syntax: create-region <name> <region.xml filename>
* Spring cleaning.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 62 |
1 files changed, 36 insertions, 26 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 9de3831..67713d3 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -218,32 +218,7 @@ namespace OpenSim | |||
218 | //Console.WriteLine("Loading region config file"); | 218 | //Console.WriteLine("Loading region config file"); |
219 | RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), configFiles[i]); | 219 | RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), configFiles[i]); |
220 | 220 | ||
221 | 221 | CreateRegion(regionInfo); | |
222 | UDPServer udpServer; | ||
223 | Scene scene = SetupScene(regionInfo, out udpServer); | ||
224 | |||
225 | m_moduleLoader.InitialiseSharedModules(scene); | ||
226 | MainLog.Instance.Verbose("Loading Region's Modules"); | ||
227 | |||
228 | m_moduleLoader.PickupModules(scene, "."); | ||
229 | m_moduleLoader.PickupModules(scene, "ScriptEngines"); | ||
230 | |||
231 | scene.SetModuleInterfaces(); | ||
232 | |||
233 | // Check if we have a script engine to load | ||
234 | //if (m_scriptEngine != null && m_scriptEngine != "") | ||
235 | //{ | ||
236 | // OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface ScriptEngine = ScriptEngineLoader.LoadScriptEngine(m_scriptEngine); | ||
237 | // scene.AddScriptEngine(ScriptEngine, m_log); | ||
238 | //} | ||
239 | |||
240 | //Server side object editing permissions checking | ||
241 | scene.PermissionsMngr.BypassPermissions = !m_permissions; | ||
242 | |||
243 | m_sceneManager.Add(scene); | ||
244 | |||
245 | m_udpServers.Add(udpServer); | ||
246 | m_regionData.Add(regionInfo); | ||
247 | } | 222 | } |
248 | 223 | ||
249 | m_moduleLoader.PostInitialise(); | 224 | m_moduleLoader.PostInitialise(); |
@@ -268,6 +243,37 @@ namespace OpenSim | |||
268 | MainLog.Instance.Status("STARTUP","Startup complete, serving " + m_udpServers.Count.ToString() + " region(s)"); | 243 | MainLog.Instance.Status("STARTUP","Startup complete, serving " + m_udpServers.Count.ToString() + " region(s)"); |
269 | } | 244 | } |
270 | 245 | ||
246 | public UDPServer CreateRegion(RegionInfo regionInfo) | ||
247 | { | ||
248 | UDPServer udpServer; | ||
249 | Scene scene = SetupScene(regionInfo, out udpServer); | ||
250 | |||
251 | m_moduleLoader.InitialiseSharedModules(scene); | ||
252 | MainLog.Instance.Verbose("MODULES", "Loading Region's Modules"); | ||
253 | |||
254 | m_moduleLoader.PickupModules(scene, "."); | ||
255 | m_moduleLoader.PickupModules(scene, "ScriptEngines"); | ||
256 | |||
257 | scene.SetModuleInterfaces(); | ||
258 | |||
259 | // Check if we have a script engine to load | ||
260 | //if (m_scriptEngine != null && m_scriptEngine != "") | ||
261 | //{ | ||
262 | // OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface ScriptEngine = ScriptEngineLoader.LoadScriptEngine(m_scriptEngine); | ||
263 | // scene.AddScriptEngine(ScriptEngine, m_log); | ||
264 | //} | ||
265 | |||
266 | //Server side object editing permissions checking | ||
267 | scene.PermissionsMngr.BypassPermissions = !m_permissions; | ||
268 | |||
269 | m_sceneManager.Add(scene); | ||
270 | |||
271 | m_udpServers.Add(udpServer); | ||
272 | m_regionData.Add(regionInfo); | ||
273 | |||
274 | return udpServer; | ||
275 | } | ||
276 | |||
271 | private static void CreateDefaultRegionInfoXml(string fileName) | 277 | private static void CreateDefaultRegionInfoXml(string fileName) |
272 | { | 278 | { |
273 | new RegionInfo("DEFAULT REGION CONFIG", fileName); | 279 | new RegionInfo("DEFAULT REGION CONFIG", fileName); |
@@ -549,6 +555,10 @@ namespace OpenSim | |||
549 | } | 555 | } |
550 | break; | 556 | break; |
551 | 557 | ||
558 | case "create-region": | ||
559 | CreateRegion(new RegionInfo(cmdparams[0], "Regions/" + cmdparams[1])).ServerListener(); | ||
560 | break; | ||
561 | |||
552 | case "quit": | 562 | case "quit": |
553 | case "shutdown": | 563 | case "shutdown": |
554 | Shutdown(); | 564 | Shutdown(); |