aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorAdam Frisby2007-10-23 12:44:12 +0000
committerAdam Frisby2007-10-23 12:44:12 +0000
commit0c9933fd0f68187a0150f9dfefe4748256e52849 (patch)
treedadbefe0309422c2bb923a97305dc6d783896d70 /OpenSim/Region
parentremove debug line (diff)
downloadopensim-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 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs62
-rw-r--r--OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs5
2 files changed, 36 insertions, 31 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();
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
index 95772df..c69200a 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
@@ -331,11 +331,6 @@ namespace OpenSim.DataStore.MonoSqlite
331 createCol(terrain, "Revision", typeof(System.Int32)); 331 createCol(terrain, "Revision", typeof(System.Int32));
332 createCol(terrain, "Heightfield", typeof(System.Byte[])); 332 createCol(terrain, "Heightfield", typeof(System.Byte[]));
333 333
334 /* // Attempting to work out requirements to get SQLite to actually *save* the data.
335 createCol(terrain, "PrIndex", typeof(System.String));
336 terrain.PrimaryKey = new DataColumn[] { terrain.Columns["PrIndex"] };
337 */
338
339 return terrain; 334 return terrain;
340 } 335 }
341 336