diff options
Diffstat (limited to 'OpenSim/ApplicationPlugins')
9 files changed, 104 insertions, 95 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index 1d63d26..74d9ae4 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs | |||
@@ -39,9 +39,12 @@ using OpenSim.Region.CoreModules.Avatar.InstantMessage; | |||
39 | using OpenSim.Region.CoreModules.Scripting.DynamicTexture; | 39 | using OpenSim.Region.CoreModules.Scripting.DynamicTexture; |
40 | using OpenSim.Region.CoreModules.Scripting.LoadImageURL; | 40 | using OpenSim.Region.CoreModules.Scripting.LoadImageURL; |
41 | using OpenSim.Region.CoreModules.Scripting.XMLRPC; | 41 | using OpenSim.Region.CoreModules.Scripting.XMLRPC; |
42 | using OpenSim.Services.Interfaces; | ||
43 | using Mono.Addins; | ||
42 | 44 | ||
43 | namespace OpenSim.ApplicationPlugins.LoadRegions | 45 | namespace OpenSim.ApplicationPlugins.LoadRegions |
44 | { | 46 | { |
47 | [Extension(Path="/OpenSim/Startup", Id="LoadRegions", NodeName="Plugin")] | ||
45 | public class LoadRegionsPlugin : IApplicationPlugin, IRegionCreator | 48 | public class LoadRegionsPlugin : IApplicationPlugin, IRegionCreator |
46 | { | 49 | { |
47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -130,7 +133,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
130 | createdScenes.Add(scene); | 133 | createdScenes.Add(scene); |
131 | 134 | ||
132 | if (changed) | 135 | if (changed) |
133 | regionsToLoad[i].EstateSettings.Save(); | 136 | m_openSim.EstateDataService.StoreEstateSettings(regionsToLoad[i].EstateSettings); |
134 | } | 137 | } |
135 | 138 | ||
136 | foreach (IScene scene in createdScenes) | 139 | foreach (IScene scene in createdScenes) |
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs b/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs index 4968e7b..6c3c3e3 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs | |||
@@ -27,16 +27,17 @@ | |||
27 | 27 | ||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
30 | using Mono.Addins; | ||
30 | 31 | ||
31 | // General information about an assembly is controlled through the following | 32 | // General information about an assembly is controlled through the following |
32 | // set of attributes. Change these attribute values to modify the information | 33 | // set of attributes. Change these attribute values to modify the information |
33 | // associated with an assembly. | 34 | // associated with an assembly. |
34 | 35 | ||
35 | [assembly : AssemblyTitle("OpenSim.Addin")] | 36 | [assembly : AssemblyTitle("OpenSim.ApplicationPlugins.LoadRegions")] |
36 | [assembly : AssemblyDescription("")] | 37 | [assembly : AssemblyDescription("")] |
37 | [assembly : AssemblyConfiguration("")] | 38 | [assembly : AssemblyConfiguration("")] |
38 | [assembly : AssemblyCompany("http://opensimulator.org")] | 39 | [assembly : AssemblyCompany("http://opensimulator.org")] |
39 | [assembly : AssemblyProduct("OpenSim.Addin")] | 40 | [assembly : AssemblyProduct("OpenSim")] |
40 | [assembly : AssemblyCopyright("Copyright © OpenSimulator.org Developers 2007-2009")] | 41 | [assembly : AssemblyCopyright("Copyright © OpenSimulator.org Developers 2007-2009")] |
41 | [assembly : AssemblyTrademark("")] | 42 | [assembly : AssemblyTrademark("")] |
42 | [assembly : AssemblyCulture("")] | 43 | [assembly : AssemblyCulture("")] |
@@ -62,4 +63,7 @@ using System.Runtime.InteropServices; | |||
62 | // by using the '*' as shown below: | 63 | // by using the '*' as shown below: |
63 | // [assembly: AssemblyVersion("0.7.6.*")] | 64 | // [assembly: AssemblyVersion("0.7.6.*")] |
64 | 65 | ||
65 | [assembly : AssemblyVersion("0.8.0.*")] | 66 | [assembly : AssemblyVersion("0.8.2.*")] |
67 | |||
68 | [assembly: Addin("OpenSim.ApplicationPlugins.LoadRegions", OpenSim.VersionInfo.VersionNumber)] | ||
69 | [assembly: AddinDependency("OpenSim", OpenSim.VersionInfo.VersionNumber)] | ||
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/Resources/LoadRegionsPlugin.addin.xml b/OpenSim/ApplicationPlugins/LoadRegions/Resources/LoadRegionsPlugin.addin.xml deleted file mode 100644 index 37222b7..0000000 --- a/OpenSim/ApplicationPlugins/LoadRegions/Resources/LoadRegionsPlugin.addin.xml +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | <Addin id="OpenSim.ApplicationPlugins.LoadRegions" version="0.1"> | ||
2 | <Runtime> | ||
3 | <Import assembly="OpenSim.ApplicationPlugins.LoadRegions.dll"/> | ||
4 | </Runtime> | ||
5 | <Dependencies> | ||
6 | <Addin id="OpenSim" version="0.5" /> | ||
7 | </Dependencies> | ||
8 | <Extension path = "/OpenSim/Startup"> | ||
9 | <Plugin id="LoadRegions" type="OpenSim.ApplicationPlugins.LoadRegions.LoadRegionsPlugin" /> | ||
10 | </Extension> | ||
11 | </Addin> | ||
diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs b/OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs index ddef158..021209f 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/Properties/AssemblyInfo.cs | |||
@@ -1,6 +1,7 @@ | |||
1 | using System.Reflection; | 1 | using System.Reflection; |
2 | using System.Runtime.CompilerServices; | 2 | using System.Runtime.CompilerServices; |
3 | using System.Runtime.InteropServices; | 3 | using System.Runtime.InteropServices; |
4 | using Mono.Addins; | ||
4 | 5 | ||
5 | // General Information about an assembly is controlled through the following | 6 | // General Information about an assembly is controlled through the following |
6 | // set of attributes. Change these attribute values to modify the information | 7 | // set of attributes. Change these attribute values to modify the information |
@@ -29,5 +30,7 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 30 | // Build Number |
30 | // Revision | 31 | // Revision |
31 | // | 32 | // |
32 | [assembly: AssemblyVersion("0.8.0.*")] | 33 | [assembly: AssemblyVersion("0.8.2.*")] |
33 | 34 | ||
35 | [assembly: Addin("OpenSim.ApplicationPlugins.RegionModulesController", OpenSim.VersionInfo.VersionNumber)] | ||
36 | [assembly: AddinDependency("OpenSim", OpenSim.VersionInfo.VersionNumber)] | ||
diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs index 510be37..17edb67 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs | |||
@@ -32,11 +32,13 @@ using log4net; | |||
32 | using Mono.Addins; | 32 | using Mono.Addins; |
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim; | 34 | using OpenSim; |
35 | using OpenSim.Framework; | ||
35 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
36 | using OpenSim.Region.Framework.Scenes; | 37 | using OpenSim.Region.Framework.Scenes; |
37 | 38 | ||
38 | namespace OpenSim.ApplicationPlugins.RegionModulesController | 39 | namespace OpenSim.ApplicationPlugins.RegionModulesController |
39 | { | 40 | { |
41 | [Extension(Path = "/OpenSim/Startup", Id = "LoadRegions", NodeName = "Plugin")] | ||
40 | public class RegionModulesControllerPlugin : IRegionModulesController, | 42 | public class RegionModulesControllerPlugin : IRegionModulesController, |
41 | IApplicationPlugin | 43 | IApplicationPlugin |
42 | { | 44 | { |
@@ -45,6 +47,12 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController | |||
45 | LogManager.GetLogger( | 47 | LogManager.GetLogger( |
46 | MethodBase.GetCurrentMethod().DeclaringType); | 48 | MethodBase.GetCurrentMethod().DeclaringType); |
47 | 49 | ||
50 | /// <summary> | ||
51 | /// Controls whether we load modules from Mono.Addins. | ||
52 | /// </summary> | ||
53 | /// <remarks>For debug purposes. Defaults to true.</remarks> | ||
54 | public bool LoadModulesFromAddins { get; set; } | ||
55 | |||
48 | // Config access | 56 | // Config access |
49 | private OpenSimBase m_openSim; | 57 | private OpenSimBase m_openSim; |
50 | 58 | ||
@@ -61,6 +69,11 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController | |||
61 | private List<ISharedRegionModule> m_sharedInstances = | 69 | private List<ISharedRegionModule> m_sharedInstances = |
62 | new List<ISharedRegionModule>(); | 70 | new List<ISharedRegionModule>(); |
63 | 71 | ||
72 | public RegionModulesControllerPlugin() | ||
73 | { | ||
74 | LoadModulesFromAddins = true; | ||
75 | } | ||
76 | |||
64 | #region IApplicationPlugin implementation | 77 | #region IApplicationPlugin implementation |
65 | 78 | ||
66 | public void Initialise (OpenSimBase openSim) | 79 | public void Initialise (OpenSimBase openSim) |
@@ -69,6 +82,9 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController | |||
69 | m_openSim.ApplicationRegistry.RegisterInterface<IRegionModulesController>(this); | 82 | m_openSim.ApplicationRegistry.RegisterInterface<IRegionModulesController>(this); |
70 | m_log.DebugFormat("[REGIONMODULES]: Initializing..."); | 83 | m_log.DebugFormat("[REGIONMODULES]: Initializing..."); |
71 | 84 | ||
85 | if (!LoadModulesFromAddins) | ||
86 | return; | ||
87 | |||
72 | // Who we are | 88 | // Who we are |
73 | string id = AddinManager.CurrentAddin.Id; | 89 | string id = AddinManager.CurrentAddin.Id; |
74 | 90 | ||
@@ -88,40 +104,8 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController | |||
88 | Dictionary<RuntimeAddin, IList<int>> loadedModules = new Dictionary<RuntimeAddin, IList<int>>(); | 104 | Dictionary<RuntimeAddin, IList<int>> loadedModules = new Dictionary<RuntimeAddin, IList<int>>(); |
89 | 105 | ||
90 | // Scan modules and load all that aren't disabled | 106 | // Scan modules and load all that aren't disabled |
91 | foreach (TypeExtensionNode node in | 107 | foreach (TypeExtensionNode node in AddinManager.GetExtensionNodes("/OpenSim/RegionModules")) |
92 | AddinManager.GetExtensionNodes("/OpenSim/RegionModules")) | 108 | AddNode(node, modulesConfig, loadedModules); |
93 | { | ||
94 | IList<int> loadedModuleData; | ||
95 | |||
96 | if (!loadedModules.ContainsKey(node.Addin)) | ||
97 | loadedModules.Add(node.Addin, new List<int> { 0, 0, 0 }); | ||
98 | |||
99 | loadedModuleData = loadedModules[node.Addin]; | ||
100 | |||
101 | if (node.Type.GetInterface(typeof(ISharedRegionModule).ToString()) != null) | ||
102 | { | ||
103 | if (CheckModuleEnabled(node, modulesConfig)) | ||
104 | { | ||
105 | m_log.DebugFormat("[REGIONMODULES]: Found shared region module {0}, class {1}", node.Id, node.Type); | ||
106 | m_sharedModules.Add(node); | ||
107 | loadedModuleData[0]++; | ||
108 | } | ||
109 | } | ||
110 | else if (node.Type.GetInterface(typeof(INonSharedRegionModule).ToString()) != null) | ||
111 | { | ||
112 | if (CheckModuleEnabled(node, modulesConfig)) | ||
113 | { | ||
114 | m_log.DebugFormat("[REGIONMODULES]: Found non-shared region module {0}, class {1}", node.Id, node.Type); | ||
115 | m_nonSharedModules.Add(node); | ||
116 | loadedModuleData[1]++; | ||
117 | } | ||
118 | } | ||
119 | else | ||
120 | { | ||
121 | m_log.WarnFormat("[REGIONMODULES]: Found unknown type of module {0}, class {1}", node.Id, node.Type); | ||
122 | loadedModuleData[2]++; | ||
123 | } | ||
124 | } | ||
125 | 109 | ||
126 | foreach (KeyValuePair<RuntimeAddin, IList<int>> loadedModuleData in loadedModules) | 110 | foreach (KeyValuePair<RuntimeAddin, IList<int>> loadedModuleData in loadedModules) |
127 | { | 111 | { |
@@ -147,6 +131,9 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController | |||
147 | // Read the config again | 131 | // Read the config again |
148 | string moduleString = | 132 | string moduleString = |
149 | modulesConfig.GetString("Setup_" + node.Id, String.Empty); | 133 | modulesConfig.GetString("Setup_" + node.Id, String.Empty); |
134 | // Test to see if we want this module | ||
135 | if (moduleString == "disabled") | ||
136 | continue; | ||
150 | 137 | ||
151 | // Get the port number, if there is one | 138 | // Get the port number, if there is one |
152 | if (moduleString != String.Empty) | 139 | if (moduleString != String.Empty) |
@@ -194,6 +181,41 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController | |||
194 | 181 | ||
195 | #region IPlugin implementation | 182 | #region IPlugin implementation |
196 | 183 | ||
184 | private void AddNode( | ||
185 | TypeExtensionNode node, IConfig modulesConfig, Dictionary<RuntimeAddin, IList<int>> loadedModules) | ||
186 | { | ||
187 | IList<int> loadedModuleData; | ||
188 | |||
189 | if (!loadedModules.ContainsKey(node.Addin)) | ||
190 | loadedModules.Add(node.Addin, new List<int> { 0, 0, 0 }); | ||
191 | |||
192 | loadedModuleData = loadedModules[node.Addin]; | ||
193 | |||
194 | if (node.Type.GetInterface(typeof(ISharedRegionModule).ToString()) != null) | ||
195 | { | ||
196 | if (CheckModuleEnabled(node, modulesConfig)) | ||
197 | { | ||
198 | m_log.DebugFormat("[REGIONMODULES]: Found shared region module {0}, class {1}", node.Id, node.Type); | ||
199 | m_sharedModules.Add(node); | ||
200 | loadedModuleData[0]++; | ||
201 | } | ||
202 | } | ||
203 | else if (node.Type.GetInterface(typeof(INonSharedRegionModule).ToString()) != null) | ||
204 | { | ||
205 | if (CheckModuleEnabled(node, modulesConfig)) | ||
206 | { | ||
207 | m_log.DebugFormat("[REGIONMODULES]: Found non-shared region module {0}, class {1}", node.Id, node.Type); | ||
208 | m_nonSharedModules.Add(node); | ||
209 | loadedModuleData[1]++; | ||
210 | } | ||
211 | } | ||
212 | else | ||
213 | { | ||
214 | m_log.WarnFormat("[REGIONMODULES]: Found unknown type of module {0}, class {1}", node.Id, node.Type); | ||
215 | loadedModuleData[2]++; | ||
216 | } | ||
217 | } | ||
218 | |||
197 | // We don't do that here | 219 | // We don't do that here |
198 | // | 220 | // |
199 | public void Initialise () | 221 | public void Initialise () |
@@ -215,6 +237,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController | |||
215 | m_sharedInstances[0].Close(); | 237 | m_sharedInstances[0].Close(); |
216 | m_sharedInstances.RemoveAt(0); | 238 | m_sharedInstances.RemoveAt(0); |
217 | } | 239 | } |
240 | |||
218 | m_sharedModules.Clear(); | 241 | m_sharedModules.Clear(); |
219 | m_nonSharedModules.Clear(); | 242 | m_nonSharedModules.Clear(); |
220 | } | 243 | } |
@@ -345,6 +368,10 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController | |||
345 | string moduleString = | 368 | string moduleString = |
346 | modulesConfig.GetString("Setup_" + node.Id, String.Empty); | 369 | modulesConfig.GetString("Setup_" + node.Id, String.Empty); |
347 | 370 | ||
371 | // We may not want to load this at all | ||
372 | if (moduleString == "disabled") | ||
373 | continue; | ||
374 | |||
348 | // Get the port number, if there is one | 375 | // Get the port number, if there is one |
349 | if (moduleString != String.Empty) | 376 | if (moduleString != String.Empty) |
350 | { | 377 | { |
diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/Resources/RegionModulesControllerPlugin.addin.xml b/OpenSim/ApplicationPlugins/RegionModulesController/Resources/RegionModulesControllerPlugin.addin.xml deleted file mode 100644 index a92713b..0000000 --- a/OpenSim/ApplicationPlugins/RegionModulesController/Resources/RegionModulesControllerPlugin.addin.xml +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | <Addin id="OpenSim.ApplicationPlugins.RegionModulesController" version="0.1"> | ||
2 | <Runtime> | ||
3 | <Import assembly="OpenSim.ApplicationPlugins.RegionModulesController.dll"/> | ||
4 | </Runtime> | ||
5 | |||
6 | <Dependencies> | ||
7 | <Addin id="OpenSim" version="0.5" /> | ||
8 | </Dependencies> | ||
9 | |||
10 | <Extension path = "/OpenSim/Startup"> | ||
11 | <Plugin id="RegionModulesController" type="OpenSim.ApplicationPlugins.RegionModulesController.RegionModulesControllerPlugin" /> | ||
12 | </Extension> | ||
13 | </Addin> | ||
diff --git a/OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs b/OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs index dd34cc8..443e323 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/Properties/AssemblyInfo.cs | |||
@@ -1,6 +1,7 @@ | |||
1 | using System.Reflection; | 1 | using System.Reflection; |
2 | using System.Runtime.CompilerServices; | 2 | using System.Runtime.CompilerServices; |
3 | using System.Runtime.InteropServices; | 3 | using System.Runtime.InteropServices; |
4 | using Mono.Addins; | ||
4 | 5 | ||
5 | // General Information about an assembly is controlled through the following | 6 | // General Information about an assembly is controlled through the following |
6 | // set of attributes. Change these attribute values to modify the information | 7 | // set of attributes. Change these attribute values to modify the information |
@@ -29,5 +30,7 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 30 | // Build Number |
30 | // Revision | 31 | // Revision |
31 | // | 32 | // |
32 | [assembly: AssemblyVersion("0.8.0.*")] | 33 | [assembly: AssemblyVersion("0.8.2.*")] |
33 | 34 | ||
35 | [assembly: Addin("OpenSim.ApplicationPlugins.RemoteController", OpenSim.VersionInfo.VersionNumber)] | ||
36 | [assembly: AddinDependency("OpenSim", OpenSim.VersionInfo.VersionNumber)] | ||
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 589307a..0c582e1 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -39,6 +39,7 @@ using log4net; | |||
39 | using Nini.Config; | 39 | using Nini.Config; |
40 | using Nwc.XmlRpc; | 40 | using Nwc.XmlRpc; |
41 | using OpenMetaverse; | 41 | using OpenMetaverse; |
42 | using Mono.Addins; | ||
42 | using OpenSim; | 43 | using OpenSim; |
43 | using OpenSim.Framework; | 44 | using OpenSim.Framework; |
44 | using OpenSim.Framework.Communications; | 45 | using OpenSim.Framework.Communications; |
@@ -56,6 +57,7 @@ using RegionInfo = OpenSim.Framework.RegionInfo; | |||
56 | 57 | ||
57 | namespace OpenSim.ApplicationPlugins.RemoteController | 58 | namespace OpenSim.ApplicationPlugins.RemoteController |
58 | { | 59 | { |
60 | [Extension(Path = "/OpenSim/Startup", Id = "LoadRegions", NodeName = "Plugin")] | ||
59 | public class RemoteAdminPlugin : IApplicationPlugin | 61 | public class RemoteAdminPlugin : IApplicationPlugin |
60 | { | 62 | { |
61 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 63 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -829,7 +831,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
829 | region.EstateSettings.EstateName = (string) requestData["estate_name"]; | 831 | region.EstateSettings.EstateName = (string) requestData["estate_name"]; |
830 | region.EstateSettings.EstateOwner = userID; | 832 | region.EstateSettings.EstateOwner = userID; |
831 | // Persistence does not seem to effect the need to save a new estate | 833 | // Persistence does not seem to effect the need to save a new estate |
832 | region.EstateSettings.Save(); | 834 | m_application.EstateDataService.StoreEstateSettings(region.EstateSettings); |
833 | 835 | ||
834 | if (!m_application.EstateDataService.LinkRegion(region.RegionID, (int) region.EstateSettings.EstateID)) | 836 | if (!m_application.EstateDataService.LinkRegion(region.RegionID, (int) region.EstateSettings.EstateID)) |
835 | throw new Exception("Failed to join estate."); | 837 | throw new Exception("Failed to join estate."); |
@@ -859,7 +861,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
859 | // If an access specification was provided, use it. | 861 | // If an access specification was provided, use it. |
860 | // Otherwise accept the default. | 862 | // Otherwise accept the default. |
861 | newScene.RegionInfo.EstateSettings.PublicAccess = GetBoolean(requestData, "public", m_publicAccess); | 863 | newScene.RegionInfo.EstateSettings.PublicAccess = GetBoolean(requestData, "public", m_publicAccess); |
862 | newScene.RegionInfo.EstateSettings.Save(); | 864 | m_application.EstateDataService.StoreEstateSettings(newScene.RegionInfo.EstateSettings); |
863 | 865 | ||
864 | // enable voice on newly created region if | 866 | // enable voice on newly created region if |
865 | // requested by either the XmlRpc request or the | 867 | // requested by either the XmlRpc request or the |
@@ -1045,7 +1047,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1045 | scene.RegionInfo.EstateSettings.PublicAccess = | 1047 | scene.RegionInfo.EstateSettings.PublicAccess = |
1046 | GetBoolean(requestData,"public", scene.RegionInfo.EstateSettings.PublicAccess); | 1048 | GetBoolean(requestData,"public", scene.RegionInfo.EstateSettings.PublicAccess); |
1047 | if (scene.RegionInfo.Persistent) | 1049 | if (scene.RegionInfo.Persistent) |
1048 | scene.RegionInfo.EstateSettings.Save(); | 1050 | m_application.EstateDataService.StoreEstateSettings(scene.RegionInfo.EstateSettings); |
1049 | 1051 | ||
1050 | if (requestData.ContainsKey("enable_voice")) | 1052 | if (requestData.ContainsKey("enable_voice")) |
1051 | { | 1053 | { |
@@ -1937,7 +1939,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1937 | scene.RegionInfo.EstateSettings.EstateAccess = new UUID[]{}; | 1939 | scene.RegionInfo.EstateSettings.EstateAccess = new UUID[]{}; |
1938 | 1940 | ||
1939 | if (scene.RegionInfo.Persistent) | 1941 | if (scene.RegionInfo.Persistent) |
1940 | scene.RegionInfo.EstateSettings.Save(); | 1942 | m_application.EstateDataService.StoreEstateSettings(scene.RegionInfo.EstateSettings); |
1941 | 1943 | ||
1942 | m_log.Info("[RADMIN]: Access List Clear Request complete"); | 1944 | m_log.Info("[RADMIN]: Access List Clear Request complete"); |
1943 | } | 1945 | } |
@@ -1983,7 +1985,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1983 | } | 1985 | } |
1984 | scene.RegionInfo.EstateSettings.EstateAccess = accessControlList.ToArray(); | 1986 | scene.RegionInfo.EstateSettings.EstateAccess = accessControlList.ToArray(); |
1985 | if (scene.RegionInfo.Persistent) | 1987 | if (scene.RegionInfo.Persistent) |
1986 | scene.RegionInfo.EstateSettings.Save(); | 1988 | m_application.EstateDataService.StoreEstateSettings(scene.RegionInfo.EstateSettings); |
1987 | } | 1989 | } |
1988 | 1990 | ||
1989 | responseData["added"] = addedUsers; | 1991 | responseData["added"] = addedUsers; |
@@ -2032,7 +2034,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2032 | } | 2034 | } |
2033 | scene.RegionInfo.EstateSettings.EstateAccess = accessControlList.ToArray(); | 2035 | scene.RegionInfo.EstateSettings.EstateAccess = accessControlList.ToArray(); |
2034 | if (scene.RegionInfo.Persistent) | 2036 | if (scene.RegionInfo.Persistent) |
2035 | scene.RegionInfo.EstateSettings.Save(); | 2037 | m_application.EstateDataService.StoreEstateSettings(scene.RegionInfo.EstateSettings); |
2036 | } | 2038 | } |
2037 | 2039 | ||
2038 | responseData["removed"] = removedUsers; | 2040 | responseData["removed"] = removedUsers; |
@@ -2475,7 +2477,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2475 | { | 2477 | { |
2476 | account.ServiceURLs = new Dictionary<string, object>(); | 2478 | account.ServiceURLs = new Dictionary<string, object>(); |
2477 | account.ServiceURLs["HomeURI"] = string.Empty; | 2479 | account.ServiceURLs["HomeURI"] = string.Empty; |
2478 | account.ServiceURLs["GatekeeperURI"] = string.Empty; | ||
2479 | account.ServiceURLs["InventoryServerURI"] = string.Empty; | 2480 | account.ServiceURLs["InventoryServerURI"] = string.Empty; |
2480 | account.ServiceURLs["AssetServerURI"] = string.Empty; | 2481 | account.ServiceURLs["AssetServerURI"] = string.Empty; |
2481 | } | 2482 | } |
@@ -2722,8 +2723,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2722 | try | 2723 | try |
2723 | { | 2724 | { |
2724 | Dictionary<UUID,UUID> inventoryMap = new Dictionary<UUID,UUID>(); | 2725 | Dictionary<UUID,UUID> inventoryMap = new Dictionary<UUID,UUID>(); |
2725 | CopyInventoryFolders(destination, source, AssetType.Clothing, inventoryMap, avatarAppearance); | 2726 | CopyInventoryFolders(destination, source, FolderType.Clothing, inventoryMap, avatarAppearance); |
2726 | CopyInventoryFolders(destination, source, AssetType.Bodypart, inventoryMap, avatarAppearance); | 2727 | CopyInventoryFolders(destination, source, FolderType.BodyPart, inventoryMap, avatarAppearance); |
2727 | 2728 | ||
2728 | AvatarWearable[] wearables = avatarAppearance.Wearables; | 2729 | AvatarWearable[] wearables = avatarAppearance.Wearables; |
2729 | 2730 | ||
@@ -2759,20 +2760,20 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2759 | IInventoryService inventoryService = m_application.SceneManager.CurrentOrFirstScene.InventoryService; | 2760 | IInventoryService inventoryService = m_application.SceneManager.CurrentOrFirstScene.InventoryService; |
2760 | 2761 | ||
2761 | // Get Clothing folder of receiver | 2762 | // Get Clothing folder of receiver |
2762 | InventoryFolderBase destinationFolder = inventoryService.GetFolderForType(destination, AssetType.Clothing); | 2763 | InventoryFolderBase destinationFolder = inventoryService.GetFolderForType(destination, FolderType.Clothing); |
2763 | 2764 | ||
2764 | if (destinationFolder == null) | 2765 | if (destinationFolder == null) |
2765 | throw new Exception("Cannot locate folder(s)"); | 2766 | throw new Exception("Cannot locate folder(s)"); |
2766 | 2767 | ||
2767 | // Missing destination folder? This should *never* be the case | 2768 | // Missing destination folder? This should *never* be the case |
2768 | if (destinationFolder.Type != (short)AssetType.Clothing) | 2769 | if (destinationFolder.Type != (short)FolderType.Clothing) |
2769 | { | 2770 | { |
2770 | destinationFolder = new InventoryFolderBase(); | 2771 | destinationFolder = new InventoryFolderBase(); |
2771 | 2772 | ||
2772 | destinationFolder.ID = UUID.Random(); | 2773 | destinationFolder.ID = UUID.Random(); |
2773 | destinationFolder.Name = "Clothing"; | 2774 | destinationFolder.Name = "Clothing"; |
2774 | destinationFolder.Owner = destination; | 2775 | destinationFolder.Owner = destination; |
2775 | destinationFolder.Type = (short)AssetType.Clothing; | 2776 | destinationFolder.Type = (short)FolderType.Clothing; |
2776 | destinationFolder.ParentID = inventoryService.GetRootFolder(destination).ID; | 2777 | destinationFolder.ParentID = inventoryService.GetRootFolder(destination).ID; |
2777 | destinationFolder.Version = 1; | 2778 | destinationFolder.Version = 1; |
2778 | inventoryService.AddFolder(destinationFolder); // store base record | 2779 | inventoryService.AddFolder(destinationFolder); // store base record |
@@ -2890,7 +2891,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2890 | /// This method is called by establishAppearance to copy inventory folders to make | 2891 | /// This method is called by establishAppearance to copy inventory folders to make |
2891 | /// copies of Clothing and Bodyparts inventory folders and attaches worn attachments | 2892 | /// copies of Clothing and Bodyparts inventory folders and attaches worn attachments |
2892 | /// </summary> | 2893 | /// </summary> |
2893 | private void CopyInventoryFolders(UUID destination, UUID source, AssetType assetType, Dictionary<UUID,UUID> inventoryMap, | 2894 | private void CopyInventoryFolders(UUID destination, UUID source, FolderType assetType, Dictionary<UUID, UUID> inventoryMap, |
2894 | AvatarAppearance avatarAppearance) | 2895 | AvatarAppearance avatarAppearance) |
2895 | { | 2896 | { |
2896 | IInventoryService inventoryService = m_application.SceneManager.CurrentOrFirstScene.InventoryService; | 2897 | IInventoryService inventoryService = m_application.SceneManager.CurrentOrFirstScene.InventoryService; |
@@ -2906,9 +2907,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2906 | { | 2907 | { |
2907 | sourceFolder = new InventoryFolderBase(); | 2908 | sourceFolder = new InventoryFolderBase(); |
2908 | sourceFolder.ID = UUID.Random(); | 2909 | sourceFolder.ID = UUID.Random(); |
2909 | if (assetType == AssetType.Clothing) { | 2910 | if (assetType == FolderType.Clothing) |
2911 | { | ||
2910 | sourceFolder.Name = "Clothing"; | 2912 | sourceFolder.Name = "Clothing"; |
2911 | } else { | 2913 | } |
2914 | else | ||
2915 | { | ||
2912 | sourceFolder.Name = "Body Parts"; | 2916 | sourceFolder.Name = "Body Parts"; |
2913 | } | 2917 | } |
2914 | sourceFolder.Owner = source; | 2918 | sourceFolder.Owner = source; |
@@ -2924,7 +2928,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2924 | { | 2928 | { |
2925 | destinationFolder = new InventoryFolderBase(); | 2929 | destinationFolder = new InventoryFolderBase(); |
2926 | destinationFolder.ID = UUID.Random(); | 2930 | destinationFolder.ID = UUID.Random(); |
2927 | if (assetType == AssetType.Clothing) | 2931 | if (assetType == FolderType.Clothing) |
2928 | { | 2932 | { |
2929 | destinationFolder.Name = "Clothing"; | 2933 | destinationFolder.Name = "Clothing"; |
2930 | } | 2934 | } |
@@ -3163,16 +3167,16 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
3163 | // m_log.DebugFormat("[RADMIN] {0} folders, {1} items in inventory", | 3167 | // m_log.DebugFormat("[RADMIN] {0} folders, {1} items in inventory", |
3164 | // uic.folders.Count, uic.items.Count); | 3168 | // uic.folders.Count, uic.items.Count); |
3165 | 3169 | ||
3166 | InventoryFolderBase clothingFolder = inventoryService.GetFolderForType(ID, AssetType.Clothing); | 3170 | InventoryFolderBase clothingFolder = inventoryService.GetFolderForType(ID, FolderType.Clothing); |
3167 | 3171 | ||
3168 | // This should *never* be the case | 3172 | // This should *never* be the case |
3169 | if (clothingFolder == null || clothingFolder.Type != (short)AssetType.Clothing) | 3173 | if (clothingFolder == null || clothingFolder.Type != (short)FolderType.Clothing) |
3170 | { | 3174 | { |
3171 | clothingFolder = new InventoryFolderBase(); | 3175 | clothingFolder = new InventoryFolderBase(); |
3172 | clothingFolder.ID = UUID.Random(); | 3176 | clothingFolder.ID = UUID.Random(); |
3173 | clothingFolder.Name = "Clothing"; | 3177 | clothingFolder.Name = "Clothing"; |
3174 | clothingFolder.Owner = ID; | 3178 | clothingFolder.Owner = ID; |
3175 | clothingFolder.Type = (short)AssetType.Clothing; | 3179 | clothingFolder.Type = (short)FolderType.Clothing; |
3176 | clothingFolder.ParentID = inventoryService.GetRootFolder(ID).ID; | 3180 | clothingFolder.ParentID = inventoryService.GetRootFolder(ID).ID; |
3177 | clothingFolder.Version = 1; | 3181 | clothingFolder.Version = 1; |
3178 | inventoryService.AddFolder(clothingFolder); // store base record | 3182 | inventoryService.AddFolder(clothingFolder); // store base record |
@@ -3218,7 +3222,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
3218 | extraFolder.ID = UUID.Random(); | 3222 | extraFolder.ID = UUID.Random(); |
3219 | extraFolder.Name = outfitName; | 3223 | extraFolder.Name = outfitName; |
3220 | extraFolder.Owner = ID; | 3224 | extraFolder.Owner = ID; |
3221 | extraFolder.Type = (short)AssetType.Clothing; | 3225 | extraFolder.Type = (short)FolderType.Clothing; |
3222 | extraFolder.Version = 1; | 3226 | extraFolder.Version = 1; |
3223 | extraFolder.ParentID = clothingFolder.ID; | 3227 | extraFolder.ParentID = clothingFolder.ID; |
3224 | inventoryService.AddFolder(extraFolder); | 3228 | inventoryService.AddFolder(extraFolder); |
diff --git a/OpenSim/ApplicationPlugins/RemoteController/Resources/RemoteAdminPlugin.addin.xml b/OpenSim/ApplicationPlugins/RemoteController/Resources/RemoteAdminPlugin.addin.xml deleted file mode 100644 index d68f2e4..0000000 --- a/OpenSim/ApplicationPlugins/RemoteController/Resources/RemoteAdminPlugin.addin.xml +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | <Addin id="OpenSim.ApplicationPlugins.RemoteController" version="0.1"> | ||
2 | <Runtime> | ||
3 | <Import assembly="OpenSim.ApplicationPlugins.RemoteController.dll"/> | ||
4 | </Runtime> | ||
5 | <Dependencies> | ||
6 | <Addin id="OpenSim" version="0.5" /> | ||
7 | </Dependencies> | ||
8 | <Extension path = "/OpenSim/Startup"> | ||
9 | <Plugin id="RemoteController" type="OpenSim.ApplicationPlugins.RemoteController.RemoteAdminPlugin" /> | ||
10 | </Extension> | ||
11 | </Addin> | ||