aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2007-10-23 12:44:12 +0000
committerAdam Frisby2007-10-23 12:44:12 +0000
commit0c9933fd0f68187a0150f9dfefe4748256e52849 (patch)
treedadbefe0309422c2bb923a97305dc6d783896d70
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 '')
-rw-r--r--OpenSim/Framework/General/Types/RegionInfo.cs21
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs62
-rw-r--r--OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs5
3 files changed, 57 insertions, 31 deletions
diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs
index cab6cd7..49360f8 100644
--- a/OpenSim/Framework/General/Types/RegionInfo.cs
+++ b/OpenSim/Framework/General/Types/RegionInfo.cs
@@ -131,6 +131,10 @@ namespace OpenSim.Framework.Types
131 { 131 {
132 return m_externalHostName; 132 return m_externalHostName;
133 } 133 }
134 set
135 {
136 m_externalHostName = value;
137 }
134 } 138 }
135 139
136 protected IPEndPoint m_internalEndPoint; 140 protected IPEndPoint m_internalEndPoint;
@@ -140,6 +144,10 @@ namespace OpenSim.Framework.Types
140 { 144 {
141 return m_internalEndPoint; 145 return m_internalEndPoint;
142 } 146 }
147 set
148 {
149 m_internalEndPoint = value;
150 }
143 } 151 }
144 152
145 protected uint? m_regionLocX; 153 protected uint? m_regionLocX;
@@ -149,6 +157,10 @@ namespace OpenSim.Framework.Types
149 { 157 {
150 return m_regionLocX.Value; 158 return m_regionLocX.Value;
151 } 159 }
160 set
161 {
162 m_regionLocX = value;
163 }
152 } 164 }
153 165
154 protected uint? m_regionLocY; 166 protected uint? m_regionLocY;
@@ -158,6 +170,10 @@ namespace OpenSim.Framework.Types
158 { 170 {
159 return m_regionLocY.Value; 171 return m_regionLocY.Value;
160 } 172 }
173 set
174 {
175 m_regionLocY = value;
176 }
161 } 177 }
162 178
163 public ulong RegionHandle 179 public ulong RegionHandle
@@ -211,6 +227,11 @@ namespace OpenSim.Framework.Types
211 227
212 } 228 }
213 229
230 public RegionInfo()
231 {
232
233 }
234
214 //not in use, should swap to nini though. 235 //not in use, should swap to nini though.
215 public void LoadFromNiniSource(IConfigSource source) 236 public void LoadFromNiniSource(IConfigSource source)
216 { 237 {
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