diff options
author | Dr Scofield | 2008-08-21 11:04:57 +0000 |
---|---|---|
committer | Dr Scofield | 2008-08-21 11:04:57 +0000 |
commit | ff2eb24022f906ea20e673756d2b72162e707491 (patch) | |
tree | 8d28bafebf7530fd9f1ee291f3267b30fc2134bf | |
parent | fixing Rest/Inventory stuff again. changes somehow got lost locally. (diff) | |
download | opensim-SC-ff2eb24022f906ea20e673756d2b72162e707491.zip opensim-SC-ff2eb24022f906ea20e673756d2b72162e707491.tar.gz opensim-SC-ff2eb24022f906ea20e673756d2b72162e707491.tar.bz2 opensim-SC-ff2eb24022f906ea20e673756d2b72162e707491.tar.xz |
- corrects statement about {asset,user,inventory} source configuration
as those all work with MySQL (and are in fact required it seems);
adds examples as well
- adds region_file_template functionality for the create_region XmlRpc
call of RemoteAdminPlugin
- cleans up and fixes typo in UserProfileData
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 11 | ||||
-rw-r--r-- | OpenSim/Framework/UserProfileData.cs | 8 | ||||
-rw-r--r-- | bin/OpenSim.ini.example | 24 |
3 files changed, 34 insertions, 9 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index c79122c..ec28350 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -33,6 +33,7 @@ using System.Reflection; | |||
33 | using System.Timers; | 33 | using System.Timers; |
34 | using libsecondlife; | 34 | using libsecondlife; |
35 | using log4net; | 35 | using log4net; |
36 | using Nini.Config; | ||
36 | using Nwc.XmlRpc; | 37 | using Nwc.XmlRpc; |
37 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
38 | using OpenSim.Framework.Servers; | 39 | using OpenSim.Framework.Servers; |
@@ -47,6 +48,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
47 | 48 | ||
48 | private OpenSimBase m_app; | 49 | private OpenSimBase m_app; |
49 | private BaseHttpServer m_httpd; | 50 | private BaseHttpServer m_httpd; |
51 | private IConfig m_config; | ||
50 | private string requiredPassword = String.Empty; | 52 | private string requiredPassword = String.Empty; |
51 | 53 | ||
52 | // TODO: required by IPlugin, but likely not at all right | 54 | // TODO: required by IPlugin, but likely not at all right |
@@ -69,8 +71,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
69 | if (openSim.ConfigSource.Source.Configs["RemoteAdmin"] != null && | 71 | if (openSim.ConfigSource.Source.Configs["RemoteAdmin"] != null && |
70 | openSim.ConfigSource.Source.Configs["RemoteAdmin"].GetBoolean("enabled", false)) | 72 | openSim.ConfigSource.Source.Configs["RemoteAdmin"].GetBoolean("enabled", false)) |
71 | { | 73 | { |
74 | m_config = openSim.ConfigSource.Source.Configs["RemoteAdmin"]; | ||
72 | m_log.Info("[RADMIN]: Remote Admin Plugin Enabled"); | 75 | m_log.Info("[RADMIN]: Remote Admin Plugin Enabled"); |
73 | requiredPassword = openSim.ConfigSource.Source.Configs["RemoteAdmin"].GetString("access_password", String.Empty); | 76 | requiredPassword = m_config.GetString("access_password", String.Empty); |
74 | 77 | ||
75 | m_app = openSim; | 78 | m_app = openSim; |
76 | m_httpd = openSim.HttpServer; | 79 | m_httpd = openSim.HttpServer; |
@@ -436,10 +439,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
436 | if (persist) | 439 | if (persist) |
437 | { | 440 | { |
438 | string regionConfigPath = Path.Combine(Path.Combine(Util.configDir(), "Regions"), | 441 | string regionConfigPath = Path.Combine(Path.Combine(Util.configDir(), "Regions"), |
439 | String.Format("{0}x{1}-{2}.xml", | 442 | String.Format(m_config.GetString("region_file_template", "{0}x{1}-{2}.xml"), |
440 | region.RegionLocX.ToString(), | 443 | region.RegionLocX.ToString(), |
441 | region.RegionLocY.ToString(), | 444 | region.RegionLocY.ToString(), |
442 | regionID.ToString())); | 445 | regionID.ToString(), |
446 | region.InternalEndPoint.Port.ToString(), | ||
447 | region.RegionName.Replace(" ", "_").Replace(":", "_").Replace("/", "_"))); | ||
443 | m_log.DebugFormat("[RADMIN] CreateRegion: persisting region {0} to {1}", | 448 | m_log.DebugFormat("[RADMIN] CreateRegion: persisting region {0} to {1}", |
444 | region.RegionID, regionConfigPath); | 449 | region.RegionID, regionConfigPath); |
445 | region.SaveRegionToFile("dynamic region", regionConfigPath); | 450 | region.SaveRegionToFile("dynamic region", regionConfigPath); |
diff --git a/OpenSim/Framework/UserProfileData.cs b/OpenSim/Framework/UserProfileData.cs index d0b4c25..2d06148 100644 --- a/OpenSim/Framework/UserProfileData.cs +++ b/OpenSim/Framework/UserProfileData.cs | |||
@@ -145,7 +145,9 @@ namespace OpenSim.Framework | |||
145 | private LLUUID _partner; | 145 | private LLUUID _partner; |
146 | 146 | ||
147 | /// <summary> | 147 | /// <summary> |
148 | /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into | 148 | /// The regionhandle of the users preferred home region. If |
149 | /// multiple sims occupy the same spot, the grid may decide | ||
150 | /// which region the user logs into | ||
149 | /// </summary> | 151 | /// </summary> |
150 | public virtual ulong HomeRegion | 152 | public virtual ulong HomeRegion |
151 | { | 153 | { |
@@ -159,7 +161,9 @@ namespace OpenSim.Framework | |||
159 | 161 | ||
160 | private LLUUID _homeRegionID; | 162 | private LLUUID _homeRegionID; |
161 | /// <summary> | 163 | /// <summary> |
162 | /// The regionID of the users home region. This is unique; even if the position of the region changes within the grid, this will refer to the same region. | 164 | /// The regionID of the users home region. This is unique; |
165 | /// even if the position of the region changes within the | ||
166 | /// grid, this will refer to the same region. | ||
163 | /// </summary> | 167 | /// </summary> |
164 | public LLUUID HomeRegionID | 168 | public LLUUID HomeRegionID |
165 | { | 169 | { |
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 4801bfc..01633fa 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -131,18 +131,22 @@ asset_plugin = "OpenSim.Data.SQLite.dll" | |||
131 | ; asset_plugin = "OpenSim.Data.MySQL.dll" ; for mysql | 131 | ; asset_plugin = "OpenSim.Data.MySQL.dll" ; for mysql |
132 | ; asset_plugin = "OpenSim.Data.NHibernate.dll" ; for nhibernate | 132 | ; asset_plugin = "OpenSim.Data.NHibernate.dll" ; for nhibernate |
133 | 133 | ||
134 | ; the Asset DB source. This only works for sqlite and nhibernate for now | 134 | ; the Asset DB source. This only works for sqlite, mysql, and nhibernate for now |
135 | ; Asset Source SQLite Exampe | 135 | ; Asset Source SQLite example |
136 | ; asset_source = "URI=file:Asset.db,version=3" | 136 | ; asset_source = "URI=file:Asset.db,version=3" |
137 | ; Asset Source NHibernate Example (DIALECT;DRIVER;CONNECTSTRING) | 137 | ; Asset Source NHibernate example (DIALECT;DRIVER;CONNECTSTRING) |
138 | ; asset_source = "SQLiteDialect;SqliteClientDriver;URI=file:Asset.db,version=3" | 138 | ; asset_source = "SQLiteDialect;SqliteClientDriver;URI=file:Asset.db,version=3" |
139 | ; Asset Source MySQL example | ||
140 | ;asset_source = "Data Source=localhost;Database=opensim;User ID=opensim;Password=****;" | ||
139 | 141 | ||
140 | ; Inventory database provider | 142 | ; Inventory database provider |
141 | inventory_plugin = "OpenSim.Data.SQLite.dll" | 143 | inventory_plugin = "OpenSim.Data.SQLite.dll" |
142 | ; inventory_plugin = "OpenSim.Data.MySQL.dll" | 144 | ; inventory_plugin = "OpenSim.Data.MySQL.dll" |
143 | ; inventory_plugin = "OpenSim.Data.NHibernate.dll" ; for nhibernate | 145 | ; inventory_plugin = "OpenSim.Data.NHibernate.dll" ; for nhibernate |
144 | ; Inventory Source NHibernate Example (DIALECT;DRIVER;CONNECTSTRING) | 146 | ; Inventory Source NHibernate example (DIALECT;DRIVER;CONNECTSTRING) |
145 | ; inventory_source = "SQLiteDialect;SqliteClientDriver;URI=file:Inventory.db,version=3" | 147 | ; inventory_source = "SQLiteDialect;SqliteClientDriver;URI=file:Inventory.db,version=3" |
148 | ; Inventory Source MySQL example | ||
149 | ;inventory_source = "Data Source=localhost;Database=opensim;User ID=opensim;Password=****;" | ||
146 | 150 | ||
147 | 151 | ||
148 | ; User Data Database provider | 152 | ; User Data Database provider |
@@ -151,6 +155,8 @@ userDatabase_plugin = "OpenSim.Data.SQLite.dll" | |||
151 | ; userDatabase_plugin = "OpenSim.Data.NHibernate.dll" ; for nhibernate | 155 | ; userDatabase_plugin = "OpenSim.Data.NHibernate.dll" ; for nhibernate |
152 | ; User Source NHibernate Example (DIALECT;DRIVER;CONNECTSTRING) | 156 | ; User Source NHibernate Example (DIALECT;DRIVER;CONNECTSTRING) |
153 | ; user_source = "SQLiteDialect;SqliteClientDriver;URI=file:User.db,version=3" | 157 | ; user_source = "SQLiteDialect;SqliteClientDriver;URI=file:User.db,version=3" |
158 | ; User Source MySQL example | ||
159 | ;user_source = "Data Source=localhost;Database=opensim;User ID=opensim;Password=****;" | ||
154 | 160 | ||
155 | default_location_x = 1000 | 161 | default_location_x = 1000 |
156 | default_location_y = 1000 | 162 | default_location_y = 1000 |
@@ -329,6 +335,16 @@ mesh_physical_lod = 16 | |||
329 | enabled = false | 335 | enabled = false |
330 | access_password = unknown | 336 | access_password = unknown |
331 | 337 | ||
338 | ; the create_region XmlRpc call uses region_file_template to generate | ||
339 | ; the file name of newly create regions (if they are created | ||
340 | ; persistent). the parameter available are: | ||
341 | ; {0} - X location | ||
342 | ; {1} - Y location | ||
343 | ; {2} - region UUID | ||
344 | ; {3} - region port | ||
345 | ; {4} - region name with " ", ":", "/" mapped to "_" | ||
346 | |||
347 | region_file_template = "{0}x{1}-{2}.xml" | ||
332 | 348 | ||
333 | [RestPlugins] | 349 | [RestPlugins] |
334 | enabled = false | 350 | enabled = false |