From 5bff7415441d2e3943229a759ef963d45e165ceb Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sun, 4 Nov 2012 11:13:03 +0000 Subject: [PATCH 01/71] marking IRegionModule interface as obsolete via System.ObsoleteAttribute, intentionally triggering a bunch of warnings in compiler output in hopes of encouraging other developers to refactor built-in modules when they have free time. --- OpenSim/Region/Framework/Interfaces/IRegionModule.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenSim/Region/Framework/Interfaces/IRegionModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionModule.cs index 2bb0c75b99..aacc26b001 100644 --- a/OpenSim/Region/Framework/Interfaces/IRegionModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IRegionModule.cs @@ -24,6 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using Nini.Config; using OpenSim.Region.Framework.Scenes; @@ -33,6 +34,7 @@ namespace OpenSim.Region.Framework.Interfaces /// /// DEPRECATED! Use INonSharedRegionModule or ISharedRegionModule instead /// + [Obsolete("Use INonSharedRegionModule or ISharedRegionModule instead", false)] public interface IRegionModule { /// From 64c80aec644b2fede1b08ad360f54a658d4849cb Mon Sep 17 00:00:00 2001 From: PixelTomsen Date: Mon, 5 Nov 2012 19:16:46 +0100 Subject: [PATCH 02/71] llSetLinkCamera implementation wiki: http://wiki.secondlife.com/wiki/LlSetLinkCamera mantis: http://opensimulator.org/mantis/view.php?id=6397 --- .../Shared/Api/Implementation/LSL_Api.cs | 30 +++++++++++++++++++ .../Shared/Api/Interface/ILSL_Api.cs | 1 + .../Shared/Api/Runtime/LSL_Stub.cs | 5 ++++ 3 files changed, 36 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index be030af5db..acf4d8c1d2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -6637,6 +6637,36 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.SetCameraAtOffset(offset); } + public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at) + { + m_host.AddScriptLPS(1); + + if (link == ScriptBaseClass.LINK_SET || + link == ScriptBaseClass.LINK_ALL_CHILDREN || + link == ScriptBaseClass.LINK_ALL_OTHERS) return; + + SceneObjectPart part = null; + + switch (link) + { + case ScriptBaseClass.LINK_ROOT: + part = m_host.ParentGroup.RootPart; + break; + case ScriptBaseClass.LINK_THIS: + part = m_host; + break; + default: + part = m_host.ParentGroup.GetLinkNumPart(link); + break; + } + + if (null != part) + { + part.SetCameraEyeOffset(eye); + part.SetCameraAtOffset(at); + } + } + public LSL_String llDumpList2String(LSL_List src, string seperator) { m_host.AddScriptLPS(1); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index e97ff9d1ba..98f8be7175 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs @@ -333,6 +333,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces void llSetBuoyancy(double buoyancy); void llSetCameraAtOffset(LSL_Vector offset); void llSetCameraEyeOffset(LSL_Vector offset); + void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at); void llSetCameraParams(LSL_List rules); void llSetClickAction(int action); void llSetColor(LSL_Vector color, int face); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index c4578804c2..36803a4ae2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs @@ -1498,6 +1498,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase m_LSL_Functions.llSetCameraEyeOffset(offset); } + public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at) + { + m_LSL_Functions.llSetLinkCamera(link, eye, at); + } + public void llSetCameraParams(LSL_List rules) { m_LSL_Functions.llSetCameraParams(rules); From 7dfd1468cc53b622257808fa445519244b1b0716 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 9 Nov 2012 15:38:10 -0800 Subject: [PATCH 03/71] Converted the SunModule to the new region module interface. (39 to go...) --- .../Region/CoreModules/World/Sun/SunModule.cs | 48 +++++++++++-------- .../Region/Framework/Interfaces/ISunModule.cs | 2 +- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs index 9a954b8d51..df025bfbb5 100644 --- a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs +++ b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs @@ -267,13 +267,12 @@ namespace OpenSim.Region.CoreModules return GetCurrentSunHour() + 6.0f; } - #region IRegion Methods + #region INonSharedRegion Methods // Called immediately after the module is loaded for a given region // i.e. Immediately after instance creation. - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { - m_scene = scene; m_frame = 0; // This one puts an entry in the main help screen @@ -358,15 +357,6 @@ namespace OpenSim.Region.CoreModules HorizonShift = m_HorizonShift; // Z axis translation // HoursToRadians = (SunCycle/24)*VWTimeRatio; - // Insert our event handling hooks - - scene.EventManager.OnFrame += SunUpdate; - scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; - scene.EventManager.OnEstateToolsSunUpdate += EstateToolsSunUpdate; - scene.EventManager.OnGetCurrentTimeAsLindenSunHour += GetCurrentTimeAsLindenSunHour; - - ready = true; - m_log.Debug("[SUN]: Mode is " + m_RegionMode); m_log.Debug("[SUN]: Initialization completed. Day is " + SecondsPerSunCycle + " seconds, and year is " + m_YearLengthDays + " days"); m_log.Debug("[SUN]: Axis offset is " + m_HorizonShift); @@ -376,14 +366,29 @@ namespace OpenSim.Region.CoreModules break; } - scene.RegisterModuleInterface(this); } - public void PostInitialise() + public Type ReplaceableInterface { + get { return null; } } - public void Close() + public void AddRegion(Scene scene) + { + m_scene = scene; + // Insert our event handling hooks + + scene.EventManager.OnFrame += SunUpdate; + scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; + scene.EventManager.OnEstateToolsSunUpdate += EstateToolsSunUpdate; + scene.EventManager.OnGetCurrentTimeAsLindenSunHour += GetCurrentTimeAsLindenSunHour; + + scene.RegisterModuleInterface(this); + + ready = true; + } + + public void RemoveRegion(Scene scene) { ready = false; @@ -394,16 +399,19 @@ namespace OpenSim.Region.CoreModules m_scene.EventManager.OnGetCurrentTimeAsLindenSunHour -= GetCurrentTimeAsLindenSunHour; } + public void RegionLoaded(Scene scene) + { + } + + public void Close() + { + } + public string Name { get { return "SunModule"; } } - public bool IsSharedModule - { - get { return false; } - } - #endregion #region EventManager Events diff --git a/OpenSim/Region/Framework/Interfaces/ISunModule.cs b/OpenSim/Region/Framework/Interfaces/ISunModule.cs index 819ae11d3c..8231716f2e 100644 --- a/OpenSim/Region/Framework/Interfaces/ISunModule.cs +++ b/OpenSim/Region/Framework/Interfaces/ISunModule.cs @@ -29,7 +29,7 @@ using OpenMetaverse; namespace OpenSim.Region.Framework.Interfaces { - public interface ISunModule : IRegionModule + public interface ISunModule : INonSharedRegionModule { double GetSunParameter(string param); From 19aab3e6fea9c14d28c952c4e1f38919a4cc4363 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 9 Nov 2012 16:28:30 -0800 Subject: [PATCH 04/71] Converted the WindModule to the new region module interface (38 to go). Also added both the WindModule and the SunModule to the Plugin manifest. --- .../Resources/CoreModulePlugin.addin.xml | 2 + .../Region/CoreModules/World/Sun/SunModule.cs | 16 +- .../CoreModules/World/Wind/WindModule.cs | 212 +++++++++--------- .../Framework/Interfaces/IWindModule.cs | 2 +- 4 files changed, 122 insertions(+), 110 deletions(-) diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index 6c73d911e0..2ddd0b69a4 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -38,6 +38,8 @@ + + diff --git a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs index df025bfbb5..bdbf273de4 100644 --- a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs +++ b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs @@ -278,14 +278,6 @@ namespace OpenSim.Region.CoreModules // This one puts an entry in the main help screen // m_scene.AddCommand("Regions", this, "sun", "sun", "Usage: sun [param] [value] - Get or Update Sun module paramater", null); - // This one enables the ability to type just "sun" without any parameters -// m_scene.AddCommand("Regions", this, "sun", "", "", HandleSunConsoleCommand); - foreach (KeyValuePair kvp in GetParamList()) - { - string sunCommand = string.Format("sun {0}", kvp.Key); - m_scene.AddCommand("Regions", this, sunCommand, string.Format("{0} []", sunCommand), kvp.Value, "", HandleSunConsoleCommand); - } - TimeZone local = TimeZone.CurrentTimeZone; TicksUTCOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks; m_log.DebugFormat("[SUN]: localtime offset is {0}", TicksUTCOffset); @@ -385,6 +377,14 @@ namespace OpenSim.Region.CoreModules scene.RegisterModuleInterface(this); + // This one enables the ability to type just "sun" without any parameters + // m_scene.AddCommand("Regions", this, "sun", "", "", HandleSunConsoleCommand); + foreach (KeyValuePair kvp in GetParamList()) + { + string sunCommand = string.Format("sun {0}", kvp.Key); + m_scene.AddCommand("Regions", this, sunCommand, string.Format("{0} []", sunCommand), kvp.Value, "", HandleSunConsoleCommand); + } + ready = true; } diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index 7b6fbda952..0186a41d01 100644 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs @@ -52,31 +52,31 @@ namespace OpenSim.Region.CoreModules private bool m_ready = false; private bool m_enabled = false; - + private IConfig m_windConfig; private IWindModelPlugin m_activeWindPlugin = null; - private const string m_dWindPluginName = "SimpleRandomWind"; + private string m_dWindPluginName = "SimpleRandomWind"; private Dictionary m_availableWindPlugins = new Dictionary(); // Simplified windSpeeds based on the fact that the client protocal tracks at a resolution of 16m private Vector2[] windSpeeds = new Vector2[16 * 16]; - #region IRegion Methods + #region INonSharedRegionModule Methods - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { - IConfig windConfig = config.Configs["Wind"]; + m_windConfig = config.Configs["Wind"]; string desiredWindPlugin = m_dWindPluginName; - if (windConfig != null) + if (m_windConfig != null) { - m_enabled = windConfig.GetBoolean("enabled", true); + m_enabled = m_windConfig.GetBoolean("enabled", true); - m_frameUpdateRate = windConfig.GetInt("wind_update_rate", 150); + m_frameUpdateRate = m_windConfig.GetInt("wind_update_rate", 150); // Determine which wind model plugin is desired - if (windConfig.Contains("wind_plugin")) + if (m_windConfig.Contains("wind_plugin")) { - desiredWindPlugin = windConfig.GetString("wind_plugin"); + m_dWindPluginName = m_windConfig.GetString("wind_plugin", m_dWindPluginName); } } @@ -84,104 +84,111 @@ namespace OpenSim.Region.CoreModules { m_log.InfoFormat("[WIND] Enabled with an update rate of {0} frames.", m_frameUpdateRate); - m_scene = scene; - m_frame = 0; - - // Register all the Wind Model Plug-ins - foreach (IWindModelPlugin windPlugin in AddinManager.GetExtensionObjects("/OpenSim/WindModule", false)) - { - m_log.InfoFormat("[WIND] Found Plugin: {0}", windPlugin.Name); - m_availableWindPlugins.Add(windPlugin.Name, windPlugin); - } - - // Check for desired plugin - if (m_availableWindPlugins.ContainsKey(desiredWindPlugin)) - { - m_activeWindPlugin = m_availableWindPlugins[desiredWindPlugin]; - - m_log.InfoFormat("[WIND] {0} plugin found, initializing.", desiredWindPlugin); - - if (windConfig != null) - { - m_activeWindPlugin.Initialise(); - m_activeWindPlugin.WindConfig(m_scene, windConfig); - } - } - - - // if the plug-in wasn't found, default to no wind. - if (m_activeWindPlugin == null) - { - m_log.ErrorFormat("[WIND] Could not find specified wind plug-in: {0}", desiredWindPlugin); - m_log.ErrorFormat("[WIND] Defaulting to no wind."); - } - - // This one puts an entry in the main help screen -// m_scene.AddCommand("Regions", this, "wind", "wind", "Usage: wind [value] - Get or Update Wind paramaters", null); - - // This one enables the ability to type just the base command without any parameters -// m_scene.AddCommand("Regions", this, "wind", "", "", HandleConsoleCommand); - - // Get a list of the parameters for each plugin - foreach (IWindModelPlugin windPlugin in m_availableWindPlugins.Values) - { -// m_scene.AddCommand("Regions", this, String.Format("wind base wind_plugin {0}", windPlugin.Name), String.Format("{0} - {1}", windPlugin.Name, windPlugin.Description), "", HandleConsoleBaseCommand); - m_scene.AddCommand( - "Regions", - this, - "wind base wind_update_rate", - "wind base wind_update_rate []", - "Get or set the wind update rate.", - "", - HandleConsoleBaseCommand); - - foreach (KeyValuePair kvp in windPlugin.WindParams()) - { - string windCommand = String.Format("wind {0} {1}", windPlugin.Name, kvp.Key); - m_scene.AddCommand("Regions", this, windCommand, string.Format("{0} []", windCommand), kvp.Value, "", HandleConsoleParamCommand); - } - } - - // Register event handlers for when Avatars enter the region, and frame ticks - m_scene.EventManager.OnFrame += WindUpdate; - m_scene.EventManager.OnMakeRootAgent += OnAgentEnteredRegion; - - // Register the wind module - m_scene.RegisterModuleInterface(this); - - // Generate initial wind values - GenWindPos(); - - // Mark Module Ready for duty - m_ready = true; - } } - public void PostInitialise() + public void AddRegion(Scene scene) { + if (!m_enabled) + return; + + m_scene = scene; + m_frame = 0; + + // Register all the Wind Model Plug-ins + foreach (IWindModelPlugin windPlugin in AddinManager.GetExtensionObjects("/OpenSim/WindModule", false)) + { + m_log.InfoFormat("[WIND] Found Plugin: {0}", windPlugin.Name); + m_availableWindPlugins.Add(windPlugin.Name, windPlugin); + } + + // Check for desired plugin + if (m_availableWindPlugins.ContainsKey(m_dWindPluginName)) + { + m_activeWindPlugin = m_availableWindPlugins[m_dWindPluginName]; + + m_log.InfoFormat("[WIND] {0} plugin found, initializing.", m_dWindPluginName); + + if (m_windConfig != null) + { + m_activeWindPlugin.Initialise(); + m_activeWindPlugin.WindConfig(m_scene, m_windConfig); + } + } + + + // if the plug-in wasn't found, default to no wind. + if (m_activeWindPlugin == null) + { + m_log.ErrorFormat("[WIND] Could not find specified wind plug-in: {0}", m_dWindPluginName); + m_log.ErrorFormat("[WIND] Defaulting to no wind."); + } + + // This one puts an entry in the main help screen + // m_scene.AddCommand("Regions", this, "wind", "wind", "Usage: wind [value] - Get or Update Wind paramaters", null); + + // This one enables the ability to type just the base command without any parameters + // m_scene.AddCommand("Regions", this, "wind", "", "", HandleConsoleCommand); + + // Get a list of the parameters for each plugin + foreach (IWindModelPlugin windPlugin in m_availableWindPlugins.Values) + { + // m_scene.AddCommand("Regions", this, String.Format("wind base wind_plugin {0}", windPlugin.Name), String.Format("{0} - {1}", windPlugin.Name, windPlugin.Description), "", HandleConsoleBaseCommand); + m_scene.AddCommand( + "Regions", + this, + "wind base wind_update_rate", + "wind base wind_update_rate []", + "Get or set the wind update rate.", + "", + HandleConsoleBaseCommand); + + foreach (KeyValuePair kvp in windPlugin.WindParams()) + { + string windCommand = String.Format("wind {0} {1}", windPlugin.Name, kvp.Key); + m_scene.AddCommand("Regions", this, windCommand, string.Format("{0} []", windCommand), kvp.Value, "", HandleConsoleParamCommand); + } + } + + // Register event handlers for when Avatars enter the region, and frame ticks + m_scene.EventManager.OnFrame += WindUpdate; + m_scene.EventManager.OnMakeRootAgent += OnAgentEnteredRegion; + + // Register the wind module + m_scene.RegisterModuleInterface(this); + + // Generate initial wind values + GenWindPos(); + + // Mark Module Ready for duty + m_ready = true; + } + + public void RemoveRegion(Scene scene) + { + if (!m_enabled) + return; + + m_ready = false; + + // REVIEW: If a region module is closed, is there a possibility that it'll re-open/initialize ?? + m_activeWindPlugin = null; + foreach (IWindModelPlugin windPlugin in m_availableWindPlugins.Values) + { + windPlugin.Dispose(); + } + + m_availableWindPlugins.Clear(); + + // Remove our hooks + m_scene.EventManager.OnFrame -= WindUpdate; + m_scene.EventManager.OnMakeRootAgent -= OnAgentEnteredRegion; + } public void Close() { - if (m_enabled) - { - m_ready = false; - - // REVIEW: If a region module is closed, is there a possibility that it'll re-open/initialize ?? - m_activeWindPlugin = null; - foreach (IWindModelPlugin windPlugin in m_availableWindPlugins.Values) - { - windPlugin.Dispose(); - } - - m_availableWindPlugins.Clear(); - - // Remove our hooks - m_scene.EventManager.OnFrame -= WindUpdate; - m_scene.EventManager.OnMakeRootAgent -= OnAgentEnteredRegion; - } } public string Name @@ -189,11 +196,14 @@ namespace OpenSim.Region.CoreModules get { return "WindModule"; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return false; } + get { return null; } } + public void RegionLoaded(Scene scene) + { + } #endregion diff --git a/OpenSim/Region/Framework/Interfaces/IWindModule.cs b/OpenSim/Region/Framework/Interfaces/IWindModule.cs index 10ecc325c8..4a26a717db 100644 --- a/OpenSim/Region/Framework/Interfaces/IWindModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IWindModule.cs @@ -29,7 +29,7 @@ using OpenMetaverse; namespace OpenSim.Region.Framework.Interfaces { - public interface IWindModule : IRegionModule + public interface IWindModule : INonSharedRegionModule { /// From 2540132a5401b567bebd2e11059ec8b65e02972e Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 9 Nov 2012 16:40:55 -0800 Subject: [PATCH 05/71] MapSearchModule also converted to new region module interface (37 to go). --- .../Resources/CoreModulePlugin.addin.xml | 1 + .../World/WorldMap/MapSearchModule.cs | 27 +++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index 2ddd0b69a4..8fc70e2ba0 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -40,6 +40,7 @@ + diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index f37dd943ba..7de1bb2cf7 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs @@ -24,6 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Collections.Generic; using System.Reflection; using log4net; @@ -37,7 +38,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.World.WorldMap { - public class MapSearchModule : IRegionModule + public class MapSearchModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -45,8 +46,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap Scene m_scene = null; // only need one for communication with GridService List m_scenes = new List(); - #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource source) + #region ISharedRegionModule Members + public void Initialise(IConfigSource source) + { + } + + public void AddRegion(Scene scene) { if (m_scene == null) { @@ -57,6 +62,15 @@ namespace OpenSim.Region.CoreModules.World.WorldMap scene.EventManager.OnNewClient += OnNewClient; } + public void RemoveRegion(Scene scene) + { + m_scenes.Remove(scene); + if (m_scene == scene && m_scenes.Count > 0) + m_scene = m_scenes[0]; + + scene.EventManager.OnNewClient -= OnNewClient; + } + public void PostInitialise() { } @@ -72,11 +86,14 @@ namespace OpenSim.Region.CoreModules.World.WorldMap get { return "MapSearchModule"; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return true; } + get { return null; } } + public void RegionLoaded(Scene scene) + { + } #endregion private void OnNewClient(IClientAPI client) From 4f9825961743684dfb76827e2353497182a83d8a Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 9 Nov 2012 20:39:55 -0800 Subject: [PATCH 06/71] Minor improvement in the MapSearchModule. Stop blocking the client thread if the search takes too long. --- .../World/WorldMap/MapSearchModule.cs | 74 ++++++++++++++----- 1 file changed, 55 insertions(+), 19 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index 7de1bb2cf7..8f1a35ded9 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs @@ -45,6 +45,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap Scene m_scene = null; // only need one for communication with GridService List m_scenes = new List(); + List m_Clients; #region ISharedRegionModule Members public void Initialise(IConfigSource source) @@ -60,6 +61,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap m_scenes.Add(scene); scene.EventManager.OnNewClient += OnNewClient; + m_Clients = new List(); } public void RemoveRegion(Scene scene) @@ -98,17 +100,51 @@ namespace OpenSim.Region.CoreModules.World.WorldMap private void OnNewClient(IClientAPI client) { - client.OnMapNameRequest += OnMapNameRequest; + client.OnMapNameRequest += OnMapNameRequestHandler; + } + + private void OnMapNameRequestHandler(IClientAPI remoteClient, string mapName, uint flags) + { + lock (m_Clients) + { + if (m_Clients.Contains(remoteClient.AgentId)) + return; + + m_Clients.Add(remoteClient.AgentId); + } + + Util.FireAndForget(delegate + { + try + { + OnMapNameRequest(remoteClient, mapName, flags); + } + finally + { + lock (m_Clients) + m_Clients.Remove(remoteClient.AgentId); + } + }); + } private void OnMapNameRequest(IClientAPI remoteClient, string mapName, uint flags) { - if (mapName.Length < 3) + List blocks = new List(); + MapBlockData data; + if (mapName.Length < 3 || (mapName.EndsWith("#") && mapName.Length < 4)) { + // final block, closing the search result + AddFinalBlock(blocks); + + // flags are agent flags sent from the viewer. + // they have different values depending on different viewers, apparently + remoteClient.SendMapBlock(blocks, flags); remoteClient.SendAlertMessage("Use a search string with at least 3 characters"); return; } + //m_log.DebugFormat("MAP NAME=({0})", mapName); // Hack to get around the fact that ll V3 now drops the port from the @@ -129,13 +165,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap // try to fetch from GridServer List regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); - if (regionInfos.Count == 0) - remoteClient.SendAlertMessage("Hyperlink could not be established."); m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions. Flags={2}", mapName, regionInfos.Count, flags); - List blocks = new List(); - - MapBlockData data; if (regionInfos.Count > 0) { foreach (GridRegion info in regionInfos) @@ -162,16 +193,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap } // final block, closing the search result - data = new MapBlockData(); - data.Agents = 0; - data.Access = 255; - data.MapImageId = UUID.Zero; - data.Name = ""; // mapName; - data.RegionFlags = 0; - data.WaterHeight = 0; // not used - data.X = 0; - data.Y = 0; - blocks.Add(data); + AddFinalBlock(blocks); // flags are agent flags sent from the viewer. // they have different values depending on different viewers, apparently @@ -183,12 +205,26 @@ namespace OpenSim.Region.CoreModules.World.WorldMap if (flags == 2) { if (regionInfos.Count == 0) - remoteClient.SendAgentAlertMessage("No regions found with that name.", true); + remoteClient.SendAlertMessage("No regions found with that name."); else if (regionInfos.Count == 1) - remoteClient.SendAgentAlertMessage("Region found!", false); + remoteClient.SendAlertMessage("Region found!"); } } + private void AddFinalBlock(List blocks) + { + // final block, closing the search result + MapBlockData data = new MapBlockData(); + data.Agents = 0; + data.Access = 255; + data.MapImageId = UUID.Zero; + data.Name = ""; + data.RegionFlags = 0; + data.WaterHeight = 0; // not used + data.X = 0; + data.Y = 0; + blocks.Add(data); + } // private Scene GetClientScene(IClientAPI client) // { // foreach (Scene s in m_scenes) From c94240ba5b0f3ca77abc42245b3f2c6d0af9a138 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 10 Nov 2012 05:43:57 +0000 Subject: [PATCH 07/71] Uncomment SceneObjectBasicTests.TestDeleteSceneObjectAsyncToUserInventory() and make it compile again Not currently in test suite since not yet working. Also add method doc to Scene.DeRezObjects() --- .../Framework/Scenes/Scene.Inventory.cs | 15 +++- .../Scenes/Tests/SceneObjectBasicTests.cs | 90 ++++++++++++------- 2 files changed, 70 insertions(+), 35 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index b23ddb4330..ad40d6ba02 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1909,8 +1909,19 @@ namespace OpenSim.Region.Framework.Scenes } } - public virtual void DeRezObjects(IClientAPI remoteClient, List localIDs, - UUID groupID, DeRezAction action, UUID destinationID) + /// + /// Derez one or more objects from the scene. + /// + /// + /// Won't actually remove the scene object in the case where the object is being copied to a user inventory. + /// + /// Client requesting derez + /// Local ids of root parts of objects to delete. + /// Not currently used. Here because the client passes this to us. + /// DeRezAction + /// User folder ID to place derezzed object + public virtual void DeRezObjects( + IClientAPI remoteClient, List localIDs, UUID groupID, DeRezAction action, UUID destinationID) { // First, see of we can perform the requested action and // build a list of eligible objects diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs index 3398a53fb8..5b334c6564 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs @@ -26,6 +26,7 @@ */ using System; +using System.Collections.Generic; using System.Reflection; using System.Threading; using NUnit.Framework; @@ -33,6 +34,7 @@ using OpenMetaverse; using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Region.Framework.Scenes; +using OpenSim.Services.Interfaces; using OpenSim.Tests.Common; using OpenSim.Tests.Common.Mock; @@ -42,7 +44,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests /// Basic scene object tests (create, read and delete but not update). /// [TestFixture] - public class SceneObjectBasicTests + public class SceneObjectBasicTests : OpenSimTestCase { // [TearDown] // public void TearDown() @@ -237,38 +239,60 @@ namespace OpenSim.Region.Framework.Scenes.Tests /// /// Test deleting an object asynchronously to user inventory. /// - //[Test] - //public void TestDeleteSceneObjectAsyncToUserInventory() - //{ - // TestHelper.InMethod(); - // //log4net.Config.XmlConfigurator.Configure(); - - // UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); - // string myObjectName = "Fred"; - - // TestScene scene = SceneSetupHelpers.SetupScene(); - // SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene, myObjectName); - - // Assert.That( - // scene.CommsManager.UserAdminService.AddUser( - // "Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId), - // Is.EqualTo(agentId)); - - // IClientAPI client = SceneSetupHelpers.AddRootAgent(scene, agentId); - - // CachedUserInfo userInfo = scene.CommsManager.UserProfileCacheService.GetUserDetails(agentId); - // Assert.That(userInfo, Is.Not.Null); - // Assert.That(userInfo.RootFolder, Is.Not.Null); - - // SceneSetupHelpers.DeleteSceneObjectAsync(scene, part, DeRezAction.Take, userInfo.RootFolder.ID, client); - - // // Check that we now have the taken part in our inventory - // Assert.That(myObjectName, Is.EqualTo(userInfo.RootFolder.FindItemByPath(myObjectName).Name)); - - // // Check that the taken part has actually disappeared - // SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); - // Assert.That(retrievedPart, Is.Null); - //} +// [Test] + public void TestDeleteSceneObjectAsyncToUserInventory() + { + TestHelpers.InMethod(); + TestHelpers.EnableLogging(); + + UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); + string myObjectName = "Fred"; + + TestScene scene = new SceneHelpers().SetupScene(); + + // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. + AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; + sogd.Enabled = false; + + SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, myObjectName, agentId); + +// Assert.That( +// scene.CommsManager.UserAdminService.AddUser( +// "Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId), +// Is.EqualTo(agentId)); + + UserAccount ua = UserAccountHelpers.CreateUserWithInventory(scene, agentId); + InventoryFolderBase folder1 + = UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, ua.PrincipalID, "folder1"); + + IClientAPI client = SceneHelpers.AddScenePresence(scene, agentId).ControllingClient; + scene.DeRezObjects(client, new List() { so.LocalId }, UUID.Zero, DeRezAction.Take, folder1.ID); + + SceneObjectPart retrievedPart = scene.GetSceneObjectPart(so.LocalId); + + Assert.That(retrievedPart, Is.Not.Null); + Assert.That(so.IsDeleted, Is.False); + + sogd.InventoryDeQueueAndDelete(); + + Assert.That(so.IsDeleted, Is.True); + + SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); + Assert.That(retrievedPart2, Is.Null); + +// SceneSetupHelpers.DeleteSceneObjectAsync(scene, part, DeRezAction.Take, userInfo.RootFolder.ID, client); + + InventoryItemBase retrievedItem + = UserInventoryHelpers.GetInventoryItem( + scene.InventoryService, ua.PrincipalID, "folder1/" + myObjectName); + + // Check that we now have the taken part in our inventory + Assert.That(retrievedItem, Is.Not.Null); + + // Check that the taken part has actually disappeared +// SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); +// Assert.That(retrievedPart, Is.Null); + } /// /// Changing a scene object uuid changes the root part uuid. This is a valid operation if the object is not From 492515cf3f22d7f4ebdf96c924e51f7462eb0aa8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 9 Nov 2012 21:58:39 -0800 Subject: [PATCH 08/71] One more module converted: Vegetation. --- .../Resources/CoreModulePlugin.addin.xml | 1 + .../World/Vegetation/VegetationModule.cs | 26 +++++++++++++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index 8fc70e2ba0..14dc22a21e 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -41,6 +41,7 @@ + diff --git a/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs b/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs index f5f35bb92e..528da0e3bc 100644 --- a/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs +++ b/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs @@ -36,7 +36,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Avatar.Vegetation { - public class VegetationModule : IRegionModule, IVegetationModule + public class VegetationModule : INonSharedRegionModule, IVegetationModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -45,16 +45,32 @@ namespace OpenSim.Region.CoreModules.Avatar.Vegetation protected static readonly PCode[] creationCapabilities = new PCode[] { PCode.Grass, PCode.NewTree, PCode.Tree }; public PCode[] CreationCapabilities { get { return creationCapabilities; } } - public void Initialise(Scene scene, IConfigSource source) + public void Initialise(IConfigSource source) + { + } + + public void AddRegion(Scene scene) { m_scene = scene; m_scene.RegisterModuleInterface(this); } - - public void PostInitialise() {} + + public void RemoveRegion(Scene scene) + { + m_scene.UnregisterModuleInterface(this); + } + public void Close() {} public string Name { get { return "Vegetation Module"; } } - public bool IsSharedModule { get { return false; } } + + public Type ReplaceableInterface + { + get { return null; } + } + + public void RegionLoaded(Scene scene) + { + } public SceneObjectGroup AddTree( UUID uuid, UUID groupID, Vector3 scale, Quaternion rotation, Vector3 position, Tree treeType, bool newTree) From a4fee98352c7d38bdb00298dd709a488b9f2ca39 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 9 Nov 2012 22:09:08 -0800 Subject: [PATCH 09/71] One more module converted: TreePopulator. --- .../Resources/OptionalModules.addin.xml | 1 + .../TreePopulator/TreePopulatorModule.cs | 30 ++++++++++++------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml b/OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml index 869134354f..a372d37781 100644 --- a/OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml +++ b/OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml @@ -14,5 +14,6 @@ + diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index 51b0592356..6ebdf4dcc9 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs @@ -46,7 +46,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator /// /// Version 2.02 - Still hacky /// - public class TreePopulatorModule : IRegionModule, ICommandableModule, IVegetationModule + public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private readonly Commander m_commander = new Commander("tree"); @@ -170,13 +170,9 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator #region IRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { - m_scene = scene; - m_scene.RegisterModuleInterface(this); - m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; - // ini file settings try { @@ -201,7 +197,20 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator m_log.Debug("[TREES]: Initialised tree module"); } - public void PostInitialise() + public void AddRegion(Scene scene) + { + m_scene = scene; + //m_scene.RegisterModuleInterface(this); + m_scene.RegisterModuleCommander(m_commander); + m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; + + } + + public void RemoveRegion(Scene scene) + { + } + + public void RegionLoaded(Scene scene) { ReloadCopse(); if (m_copse.Count > 0) @@ -220,11 +229,12 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator get { return "TreePopulatorModule"; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return false; } + get { return null; } } + #endregion //-------------------------------------------------------------- @@ -448,8 +458,6 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator m_commander.RegisterCommand("reload", treeReloadCommand); m_commander.RegisterCommand("remove", treeRemoveCommand); m_commander.RegisterCommand("statistics", treeStatisticsCommand); - - m_scene.RegisterModuleCommander(m_commander); } /// From 86b22604fa5d6b27421d87b6fb04baf01ed74ca5 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 9 Nov 2012 22:21:11 -0800 Subject: [PATCH 10/71] One more more converted: IPBanModule. --- .../CoreModules/Agent/IPBan/IPBanModule.cs | 24 ++++++++++++++----- .../Resources/CoreModulePlugin.addin.xml | 1 + 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs index bfe2a716af..1749dcfdb4 100644 --- a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs +++ b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs @@ -36,13 +36,17 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Agent.IPBan { - public class IPBanModule : IRegionModule + public class IPBanModule : ISharedRegionModule { - #region Implementation of IRegionModule + #region Implementation of ISharedRegionModule private List m_bans = new List(); - public void Initialise(Scene scene, IConfigSource source) + public void Initialise(IConfigSource source) + { + } + + public void AddRegion(Scene scene) { new SceneBanner(scene, m_bans); @@ -50,7 +54,7 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan { foreach (EstateBan ban in scene.RegionInfo.EstateSettings.EstateBans) { - if (!String.IsNullOrEmpty(ban.BannedHostIPMask)) + if (!String.IsNullOrEmpty(ban.BannedHostIPMask)) m_bans.Add(ban.BannedHostIPMask); if (!String.IsNullOrEmpty(ban.BannedHostNameMask)) m_bans.Add(ban.BannedHostNameMask); @@ -58,6 +62,14 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan } } + public void RemoveRegion(Scene scene) + { + } + + public void RegionLoaded(Scene scene) + { + } + public void PostInitialise() { if (File.Exists("bans.txt")) @@ -80,9 +92,9 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan get { return "IPBanModule"; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return true; } + get { return null; } } #endregion diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index 14dc22a21e..5a413a90cf 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -42,6 +42,7 @@ + From 791c4d5b9fe831cab3dd984184714e6e674918f9 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 10 Nov 2012 08:10:43 -0800 Subject: [PATCH 11/71] One more module converted: J2KDecoderModule. --- .../Agent/TextureSender/J2KDecoderModule.cs | 42 ++++++++++++++----- .../Resources/CoreModulePlugin.addin.xml | 1 + 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index a1a250176d..2879154ba6 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs @@ -45,7 +45,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender { public delegate void J2KDecodeDelegate(UUID assetID); - public class J2KDecoderModule : IRegionModule, IJ2KDecoder + public class J2KDecoderModule : ISharedRegionModule, IJ2KDecoder { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -56,26 +56,21 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender /// Cache that will store decoded JPEG2000 layer boundary data private IImprovedAssetCache m_cache; /// Reference to a scene (doesn't matter which one as long as it can load the cache module) + private UUID m_CreatorID = UUID.Zero; private Scene m_scene; - #region IRegionModule + #region ISharedRegionModule private bool m_useCSJ2K = true; public string Name { get { return "J2KDecoderModule"; } } - public bool IsSharedModule { get { return true; } } public J2KDecoderModule() { } - public void Initialise(Scene scene, IConfigSource source) + public void Initialise(IConfigSource source) { - if (m_scene == null) - m_scene = scene; - - scene.RegisterModuleInterface(this); - IConfig startupConfig = source.Configs["Startup"]; if (startupConfig != null) { @@ -83,6 +78,24 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender } } + public void AddRegion(Scene scene) + { + if (m_scene == null) + { + m_scene = scene; + m_CreatorID = scene.RegionInfo.RegionID; + } + + scene.RegisterModuleInterface(this); + + } + + public void RemoveRegion(Scene scene) + { + if (m_scene == scene) + m_scene = null; + } + public void PostInitialise() { m_cache = m_scene.RequestModuleInterface(); @@ -92,6 +105,15 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender { } + public void RegionLoaded(Scene scene) + { + } + + public Type ReplaceableInterface + { + get { return null; } + } + #endregion IRegionModule #region IJ2KDecoder @@ -279,7 +301,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender { string assetID = "j2kCache_" + AssetId.ToString(); - AssetBase layerDecodeAsset = new AssetBase(assetID, assetID, (sbyte)AssetType.Notecard, m_scene.RegionInfo.RegionID.ToString()); + AssetBase layerDecodeAsset = new AssetBase(assetID, assetID, (sbyte)AssetType.Notecard, m_CreatorID.ToString()); layerDecodeAsset.Local = true; layerDecodeAsset.Temporary = true; diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index 5a413a90cf..820f11baf9 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -43,6 +43,7 @@ + From ee3d06220ef8ddbbc8af24981e147494110ed5c1 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sun, 4 Nov 2012 10:57:15 +0000 Subject: [PATCH 12/71] Documenting parameters of methods on the IDialogModule interface --- .../Framework/Interfaces/IDialogModule.cs | 106 ++++++++++++------ 1 file changed, 73 insertions(+), 33 deletions(-) diff --git a/OpenSim/Region/Framework/Interfaces/IDialogModule.cs b/OpenSim/Region/Framework/Interfaces/IDialogModule.cs index be9764a7ea..d1e9df0fbc 100644 --- a/OpenSim/Region/Framework/Interfaces/IDialogModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IDialogModule.cs @@ -36,59 +36,75 @@ namespace OpenSim.Region.Framework.Interfaces /// Send a non-modal alert message to a particular user. This can disappear from the user's view after a /// small interval. /// - /// - /// + /// + /// IClientAPI object representing the user. + /// + /// Message text to send to the user. void SendAlertToUser(IClientAPI client, string message); /// /// Send an alert message to a particular user. /// - /// - /// - /// + /// + /// IClientAPI object representing the user. + /// + /// Message text to send to the user. + /// Flag to control modality. void SendAlertToUser(IClientAPI client, string message, bool modal); /// /// Send a non-modal alert message to a particular user. /// - /// - /// + /// UUID of agent representing the user. + /// Message text to send to the user. void SendAlertToUser(UUID agentID, string message); /// /// Send an alert message to a particular user. /// - /// - /// - /// + /// UUID of agent representing the user. + /// Message text to send to the user. + /// Flag to control modality. void SendAlertToUser(UUID agentID, string message, bool modal); /// /// Send an alert message to a particular user. /// - /// - /// - /// - /// + /// Account first name + /// Account last name + /// Message text to send to the user. + /// Flag to control modality. void SendAlertToUser(string firstName, string lastName, string message, bool modal); /// /// Send an alert message to all users in the scene. /// - /// + /// Message text to send to all users. void SendGeneralAlert(string message); /// /// Send a dialog box to a particular user. /// - /// - /// - /// - /// - /// - /// - /// - /// + /// + /// UUID of the avatar representing the user. + /// + /// + /// Name of the object sending the dialog. + /// + /// + /// UUID of the object sending the dialog. + /// + /// + /// UUID of the user that owns the object. + /// + /// Message text to send to the user. + /// + /// Texture UUID to pass along with the dialog. + /// + /// + /// Channel on which the selected button text should be broadcast. + /// + /// Dialog button text. void SendDialogToUser( UUID avatarID, string objectName, UUID objectID, UUID ownerID, string message, UUID textureID, int ch, string[] buttonlabels); @@ -96,13 +112,23 @@ namespace OpenSim.Region.Framework.Interfaces /// /// Send a url to a particular user. /// - /// - /// - /// - /// - /// - /// - /// + /// + /// UUID of the avatar representing the user. + /// + /// + /// Name of the object sending the dialog. + /// + /// + /// UUID of the object sending the dialog. + /// + /// + /// UUID of the user that owns the object. + /// + /// + /// Flag indicating whether or not the object is group-owned. + /// + /// Message text to send to the user. + /// Url to send to the user. void SendUrlToUser( UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, string message, string url); @@ -110,18 +136,32 @@ namespace OpenSim.Region.Framework.Interfaces /// Send a notification to all users in the scene. This notification should remain around until the /// user explicitly dismisses it. /// - /// + /// /// On the Linden Labs Second Client (as of 1.21), this is a big blue box message on the upper right of the /// screen. - /// + /// /// The user sending the message /// The name of the user doing the sending /// The message being sent to the user void SendNotificationToUsersInRegion(UUID fromAvatarID, string fromAvatarName, string message); - + /// /// Send a textbox entry for the client to respond to /// + /// + /// UUID of the avatar representing the user. + /// + /// Message text to send to the user. + /// + /// Chat channel that the user's input should be broadcast on. + /// + /// Name of the object sending the dialog. + /// + /// UUID of the object sending the dialog. + /// + /// + /// UUID of the user that owns the object. + /// void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, string name, UUID objectid, UUID ownerid); } } From d0742cea3ef1fc24fadab66756d1a5c94bcfe171 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sun, 4 Nov 2012 11:02:21 +0000 Subject: [PATCH 13/71] 80 character-width terminal formatting of IDialogModule interface, removing superfluous whitespace & line-endings. --- .../Framework/Interfaces/IDialogModule.cs | 51 ++++++++++--------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/OpenSim/Region/Framework/Interfaces/IDialogModule.cs b/OpenSim/Region/Framework/Interfaces/IDialogModule.cs index d1e9df0fbc..4d35c1c856 100644 --- a/OpenSim/Region/Framework/Interfaces/IDialogModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IDialogModule.cs @@ -33,15 +33,15 @@ namespace OpenSim.Region.Framework.Interfaces public interface IDialogModule { /// - /// Send a non-modal alert message to a particular user. This can disappear from the user's view after a - /// small interval. + /// Send a non-modal alert message to a particular user. This can + /// disappear from the user's view after a small interval. /// /// /// IClientAPI object representing the user. /// /// Message text to send to the user. void SendAlertToUser(IClientAPI client, string message); - + /// /// Send an alert message to a particular user. /// @@ -51,14 +51,14 @@ namespace OpenSim.Region.Framework.Interfaces /// Message text to send to the user. /// Flag to control modality. void SendAlertToUser(IClientAPI client, string message, bool modal); - + /// /// Send a non-modal alert message to a particular user. /// /// UUID of agent representing the user. /// Message text to send to the user. void SendAlertToUser(UUID agentID, string message); - + /// /// Send an alert message to a particular user. /// @@ -66,7 +66,7 @@ namespace OpenSim.Region.Framework.Interfaces /// Message text to send to the user. /// Flag to control modality. void SendAlertToUser(UUID agentID, string message, bool modal); - + /// /// Send an alert message to a particular user. /// @@ -74,14 +74,15 @@ namespace OpenSim.Region.Framework.Interfaces /// Account last name /// Message text to send to the user. /// Flag to control modality. - void SendAlertToUser(string firstName, string lastName, string message, bool modal); - + void SendAlertToUser(string firstName, string lastName, + string message, bool modal); + /// /// Send an alert message to all users in the scene. /// /// Message text to send to all users. void SendGeneralAlert(string message); - + /// /// Send a dialog box to a particular user. /// @@ -105,10 +106,10 @@ namespace OpenSim.Region.Framework.Interfaces /// Channel on which the selected button text should be broadcast. /// /// Dialog button text. - void SendDialogToUser( - UUID avatarID, string objectName, UUID objectID, UUID ownerID, - string message, UUID textureID, int ch, string[] buttonlabels); - + void SendDialogToUser(UUID avatarID, string objectName, UUID objectID, + UUID ownerID, string message, UUID textureID, int ch, + string[] buttonlabels); + /// /// Send a url to a particular user. /// @@ -129,21 +130,24 @@ namespace OpenSim.Region.Framework.Interfaces /// /// Message text to send to the user. /// Url to send to the user. - void SendUrlToUser( - UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, string message, string url); - + void SendUrlToUser(UUID avatarID, string objectName, UUID objectID, + UUID ownerID, bool groupOwned, string message, string url); + /// - /// Send a notification to all users in the scene. This notification should remain around until the - /// user explicitly dismisses it. + /// Send a notification to all users in the scene. This notification + /// should remain around until the user explicitly dismisses it. /// /// - /// On the Linden Labs Second Client (as of 1.21), this is a big blue box message on the upper right of the - /// screen. + /// On the Linden Labs Second Client (as of 1.21), this is a big blue + /// box message on the upper right of the screen. /// /// The user sending the message - /// The name of the user doing the sending + /// + /// The name of the user doing the sending + /// /// The message being sent to the user - void SendNotificationToUsersInRegion(UUID fromAvatarID, string fromAvatarName, string message); + void SendNotificationToUsersInRegion(UUID fromAvatarID, + string fromAvatarName, string message); /// /// Send a textbox entry for the client to respond to @@ -162,6 +166,7 @@ namespace OpenSim.Region.Framework.Interfaces /// /// UUID of the user that owns the object. /// - void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, string name, UUID objectid, UUID ownerid); + void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, + string name, UUID objectid, UUID ownerid); } } From 5cba04e2d6a7dd59a299e95d0e30faa7a5f9747e Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sat, 10 Nov 2012 08:59:27 +0000 Subject: [PATCH 14/71] Converting DialogModule to INonSharedRegionModule --- .../CoreModules/Avatar/Dialog/DialogModule.cs | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs index 325067c9ff..2fe708f40f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs @@ -32,6 +32,7 @@ using log4net; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; +using Mono.Addins; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -39,16 +40,27 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Avatar.Dialog { - public class DialogModule : IRegionModule, IDialogModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class DialogModule : IDialogModule, INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected Scene m_scene; - - public void Initialise(Scene scene, IConfigSource source) + + public void Initialise(IConfigSource source) { } + + public Type ReplaceableInterface { get { return null; } } + + public void AddRegion(Scene scene) { m_scene = scene; m_scene.RegisterModuleInterface(this); + } + + public void RegionLoaded(Scene scene) + { + if(scene != m_scene) + return; m_scene.AddCommand( "Users", this, "alert", "alert ", @@ -60,11 +72,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog "Send an alert to a user", HandleAlertConsoleCommand); } + + public void RemoveRegion(Scene scene) + { + if(scene != m_scene) + return; + + m_scene.UnregisterModuleInterface(this); + } - public void PostInitialise() {} public void Close() {} public string Name { get { return "Dialog Module"; } } - public bool IsSharedModule { get { return false; } } public void SendAlertToUser(IClientAPI client, string message) { From fb7bbe167ace2954a961714881e5b0bc3b0dab77 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sat, 10 Nov 2012 09:05:32 +0000 Subject: [PATCH 15/71] formatting DialogModule for 80-character width terminal --- .../CoreModules/Avatar/Dialog/DialogModule.cs | 120 +++++++++++------- 1 file changed, 73 insertions(+), 47 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs index 2fe708f40f..d85a6e3d6a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs @@ -42,9 +42,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog { [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] public class DialogModule : IDialogModule, INonSharedRegionModule - { + { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + protected Scene m_scene; public void Initialise(IConfigSource source) { } @@ -59,7 +59,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog public void RegionLoaded(Scene scene) { - if(scene != m_scene) + if (scene != m_scene) return; m_scene.AddCommand( @@ -68,52 +68,59 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog HandleAlertConsoleCommand); m_scene.AddCommand( - "Users", this, "alert-user", "alert-user ", + "Users", this, "alert-user", + "alert-user ", "Send an alert to a user", HandleAlertConsoleCommand); } public void RemoveRegion(Scene scene) { - if(scene != m_scene) + if (scene != m_scene) return; m_scene.UnregisterModuleInterface(this); } - - public void Close() {} + + public void Close() { } public string Name { get { return "Dialog Module"; } } - + public void SendAlertToUser(IClientAPI client, string message) { SendAlertToUser(client, message, false); } - - public void SendAlertToUser(IClientAPI client, string message, bool modal) + + public void SendAlertToUser(IClientAPI client, string message, + bool modal) { client.SendAgentAlertMessage(message, modal); - } - + } + public void SendAlertToUser(UUID agentID, string message) { SendAlertToUser(agentID, message, false); } - + public void SendAlertToUser(UUID agentID, string message, bool modal) { ScenePresence sp = m_scene.GetScenePresence(agentID); - + if (sp != null) sp.ControllingClient.SendAgentAlertMessage(message, modal); } - - public void SendAlertToUser(string firstName, string lastName, string message, bool modal) + + public void SendAlertToUser(string firstName, string lastName, + string message, bool modal) { - ScenePresence presence = m_scene.GetScenePresence(firstName, lastName); + ScenePresence presence = m_scene.GetScenePresence(firstName, + lastName); if (presence != null) - presence.ControllingClient.SendAgentAlertMessage(message, modal); + { + presence.ControllingClient.SendAgentAlertMessage(message, + modal); + } } - + public void SendGeneralAlert(string message) { m_scene.ForEachRootClient(delegate(IClientAPI client) @@ -122,11 +129,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog }); } - public void SendDialogToUser( - UUID avatarID, string objectName, UUID objectID, UUID ownerID, - string message, UUID textureID, int ch, string[] buttonlabels) + public void SendDialogToUser(UUID avatarID, string objectName, + UUID objectID, UUID ownerID, string message, UUID textureID, + int ch, string[] buttonlabels) { - UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, ownerID); + UserAccount account = m_scene.UserAccountService.GetUserAccount( + m_scene.RegionInfo.ScopeID, ownerID); string ownerFirstName, ownerLastName; if (account != null) { @@ -141,29 +149,38 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog ScenePresence sp = m_scene.GetScenePresence(avatarID); if (sp != null) - sp.ControllingClient.SendDialog( - objectName, objectID, ownerID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels); + { + sp.ControllingClient.SendDialog(objectName, objectID, ownerID, + ownerFirstName, ownerLastName, message, textureID, ch, + buttonlabels); + } } - public void SendUrlToUser( - UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) + public void SendUrlToUser(UUID avatarID, string objectName, + UUID objectID, UUID ownerID, bool groupOwned, string message, + string url) { ScenePresence sp = m_scene.GetScenePresence(avatarID); - + if (sp != null) - sp.ControllingClient.SendLoadURL(objectName, objectID, ownerID, groupOwned, message, url); + { + sp.ControllingClient.SendLoadURL(objectName, objectID, + ownerID, groupOwned, message, url); + } } - - public void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, string name, UUID objectid, UUID ownerid) + + public void SendTextBoxToUser(UUID avatarid, string message, + int chatChannel, string name, UUID objectid, UUID ownerid) { - UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, ownerid); + UserAccount account = m_scene.UserAccountService.GetUserAccount( + m_scene.RegionInfo.ScopeID, ownerid); string ownerFirstName, ownerLastName; - UUID ownerID = UUID.Zero; + UUID ownerID = UUID.Zero; if (account != null) { ownerFirstName = account.FirstName; ownerLastName = account.LastName; - ownerID = account.PrincipalID; + ownerID = account.PrincipalID; } else { @@ -172,29 +189,38 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog } ScenePresence sp = m_scene.GetScenePresence(avatarid); - + if (sp != null) - sp.ControllingClient.SendTextBoxRequest(message, chatChannel, name, ownerID, ownerFirstName, ownerLastName, objectid); + { + sp.ControllingClient.SendTextBoxRequest(message, chatChannel, + name, ownerID, ownerFirstName, ownerLastName, + objectid); + } } - public void SendNotificationToUsersInRegion( - UUID fromAvatarID, string fromAvatarName, string message) + public void SendNotificationToUsersInRegion(UUID fromAvatarID, + string fromAvatarName, string message) { m_scene.ForEachRootClient(delegate(IClientAPI client) { - client.SendBlueBoxMessage(fromAvatarID, fromAvatarName, message); + client.SendBlueBoxMessage(fromAvatarID, fromAvatarName, + message); }); } - + /// /// Handle an alert command from the console. /// /// /// - public void HandleAlertConsoleCommand(string module, string[] cmdparams) + public void HandleAlertConsoleCommand(string module, + string[] cmdparams) { - if (m_scene.ConsoleScene() != null && m_scene.ConsoleScene() != m_scene) + if (m_scene.ConsoleScene() != null && + m_scene.ConsoleScene() != m_scene) + { return; + } string message = string.Empty; @@ -202,7 +228,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog { message = CombineParams(cmdparams, 1); m_log.InfoFormat("[DIALOG]: Sending general alert in region {0} with message {1}", - m_scene.RegionInfo.RegionName, message); + m_scene.RegionInfo.RegionName, message); SendGeneralAlert(message); } else if (cmdparams.Length > 3) @@ -210,9 +236,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog string firstName = cmdparams[1]; string lastName = cmdparams[2]; message = CombineParams(cmdparams, 3); - m_log.InfoFormat( - "[DIALOG]: Sending alert in region {0} to {1} {2} with message {3}", - m_scene.RegionInfo.RegionName, firstName, lastName, message); + m_log.InfoFormat("[DIALOG]: Sending alert in region {0} to {1} {2} with message {3}", + m_scene.RegionInfo.RegionName, firstName, lastName, + message); SendAlertToUser(firstName, lastName, message, false); } else @@ -230,7 +256,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog { result += commandParams[i] + " "; } - + return result; } } From 4ac857f9025a8308b0e14adbddffd89b467caf17 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 10 Nov 2012 08:48:31 -0800 Subject: [PATCH 16/71] One more module: EventQueueGetModule. Also making it non-optional for this dll. --- .../Caps/EventQueue/EventQueueGetModule.cs | 93 ++++++++----------- bin/OpenSimDefaults.ini | 3 - 2 files changed, 39 insertions(+), 57 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 47cb04953f..b96b1db6f9 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -55,8 +55,8 @@ namespace OpenSim.Region.ClientStack.Linden public OSDMap body; } - //[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] - public class EventQueueGetModule : IEventQueue, IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class EventQueueGetModule : IEventQueue, INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -66,8 +66,6 @@ namespace OpenSim.Region.ClientStack.Linden public int DebugLevel { get; set; } protected Scene m_scene; - private IConfigSource m_gConfig; - bool enabledYN; private Dictionary m_ids = new Dictionary(); @@ -75,60 +73,46 @@ namespace OpenSim.Region.ClientStack.Linden private Dictionary m_QueueUUIDAvatarMapping = new Dictionary(); private Dictionary m_AvatarQueueUUIDMapping = new Dictionary(); - #region IRegionModule methods - public virtual void Initialise(Scene scene, IConfigSource config) + #region INonSharedRegionModule methods + public virtual void Initialise(IConfigSource config) { - m_gConfig = config; - - IConfig startupConfig = m_gConfig.Configs["Startup"]; - - ReadConfigAndPopulate(scene, startupConfig, "Startup"); - - if (enabledYN) - { - m_scene = scene; - scene.RegisterModuleInterface(this); - - // Register fallback handler - // Why does EQG Fail on region crossings! - - //scene.CommsManager.HttpServer.AddLLSDHandler("/CAPS/EQG/", EventQueueFallBack); - -// scene.EventManager.OnNewClient += OnNewClient; - - // TODO: Leaving these open, or closing them when we - // become a child is incorrect. It messes up TP in a big - // way. CAPS/EQ need to be active as long as the UDP - // circuit is there. - - scene.EventManager.OnClientClosed += ClientClosed; - - scene.EventManager.OnMakeChildAgent += MakeChildAgent; - scene.EventManager.OnRegisterCaps += OnRegisterCaps; - - MainConsole.Instance.Commands.AddCommand( - "Debug", - false, - "debug eq", - "debug eq [0|1|2]", - "Turn on event queue debugging\n" - + " <= 0 - turns off all event queue logging\n" - + " >= 1 - turns on outgoing event logging\n" - + " >= 2 - turns on poll notification", - HandleDebugEq); - } - else - { - m_gConfig = null; - } } - private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p) + public void AddRegion(Scene scene) { - enabledYN = startupConfig.GetBoolean("EventQueue", true); + m_scene = scene; + scene.RegisterModuleInterface(this); + + scene.EventManager.OnClientClosed += ClientClosed; + scene.EventManager.OnMakeChildAgent += MakeChildAgent; + scene.EventManager.OnRegisterCaps += OnRegisterCaps; + + MainConsole.Instance.Commands.AddCommand( + "Debug", + false, + "debug eq", + "debug eq [0|1|2]", + "Turn on event queue debugging\n" + + " <= 0 - turns off all event queue logging\n" + + " >= 1 - turns on outgoing event logging\n" + + " >= 2 - turns on poll notification", + HandleDebugEq); } - public void PostInitialise() + public void RemoveRegion(Scene scene) + { + if (m_scene != scene) + return; + + scene.EventManager.OnClientClosed -= ClientClosed; + scene.EventManager.OnMakeChildAgent -= MakeChildAgent; + scene.EventManager.OnRegisterCaps -= OnRegisterCaps; + + scene.UnregisterModuleInterface(this); + m_scene = null; + } + + public void RegionLoaded(Scene scene) { } @@ -141,10 +125,11 @@ namespace OpenSim.Region.ClientStack.Linden get { return "EventQueueGetModule"; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return false; } + get { return null; } } + #endregion protected void HandleDebugEq(string module, string[] args) diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index fa284bdef1..4b589857d5 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -57,9 +57,6 @@ ; ## CLIENTS ; ## - ; Enables EventQueueGet Service. - EventQueue = true - ; Set this to the DLL containing the client stack to use. clientstack_plugin="OpenSim.Region.ClientStack.LindenUDP.dll" From 26a94610fc88846aeab8e6e2ac09ebcf85a89122 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 10 Nov 2012 10:21:37 -0800 Subject: [PATCH 17/71] Fix Unit tests -- the module contract was not being honored in the set up of scenes. --- OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index fc49169c97..6d67b67577 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs @@ -383,11 +383,6 @@ namespace OpenSim.Tests.Common } } - foreach (IRegionModuleBase module in newModules) - { - if (module is ISharedRegionModule) ((ISharedRegionModule)module).PostInitialise(); - } - foreach (IRegionModuleBase module in newModules) { foreach (Scene scene in scenes) @@ -396,7 +391,12 @@ namespace OpenSim.Tests.Common scene.AddRegionModule(module.Name, module); } } - + + foreach (IRegionModuleBase module in newModules) + { + if (module is ISharedRegionModule) ((ISharedRegionModule)module).PostInitialise(); + } + // RegionLoaded is fired after all modules have been appropriately added to all scenes foreach (IRegionModuleBase module in newModules) foreach (Scene scene in scenes) From 3a5e317f659c7bec1a9b271c2e35f25ca16d7d63 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 10 Nov 2012 10:35:27 -0800 Subject: [PATCH 18/71] One more module converted: ObjectAdd. --- .../Linden/Caps/ObjectCaps/ObjectAdd.cs | 117 ++++++++++-------- 1 file changed, 66 insertions(+), 51 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs index 4ccfc434a6..642d8b4a2a 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs @@ -32,6 +32,7 @@ using log4net; using Nini.Config; using OpenMetaverse; using OpenMetaverse.StructuredData; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; @@ -41,30 +42,60 @@ using Caps=OpenSim.Framework.Capabilities.Caps; namespace OpenSim.Region.ClientStack.Linden { - public class ObjectAdd : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class ObjectAdd : INonSharedRegionModule { // private static readonly ILog m_log = // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; - #region IRegionModule Members - public void Initialise(Scene pScene, IConfigSource pSource) + #region INonSharedRegionModule Members + + public void Initialise(IConfigSource pSource) { - m_scene = pScene; + } + + public void AddRegion(Scene scene) + { + m_scene = scene; m_scene.EventManager.OnRegisterCaps += RegisterCaps; } - public void PostInitialise() + public void RemoveRegion(Scene scene) { - + if (m_scene == scene) + { + m_scene.EventManager.OnRegisterCaps -= RegisterCaps; + m_scene = null; + } } + public void RegionLoaded(Scene scene) + { + } + + public void Close() + { + } + + public string Name + { + get { return "ObjectAddModule"; } + } + + public Type ReplaceableInterface + { + get { return null; } + } + + #endregion + public void RegisterCaps(UUID agentID, Caps caps) { UUID capuuid = UUID.Random(); - -// m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/"); + + // m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/"); caps.RegisterHandler( "ObjectAdd", @@ -73,7 +104,7 @@ namespace OpenSim.Region.ClientStack.Linden "/CAPS/OA/" + capuuid + "/", httpMethod => ProcessAdd(httpMethod, agentID, caps), "ObjectAdd", - agentID.ToString()));; + agentID.ToString())); ; } public Hashtable ProcessAdd(Hashtable request, UUID AgentId, Caps cap) @@ -84,7 +115,7 @@ namespace OpenSim.Region.ClientStack.Linden responsedata["keepalive"] = false; responsedata["str_response_string"] = "Request wasn't what was expected"; ScenePresence avatar; - + if (!m_scene.TryGetScenePresence(AgentId, out avatar)) return responsedata; @@ -127,7 +158,7 @@ namespace OpenSim.Region.ClientStack.Linden if (r.Type != OSDType.Map) // not a proper req return responsedata; - + OSDMap rm = (OSDMap)r; if (rm.ContainsKey("ObjectData")) //v2 @@ -138,7 +169,7 @@ namespace OpenSim.Region.ClientStack.Linden return responsedata; } - OSDMap ObjMap = (OSDMap) rm["ObjectData"]; + OSDMap ObjMap = (OSDMap)rm["ObjectData"]; bypass_raycast = ObjMap["BypassRaycast"].AsBoolean(); everyone_mask = readuintval(ObjMap["EveryoneMask"]); @@ -181,7 +212,7 @@ namespace OpenSim.Region.ClientStack.Linden responsedata["str_response_string"] = "Has Profile key, but data not in expected format"; return responsedata; } - + OSDMap ProfileMap = (OSDMap)ObjMap["Profile"]; profile_begin = ProfileMap["Begin"].AsInteger(); @@ -190,14 +221,14 @@ namespace OpenSim.Region.ClientStack.Linden hollow = ProfileMap["Hollow"].AsInteger(); } ray_end_is_intersection = ObjMap["RayEndIsIntersection"].AsBoolean(); - + ray_target_id = ObjMap["RayTargetId"].AsUUID(); state = ObjMap["State"].AsInteger(); try { - ray_end = ((OSDArray) ObjMap["RayEnd"]).AsVector3(); - ray_start = ((OSDArray) ObjMap["RayStart"]).AsVector3(); - scale = ((OSDArray) ObjMap["Scale"]).AsVector3(); + ray_end = ((OSDArray)ObjMap["RayEnd"]).AsVector3(); + ray_start = ((OSDArray)ObjMap["RayStart"]).AsVector3(); + scale = ((OSDArray)ObjMap["Scale"]).AsVector3(); rotation = ((OSDArray)ObjMap["Rotation"]).AsQuaternion(); } catch (Exception) @@ -214,7 +245,7 @@ namespace OpenSim.Region.ClientStack.Linden return responsedata; } - OSDMap AgentDataMap = (OSDMap) rm["AgentData"]; + OSDMap AgentDataMap = (OSDMap)rm["AgentData"]; //session_id = AgentDataMap["SessionId"].AsUUID(); group_id = AgentDataMap["GroupId"].AsUUID(); @@ -251,21 +282,21 @@ namespace OpenSim.Region.ClientStack.Linden profile_begin = rm["profile_begin"].AsInteger(); profile_curve = rm["profile_curve"].AsInteger(); profile_end = rm["profile_end"].AsInteger(); - + ray_end_is_intersection = rm["ray_end_is_intersection"].AsBoolean(); - + ray_target_id = rm["ray_target_id"].AsUUID(); - - + + //session_id = rm["session_id"].AsUUID(); state = rm["state"].AsInteger(); - try + try { ray_end = ((OSDArray)rm["ray_end"]).AsVector3(); ray_start = ((OSDArray)rm["ray_start"]).AsVector3(); rotation = ((OSDArray)rm["rotation"]).AsQuaternion(); scale = ((OSDArray)rm["scale"]).AsVector3(); - } + } catch (Exception) { responsedata["str_response_string"] = "RayEnd, RayStart, Scale or Rotation wasn't in the expected format"; @@ -273,9 +304,9 @@ namespace OpenSim.Region.ClientStack.Linden } } - - Vector3 pos = m_scene.GetNewRezLocation(ray_start, ray_end, ray_target_id, rotation, (bypass_raycast) ? (byte)1 : (byte)0, (ray_end_is_intersection) ? (byte)1 : (byte)0, true, scale, false); + + Vector3 pos = m_scene.GetNewRezLocation(ray_start, ray_end, ray_target_id, rotation, (bypass_raycast) ? (byte)1 : (byte)0, (ray_end_is_intersection) ? (byte)1 : (byte)0, true, scale, false); PrimitiveBaseShape pbs = PrimitiveBaseShape.CreateBox(); @@ -286,17 +317,17 @@ namespace OpenSim.Region.ClientStack.Linden pbs.PathRevolutions = (byte)path_revolutions; pbs.PathScaleX = (byte)path_scale_x; pbs.PathScaleY = (byte)path_scale_y; - pbs.PathShearX = (byte) path_shear_x; + pbs.PathShearX = (byte)path_shear_x; pbs.PathShearY = (byte)path_shear_y; pbs.PathSkew = (sbyte)path_skew; pbs.PathTaperX = (sbyte)path_taper_x; pbs.PathTaperY = (sbyte)path_taper_y; pbs.PathTwist = (sbyte)path_twist; pbs.PathTwistBegin = (sbyte)path_twist_begin; - pbs.HollowShape = (HollowShape) hollow; + pbs.HollowShape = (HollowShape)hollow; pbs.PCode = (byte)p_code; - pbs.ProfileBegin = (ushort) profile_begin; - pbs.ProfileCurve = (byte) profile_curve; + pbs.ProfileBegin = (ushort)profile_begin; + pbs.ProfileCurve = (byte)profile_curve; pbs.ProfileEnd = (ushort)profile_end; pbs.Scale = scale; pbs.State = (byte)state; @@ -306,7 +337,7 @@ namespace OpenSim.Region.ClientStack.Linden if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos)) { // rez ON the ground, not IN the ground - // pos.Z += 0.25F; + // pos.Z += 0.25F; obj = m_scene.AddNewPrim(avatar.UUID, group_id, pos, rotation, pbs); } @@ -323,13 +354,13 @@ namespace OpenSim.Region.ClientStack.Linden rootpart.GroupMask = group_mask; rootpart.NextOwnerMask = next_owner_mask; rootpart.Material = (byte)material; - + m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor); - + responsedata["int_response_code"] = 200; //501; //410; //404; responsedata["content_type"] = "text/plain"; responsedata["keepalive"] = false; - responsedata["str_response_string"] = String.Format("local_id{0}",ConvertUintToBytes(obj.LocalId)); + responsedata["str_response_string"] = String.Format("local_id{0}", ConvertUintToBytes(obj.LocalId)); return responsedata; } @@ -347,24 +378,8 @@ namespace OpenSim.Region.ClientStack.Linden byte[] resultbytes = Utils.UIntToBytes(val); if (BitConverter.IsLittleEndian) Array.Reverse(resultbytes); - return String.Format("{0}",Convert.ToBase64String(resultbytes)); + return String.Format("{0}", Convert.ToBase64String(resultbytes)); } - public void Close() - { - - } - - public string Name - { - get { return "ObjectAddModule"; } - } - - public bool IsSharedModule - { - get { return false; } - } - - #endregion } } From b3574d23e465e6219e732ab6c28772f1359452ca Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 10 Nov 2012 11:26:03 -0800 Subject: [PATCH 19/71] One more module converted: DataSnapshot. --- .../DataSnapshot/DataSnapshotManager.cs | 166 ++++++++++-------- .../DataSnapshot/Interfaces/IDataSnapshot.cs | 1 - 2 files changed, 91 insertions(+), 76 deletions(-) diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index 5540656cc1..defbadc0ae 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs @@ -35,15 +35,20 @@ using System.Xml; using log4net; using Nini.Config; using OpenMetaverse; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Region.DataSnapshot.Interfaces; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +[assembly: Addin("LindenCaps", "0.1")] +[assembly: AddinDependency("OpenSim", "0.5")] + namespace OpenSim.Region.DataSnapshot { - public class DataSnapshotManager : IRegionModule, IDataSnapshot + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class DataSnapshotManager : ISharedRegionModule, IDataSnapshot { #region Class members //Information from config @@ -95,7 +100,7 @@ namespace OpenSim.Region.DataSnapshot #region IRegionModule - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { if (!m_configLoaded) { @@ -133,82 +138,121 @@ namespace OpenSim.Region.DataSnapshot m_enabled = false; return; } + + if (m_enabled) + m_snapStore = new SnapshotStore(m_snapsDir, m_gridinfo, m_listener_port, m_hostname); } - if (m_enabled) - { - //Hand it the first scene, assuming that all scenes have the same BaseHTTPServer - new DataRequestHandler(scene, this); - - m_hostname = scene.RegionInfo.ExternalHostName; - m_snapStore = new SnapshotStore(m_snapsDir, m_gridinfo, m_listener_port, m_hostname); - - MakeEverythingStale(); - - if (m_dataServices != "" && m_dataServices != "noservices") - NotifyDataServices(m_dataServices, "online"); - } } - if (m_enabled) + } + + public void AddRegion(Scene scene) + { + if (!m_enabled) + return; + + m_log.DebugFormat("[DATASNAPSHOT]: Module added to Scene {0}.", scene.RegionInfo.RegionName); + + m_snapStore.AddScene(scene); + m_scenes.Add(scene); + + Assembly currentasm = Assembly.GetExecutingAssembly(); + + foreach (Type pluginType in currentasm.GetTypes()) { - m_log.Info("[DATASNAPSHOT]: Scene added to module."); - - m_snapStore.AddScene(scene); - m_scenes.Add(scene); - - Assembly currentasm = Assembly.GetExecutingAssembly(); - - foreach (Type pluginType in currentasm.GetTypes()) + if (pluginType.IsPublic) { - if (pluginType.IsPublic) + if (!pluginType.IsAbstract) { - if (!pluginType.IsAbstract) + if (pluginType.GetInterface("IDataSnapshotProvider") != null) { - if (pluginType.GetInterface("IDataSnapshotProvider") != null) - { - IDataSnapshotProvider module = (IDataSnapshotProvider)Activator.CreateInstance(pluginType); - module.Initialize(scene, this); - module.OnStale += MarkDataStale; + IDataSnapshotProvider module = (IDataSnapshotProvider)Activator.CreateInstance(pluginType); + module.Initialize(scene, this); + module.OnStale += MarkDataStale; - m_dataproviders.Add(module); - m_snapStore.AddProvider(module); + m_dataproviders.Add(module); + m_snapStore.AddProvider(module); - m_log.Info("[DATASNAPSHOT]: Added new data provider type: " + pluginType.Name); - } + m_log.Debug("[DATASNAPSHOT]: Added new data provider type: " + pluginType.Name); } } } + } + } - //scene.OnRestart += OnSimRestart; - scene.EventManager.OnShutdown += delegate() { OnSimRestart(scene.RegionInfo); }; - } - else + public void RemoveRegion(Scene scene) + { + if (!m_enabled) + return; + + m_log.Info("[DATASNAPSHOT]: Region " + scene.RegionInfo.RegionName + " is being removed, removing from indexing"); + Scene restartedScene = SceneForUUID(scene.RegionInfo.RegionID); + + m_scenes.Remove(restartedScene); + m_snapStore.RemoveScene(restartedScene); + + //Getting around the fact that we can't remove objects from a collection we are enumerating over + List providersToRemove = new List(); + + foreach (IDataSnapshotProvider provider in m_dataproviders) { - //m_log.Debug("[DATASNAPSHOT]: Data snapshot disabled, not adding scene to module (or anything else)."); + if (provider.GetParentScene == restartedScene) + { + providersToRemove.Add(provider); + } } + + foreach (IDataSnapshotProvider provider in providersToRemove) + { + m_dataproviders.Remove(provider); + m_snapStore.RemoveProvider(provider); + } + + m_snapStore.RemoveScene(restartedScene); + } + + public void PostInitialise() + { + if (!m_enabled) + return; + + //Hand it the first scene, assuming that all scenes have the same BaseHTTPServer + new DataRequestHandler(m_scenes[0], this); + + m_hostname = m_scenes[0].RegionInfo.ExternalHostName; + + if (m_dataServices != "" && m_dataServices != "noservices") + NotifyDataServices(m_dataServices, "online"); + } + + public void RegionLoaded(Scene scene) + { + if (!m_enabled) + return; + + m_log.DebugFormat("[DATASNAPSHOT]: Marking scene {0} as stale.", scene.RegionInfo.RegionName); + m_snapStore.ForceSceneStale(scene); } public void Close() { + if (!m_enabled) + return; + if (m_enabled && m_dataServices != "" && m_dataServices != "noservices") NotifyDataServices(m_dataServices, "offline"); } - public bool IsSharedModule - { - get { return true; } - } - public string Name { get { return "External Data Generator"; } } - public void PostInitialise() + public Type ReplaceableInterface { - + get { return null; } } #endregion @@ -399,35 +443,7 @@ namespace OpenSim.Region.DataSnapshot m_snapStore.ForceSceneStale(scene); } } - #endregion - public void OnSimRestart(RegionInfo thisRegion) - { - m_log.Info("[DATASNAPSHOT]: Region " + thisRegion.RegionName + " is restarting, removing from indexing"); - Scene restartedScene = SceneForUUID(thisRegion.RegionID); - - m_scenes.Remove(restartedScene); - m_snapStore.RemoveScene(restartedScene); - - //Getting around the fact that we can't remove objects from a collection we are enumerating over - List providersToRemove = new List(); - - foreach (IDataSnapshotProvider provider in m_dataproviders) - { - if (provider.GetParentScene == restartedScene) - { - providersToRemove.Add(provider); - } - } - - foreach (IDataSnapshotProvider provider in providersToRemove) - { - m_dataproviders.Remove(provider); - m_snapStore.RemoveProvider(provider); - } - - m_snapStore.RemoveScene(restartedScene); - } } } diff --git a/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshot.cs b/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshot.cs index 59cdab90db..3b3db6540d 100644 --- a/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshot.cs @@ -32,6 +32,5 @@ namespace OpenSim.Region.DataSnapshot.Interfaces public interface IDataSnapshot { XmlDocument GetSnapshot(string regionName); - void MakeEverythingStale(); } } From e10d61ea8cde802b925db54c6717ada718db49db Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 10 Nov 2012 11:59:08 -0800 Subject: [PATCH 20/71] One more module converted: CloudModule. --- .../Resources/CoreModulePlugin.addin.xml | 1 + .../CoreModules/World/Cloud/CloudModule.cs | 53 +++++++++++-------- .../Framework/Interfaces/ICloudModule.cs | 2 +- 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index 820f11baf9..81f1ff61a4 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -44,6 +44,7 @@ + diff --git a/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs b/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs index 5fa3dc2191..2ec6ff91c1 100644 --- a/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs +++ b/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs @@ -35,7 +35,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules { - public class CloudModule : ICloudModule + public class CloudModule : ICloudModule, INonSharedRegionModule { // private static readonly log4net.ILog m_log // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); @@ -48,7 +48,7 @@ namespace OpenSim.Region.CoreModules private float m_cloudDensity = 1.0F; private float[] cloudCover = new float[16 * 16]; - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { IConfig cloudConfig = config.Configs["Cloud"]; @@ -59,21 +59,40 @@ namespace OpenSim.Region.CoreModules m_frameUpdateRate = cloudConfig.GetInt("cloud_update_rate", 1000); } - if (m_enabled) - { + } - m_scene = scene; + public void AddRegion(Scene scene) + { + if (!m_enabled) + return; - scene.EventManager.OnNewClient += CloudsToClient; - scene.RegisterModuleInterface(this); - scene.EventManager.OnFrame += CloudUpdate; + m_scene = scene; - GenerateCloudCover(); + scene.EventManager.OnNewClient += CloudsToClient; + scene.RegisterModuleInterface(this); + scene.EventManager.OnFrame += CloudUpdate; - m_ready = true; + GenerateCloudCover(); - } + m_ready = true; + } + public void RemoveRegion(Scene scene) + { + if (!m_enabled) + return; + + m_ready = false; + // Remove our hooks + m_scene.EventManager.OnNewClient -= CloudsToClient; + m_scene.EventManager.OnFrame -= CloudUpdate; + m_scene.UnregisterModuleInterface(this); + + m_scene = null; + } + + public void RegionLoaded(Scene scene) + { } public void PostInitialise() @@ -82,13 +101,6 @@ namespace OpenSim.Region.CoreModules public void Close() { - if (m_enabled) - { - m_ready = false; - // Remove our hooks - m_scene.EventManager.OnNewClient -= CloudsToClient; - m_scene.EventManager.OnFrame -= CloudUpdate; - } } public string Name @@ -96,12 +108,11 @@ namespace OpenSim.Region.CoreModules get { return "CloudModule"; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return false; } + get { return null; } } - public float CloudCover(int x, int y, int z) { float cover = 0f; diff --git a/OpenSim/Region/Framework/Interfaces/ICloudModule.cs b/OpenSim/Region/Framework/Interfaces/ICloudModule.cs index 7296ac3ef5..54172bd22f 100644 --- a/OpenSim/Region/Framework/Interfaces/ICloudModule.cs +++ b/OpenSim/Region/Framework/Interfaces/ICloudModule.cs @@ -27,7 +27,7 @@ namespace OpenSim.Region.Framework.Interfaces { - public interface ICloudModule : IRegionModule + public interface ICloudModule { /// /// Retrieves the cloud density at the given region coordinates From 5fb5758103c46de2abbc50b6503706eadcd37bfd Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 10 Nov 2012 15:54:11 -0800 Subject: [PATCH 21/71] Cleaning up some confusion with Addin names introduced in a prior commit. Also the Flotsam cache module was being given a different Addin name, I removed that. --- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 4 ++-- OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 8aa173ab2b..b77bc59afc 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -49,8 +49,8 @@ using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; -[assembly: Addin("FlotsamAssetCache", "1.1")] -[assembly: AddinDependency("OpenSim", "0.5")] +//[assembly: Addin("FlotsamAssetCache", "1.1")] +//[assembly: AddinDependency("OpenSim", "0.5")] namespace OpenSim.Region.CoreModules.Asset { diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index defbadc0ae..979454922c 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs @@ -42,7 +42,7 @@ using OpenSim.Region.DataSnapshot.Interfaces; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -[assembly: Addin("LindenCaps", "0.1")] +[assembly: Addin("DataSnapshot", "0.1")] [assembly: AddinDependency("OpenSim", "0.5")] namespace OpenSim.Region.DataSnapshot From 74dd38db70e88c5bf771774b6cc2ec80ab2ba215 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 10 Nov 2012 16:24:15 -0800 Subject: [PATCH 22/71] One more module converted: AvatarFactoryModule. --- .../AvatarFactory/AvatarFactoryModule.cs | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index b5b00825f4..c3e4679f61 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -39,9 +39,12 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; +using Mono.Addins; + namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { - public class AvatarFactoryModule : IAvatarFactoryModule, IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class AvatarFactoryModule : IAvatarFactoryModule, INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -61,10 +64,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory #region IRegionModule - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { - scene.RegisterModuleInterface(this); - scene.EventManager.OnNewClient += SubscribeToClientEvents; IConfig appearanceConfig = config.Configs["Appearance"]; if (appearanceConfig != null) @@ -74,11 +75,29 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory // m_log.InfoFormat("[AVFACTORY] configured for {0} save and {1} send",m_savetime,m_sendtime); } - if (m_scene == null) - m_scene = scene; } - public void PostInitialise() + public void AddRegion(Scene scene) + { + if (m_scene == null) + m_scene = scene; + + scene.RegisterModuleInterface(this); + scene.EventManager.OnNewClient += SubscribeToClientEvents; + } + + public void RemoveRegion(Scene scene) + { + if (scene == m_scene) + { + scene.UnregisterModuleInterface(this); + scene.EventManager.OnNewClient -= SubscribeToClientEvents; + } + + m_scene = null; + } + + public void RegionLoaded(Scene scene) { m_updateTimer.Enabled = false; m_updateTimer.AutoReset = true; @@ -100,6 +119,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory get { return false; } } + public Type ReplaceableInterface + { + get { return null; } + } + + private void SubscribeToClientEvents(IClientAPI client) { client.OnRequestWearables += Client_OnRequestWearables; From fe2fa70c74b1806df237f92be633a1552e8b9548 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 10 Nov 2012 16:42:52 -0800 Subject: [PATCH 23/71] One more module converted: Combat/CombatModule. --- .../CoreModules/Avatar/Combat/CombatModule.cs | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 3a9146557d..c1a22bf931 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs @@ -33,9 +33,12 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenMetaverse; +using Mono.Addins; + namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule { - public class CombatModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class CombatModule : ISharedRegionModule { //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -54,7 +57,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule /// /// /// - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) + { + } + + public void AddRegion(Scene scene) { lock (m_scenel) { @@ -72,6 +79,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; } + public void RemoveRegion(Scene scene) + { + if (m_scenel.ContainsKey(scene.RegionInfo.RegionHandle)) + m_scenel.Remove(scene.RegionInfo.RegionHandle); + + scene.EventManager.OnAvatarKilled -= KillAvatar; + scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel; + } + + public void RegionLoaded(Scene scene) + { + } + public void PostInitialise() { } @@ -85,11 +105,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule get { return "CombatModule"; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return true; } + get { return null; } } + private void KillAvatar(uint killerObjectLocalID, ScenePresence deadAvatar) { string deadAvatarMessage; From a87c4c7d8924138896ab93828cd8e7d8442fbaf7 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sun, 11 Nov 2012 00:21:10 +0000 Subject: [PATCH 24/71] Converting WorldCommModule to INonSharedRegionModule Signed-off-by: Diva Canto --- .../Scripting/WorldComm/WorldCommModule.cs | 38 +++++++++++++------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs index 401ff6cdef..2c26e63b94 100644 --- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs @@ -30,6 +30,7 @@ using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; using Nini.Config; +using Mono.Addins; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; @@ -86,7 +87,8 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Scripting.WorldComm { - public class WorldCommModule : IRegionModule, IWorldComm + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class WorldCommModule : IWorldComm, INonSharedRegionModule { // private static readonly ILog m_log = // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -99,9 +101,9 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm private int m_saydistance = 20; private int m_shoutdistance = 100; - #region IRegionModule Members + #region INonSharedRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { // wrap this in a try block so that defaults will work if // the config file doesn't specify otherwise. @@ -120,12 +122,7 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm } if (maxlisteners < 1) maxlisteners = int.MaxValue; if (maxhandles < 1) maxhandles = int.MaxValue; - - m_scene = scene; - m_scene.RegisterModuleInterface(this); m_listenerManager = new ListenerManager(maxlisteners, maxhandles); - m_scene.EventManager.OnChatFromClient += DeliverClientMessage; - m_scene.EventManager.OnChatBroadcast += DeliverClientMessage; m_pendingQ = new Queue(); m_pending = Queue.Synchronized(m_pendingQ); } @@ -134,6 +131,26 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm { } + public void AddRegion(Scene scene) + { + m_scene = scene; + m_scene.RegisterModuleInterface(this); + m_scene.EventManager.OnChatFromClient += DeliverClientMessage; + m_scene.EventManager.OnChatBroadcast += DeliverClientMessage; + } + + public void RegionLoaded(Scene scene) { } + + public void RemoveRegion(Scene scene) + { + if (scene != m_scene) + return; + + m_scene.UnregisterModuleInterface(this); + m_scene.EventManager.OnChatBroadcast -= DeliverClientMessage; + m_scene.EventManager.OnChatBroadcast -= DeliverClientMessage; + } + public void Close() { } @@ -143,10 +160,7 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm get { return "WorldCommModule"; } } - public bool IsSharedModule - { - get { return false; } - } + public Type ReplaceableInterface { get { return null; } } #endregion From b3dddd7447c42a60f1e4a2452e6a6c6dbe9d5618 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sun, 11 Nov 2012 00:38:27 +0000 Subject: [PATCH 25/71] document & 80-character width terminal formatting Signed-off-by: Diva Canto --- .../Scripting/WorldComm/WorldCommModule.cs | 170 ++++++++++++------ 1 file changed, 114 insertions(+), 56 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs index 2c26e63b94..c88be8286e 100644 --- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs @@ -29,9 +29,12 @@ using System; using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; + using Nini.Config; using Mono.Addins; + using OpenMetaverse; + using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -111,11 +114,16 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm int maxhandles = 64; try { - m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance); - m_saydistance = config.Configs["Chat"].GetInt("say_distance", m_saydistance); - m_shoutdistance = config.Configs["Chat"].GetInt("shout_distance", m_shoutdistance); - maxlisteners = config.Configs["LL-Functions"].GetInt("max_listens_per_region", maxlisteners); - maxhandles = config.Configs["LL-Functions"].GetInt("max_listens_per_script", maxhandles); + m_whisperdistance = config.Configs["Chat"].GetInt( + "whisper_distance", m_whisperdistance); + m_saydistance = config.Configs["Chat"].GetInt( + "say_distance", m_saydistance); + m_shoutdistance = config.Configs["Chat"].GetInt( + "shout_distance", m_shoutdistance); + maxlisteners = config.Configs["LL-Functions"].GetInt( + "max_listens_per_region", maxlisteners); + maxhandles = config.Configs["LL-Functions"].GetInt( + "max_listens_per_script", maxhandles); } catch (Exception) { @@ -269,7 +277,7 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm if ((source = m_scene.GetSceneObjectPart(id)) != null) position = source.AbsolutePosition; - else if ((avatar = m_scene.GetScenePresence(id)) != null) + else if ((avatar = m_scene.GetScenePresence(id)) != null) position = avatar.AbsolutePosition; else if (ChatTypeEnum.Region == type) position = CenterOfRegion; @@ -292,7 +300,8 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm /// name of sender (object or avatar) /// key of sender (object or avatar) /// msg to sent - public void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg, Vector3 position) + public void DeliverMessage(ChatTypeEnum type, int channel, + string name, UUID id, string msg, Vector3 position) { // m_log.DebugFormat("[WorldComm] got[2] type {0}, channel {1}, name {2}, id {3}, msg {4}", // type, channel, name, id, msg); @@ -300,17 +309,21 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm // Determine which listen event filters match the given set of arguments, this results // in a limited set of listeners, each belonging a host. If the host is in range, add them // to the pending queue. - foreach (ListenerInfo li in m_listenerManager.GetListeners(UUID.Zero, channel, name, id, msg)) + foreach (ListenerInfo li + in m_listenerManager.GetListeners(UUID.Zero, channel, + name, id, msg)) { // Dont process if this message is from yourself! if (li.GetHostID().Equals(id)) continue; - SceneObjectPart sPart = m_scene.GetSceneObjectPart(li.GetHostID()); + SceneObjectPart sPart = m_scene.GetSceneObjectPart( + li.GetHostID()); if (sPart == null) continue; - double dis = Util.GetDistanceTo(sPart.AbsolutePosition, position); + double dis = Util.GetDistanceTo(sPart.AbsolutePosition, + position); switch (type) { case ChatTypeEnum.Whisper: @@ -353,14 +366,16 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm /// /// Message. /// - public void DeliverMessageTo(UUID target, int channel, Vector3 pos, string name, UUID id, string msg) + public void DeliverMessageTo(UUID target, int channel, Vector3 pos, + string name, UUID id, string msg) { // Is id an avatar? ScenePresence sp = m_scene.GetScenePresence(target); if (sp != null) { - // ignore if a child agent this is restricted to inside one region + // ignore if a child agent this is restricted to inside one + // region if (sp.IsChildAgent) return; @@ -369,8 +384,9 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm // non zero channel messages only go to the attachments if (channel == 0) { - m_scene.SimChatToAgent(target, Utils.StringToBytes(msg), pos, name, id, false); - } + m_scene.SimChatToAgent(target, Utils.StringToBytes(msg), + pos, name, id, false); + } else { List attachments = sp.GetAttachments(); @@ -386,13 +402,18 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm } // Need to check each attachment - foreach (ListenerInfo li in m_listenerManager.GetListeners(UUID.Zero, channel, name, id, msg)) + foreach (ListenerInfo li + in m_listenerManager.GetListeners(UUID.Zero, + channel, name, id, msg)) { if (li.GetHostID().Equals(id)) continue; - if (m_scene.GetSceneObjectPart(li.GetHostID()) == null) + if (m_scene.GetSceneObjectPart( + li.GetHostID()) == null) + { continue; + } if (targets.Contains(li.GetHostID())) QueueMessage(new ListenerInfo(li, name, id, msg)); @@ -403,17 +424,20 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm } // No avatar found so look for an object - foreach (ListenerInfo li in m_listenerManager.GetListeners(UUID.Zero, channel, name, id, msg)) + foreach (ListenerInfo li + in m_listenerManager.GetListeners(UUID.Zero, channel, + name, id, msg)) { // Dont process if this message is from yourself! if (li.GetHostID().Equals(id)) continue; - SceneObjectPart sPart = m_scene.GetSceneObjectPart(li.GetHostID()); + SceneObjectPart sPart = m_scene.GetSceneObjectPart( + li.GetHostID()); if (sPart == null) continue; - if ( li.GetHostID().Equals(target)) + if (li.GetHostID().Equals(target)) { QueueMessage(new ListenerInfo(li, name, id, msg)); break; @@ -467,9 +491,15 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm private void DeliverClientMessage(Object sender, OSChatMessage e) { if (null != e.Sender) - DeliverMessage(e.Type, e.Channel, e.Sender.Name, e.Sender.AgentId, e.Message, e.Position); + { + DeliverMessage(e.Type, e.Channel, e.Sender.Name, + e.Sender.AgentId, e.Message, e.Position); + } else - DeliverMessage(e.Type, e.Channel, e.From, UUID.Zero, e.Message, e.Position); + { + DeliverMessage(e.Type, e.Channel, e.From, UUID.Zero, + e.Message, e.Position); + } } public Object[] GetSerializationData(UUID itemID) @@ -486,7 +516,8 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm public class ListenerManager { - private Dictionary> m_listeners = new Dictionary>(); + private Dictionary> m_listeners = + new Dictionary>(); private int m_maxlisteners; private int m_maxhandles; private int m_curlisteners; @@ -544,14 +575,15 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm itemID, hostID, channel, name, id, msg, regexBitfield); - List listeners; - if (!m_listeners.TryGetValue(channel,out listeners)) - { - listeners = new List(); - m_listeners.Add(channel, listeners); - } - listeners.Add(li); - m_curlisteners++; + List listeners; + if (!m_listeners.TryGetValue( + channel, out listeners)) + { + listeners = new List(); + m_listeners.Add(channel, listeners); + } + listeners.Add(li); + m_curlisteners++; return newHandle; } @@ -564,11 +596,13 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm { lock (m_listeners) { - foreach (KeyValuePair> lis in m_listeners) + foreach (KeyValuePair> lis + in m_listeners) { foreach (ListenerInfo li in lis.Value) { - if (li.GetItemID().Equals(itemID) && li.GetHandle().Equals(handle)) + if (li.GetItemID().Equals(itemID) && + li.GetHandle().Equals(handle)) { lis.Value.Remove(li); if (lis.Value.Count == 0) @@ -591,13 +625,15 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm lock (m_listeners) { - foreach (KeyValuePair> lis in m_listeners) + foreach (KeyValuePair> lis + in m_listeners) { foreach (ListenerInfo li in lis.Value) { if (li.GetItemID().Equals(itemID)) { - // store them first, else the enumerated bails on us + // store them first, else the enumerated bails on + // us removedListeners.Add(li); } } @@ -624,11 +660,13 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm { lock (m_listeners) { - foreach (KeyValuePair> lis in m_listeners) + foreach (KeyValuePair> lis + in m_listeners) { foreach (ListenerInfo li in lis.Value) { - if (li.GetItemID().Equals(itemID) && li.GetHandle() == handle) + if (li.GetItemID().Equals(itemID) && + li.GetHandle() == handle) { li.Activate(); // only one, bail out @@ -643,11 +681,13 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm { lock (m_listeners) { - foreach (KeyValuePair> lis in m_listeners) + foreach (KeyValuePair> lis + in m_listeners) { foreach (ListenerInfo li in lis.Value) { - if (li.GetItemID().Equals(itemID) && li.GetHandle() == handle) + if (li.GetItemID().Equals(itemID) && + li.GetHandle() == handle) { li.Deactivate(); // only one, bail out @@ -658,19 +698,24 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm } } - // non-locked access, since its always called in the context of the lock + /// + /// non-locked access, since its always called in the context of the + /// lock + /// + /// + /// private int GetNewHandle(UUID itemID) { List handles = new List(); // build a list of used keys for this specific itemID... - foreach (KeyValuePair> lis in m_listeners) + foreach (KeyValuePair> lis in m_listeners) { - foreach (ListenerInfo li in lis.Value) - { - if (li.GetItemID().Equals(itemID)) - handles.Add(li.GetHandle()); - } + foreach (ListenerInfo li in lis.Value) + { + if (li.GetItemID().Equals(itemID)) + handles.Add(li.GetHandle()); + } } // Note: 0 is NOT a valid handle for llListen() to return @@ -709,7 +754,7 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm lock (m_listeners) { List listeners; - if (!m_listeners.TryGetValue(channel,out listeners)) + if (!m_listeners.TryGetValue(channel, out listeners)) { return collection; } @@ -720,7 +765,8 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm { continue; } - if (!itemID.Equals(UUID.Zero) && !li.GetItemID().Equals(itemID)) + if (!itemID.Equals(UUID.Zero) && + !li.GetItemID().Equals(itemID)) { continue; } @@ -785,11 +831,14 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm lock (m_listeners) { if (!m_listeners.ContainsKey((int)item[2])) - m_listeners.Add((int)item[2], new List()); + { + m_listeners.Add((int)item[2], + new List()); + } m_listeners[(int)item[2]].Add(info); } - idx+=dataItemLength; + idx += dataItemLength; } } } @@ -820,17 +869,23 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm message, regexBitfield); } - public ListenerInfo(ListenerInfo li, string name, UUID id, string message) + public ListenerInfo(ListenerInfo li, string name, UUID id, + string message) { - Initialise(li.m_handle, li.m_localID, li.m_itemID, li.m_hostID, li.m_channel, name, id, message, 0); + Initialise(li.m_handle, li.m_localID, li.m_itemID, li.m_hostID, + li.m_channel, name, id, message, 0); } - public ListenerInfo(ListenerInfo li, string name, UUID id, string message, int regexBitfield) + public ListenerInfo(ListenerInfo li, string name, UUID id, + string message, int regexBitfield) { - Initialise(li.m_handle, li.m_localID, li.m_itemID, li.m_hostID, li.m_channel, name, id, message, regexBitfield); + Initialise(li.m_handle, li.m_localID, li.m_itemID, li.m_hostID, + li.m_channel, name, id, message, regexBitfield); } - private void Initialise(int handle, uint localID, UUID ItemID, UUID hostID, int channel, string name, UUID id, string message, int regexBitfield) + private void Initialise(int handle, uint localID, UUID ItemID, + UUID hostID, int channel, string name, UUID id, + string message, int regexBitfield) { m_active = true; m_handle = handle; @@ -859,9 +914,12 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm return data; } - public static ListenerInfo FromData(uint localID, UUID ItemID, UUID hostID, Object[] data) + public static ListenerInfo FromData(uint localID, UUID ItemID, + UUID hostID, Object[] data) { - ListenerInfo linfo = new ListenerInfo((int)data[1], localID, ItemID, hostID, (int)data[2], (string)data[3], (UUID)data[4], (string)data[5]); + ListenerInfo linfo = new ListenerInfo((int)data[1], localID, + ItemID, hostID, (int)data[2], (string)data[3], + (UUID)data[4], (string)data[5]); linfo.m_active = (bool)data[0]; if (data.Length >= 7) { From d5f9f5c9c347f6d858bf91de87a5ba71ba06082a Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sun, 11 Nov 2012 00:39:10 +0000 Subject: [PATCH 26/71] document, 80-character width terminal formatting converting comments to documentation for IDE & doxygen goodness Signed-off-by: Diva Canto --- .../Scripting/WorldComm/WorldCommModule.cs | 78 +++++++++++++++---- 1 file changed, 64 insertions(+), 14 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs index c88be8286e..2d2ea2f14b 100644 --- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs @@ -744,10 +744,23 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm #endregion - // Theres probably a more clever and efficient way to - // do this, maybe with regex. - // PM2008: Ha, one could even be smart and define a specialized Enumerator. - public List GetListeners(UUID itemID, int channel, string name, UUID id, string msg) + /// + /// Get listeners matching the input parameters. + /// + /// + /// Theres probably a more clever and efficient way to do this, maybe + /// with regex. + /// PM2008: Ha, one could even be smart and define a specialized + /// Enumerator. + /// + /// + /// + /// + /// + /// + /// + public List GetListeners(UUID itemID, int channel, + string name, UUID id, string msg) { List collection = new List(); @@ -845,17 +858,54 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm public class ListenerInfo : IWorldCommListenerInfo { - private bool m_active; // Listener is active or not - private int m_handle; // Assigned handle of this listener - private uint m_localID; // Local ID from script engine - private UUID m_itemID; // ID of the host script engine - private UUID m_hostID; // ID of the host/scene part - private int m_channel; // Channel - private UUID m_id; // ID to filter messages from - private string m_name; // Object name to filter messages from - private string m_message; // The message + /// + /// Listener is active or not + /// + private bool m_active; - public ListenerInfo(int handle, uint localID, UUID ItemID, UUID hostID, int channel, string name, UUID id, string message) + /// + /// Assigned handle of this listener + /// + private int m_handle; + + /// + /// Local ID from script engine + /// + private uint m_localID; + + /// + /// ID of the host script engine + /// + private UUID m_itemID; + + /// + /// ID of the host/scene part + /// + private UUID m_hostID; + + /// + /// Channel + /// + private int m_channel; + + /// + /// ID to filter messages from + /// + private UUID m_id; + + /// + /// Object name to filter messages from + /// + private string m_name; + + /// + /// The message + /// + private string m_message; + + public ListenerInfo(int handle, uint localID, UUID ItemID, + UUID hostID, int channel, string name, UUID id, + string message) { Initialise(handle, localID, ItemID, hostID, channel, name, id, message, 0); From cdcb67a952610e155ff4c385d954be22c16ce159 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 10 Nov 2012 17:21:09 -0800 Subject: [PATCH 27/71] One more module converted: GesturesModule. --- .../Avatar/Gestures/GesturesModule.cs | 33 +++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs index 7df2beb5df..de70dba30c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Reflection; using log4net; using Nini.Config; @@ -35,26 +36,46 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; +using Mono.Addins; + namespace OpenSim.Region.CoreModules.Avatar.Gestures { - public class GesturesModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class GesturesModule : INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected Scene m_scene; - public void Initialise(Scene scene, IConfigSource source) + public void Initialise(IConfigSource source) + { + } + + public void AddRegion(Scene scene) { m_scene = scene; - + m_scene.EventManager.OnNewClient += OnNewClient; } + + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + m_scene.EventManager.OnNewClient -= OnNewClient; + m_scene = null; + } - public void PostInitialise() {} public void Close() {} public string Name { get { return "Gestures Module"; } } - public bool IsSharedModule { get { return false; } } - + + public Type ReplaceableInterface + { + get { return null; } + } + private void OnNewClient(IClientAPI client) { client.OnActivateGesture += ActivateGesture; From 562c585bc6fb1e659ab395089cf497a390f03b33 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 10 Nov 2012 17:34:42 -0800 Subject: [PATCH 28/71] One more module converted: GodsModule. --- .../CoreModules/Avatar/Gods/GodsModule.cs | 68 +++++++++++++------ OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 6 +- 2 files changed, 52 insertions(+), 22 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs index 81ce2688d3..2d3585ac69 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Collections.Generic; using Nini.Config; using OpenMetaverse; @@ -32,29 +33,59 @@ using OpenSim.Framework; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Interfaces; +using Mono.Addins; + namespace OpenSim.Region.CoreModules.Avatar.Gods { - public class GodsModule : IRegionModule, IGodsModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class GodsModule : INonSharedRegionModule, IGodsModule { /// Special UUID for actions that apply to all agents private static readonly UUID ALL_AGENTS = new UUID("44e87126-e794-4ded-05b3-7c42da3d5cdb"); protected Scene m_scene; protected IDialogModule m_dialogModule; - - public void Initialise(Scene scene, IConfigSource source) + protected IDialogModule DialogModule + { + get + { + if (m_dialogModule == null) + m_dialogModule = m_scene.RequestModuleInterface(); + + return m_dialogModule; + } + } + + public void Initialise(IConfigSource source) + { + } + + public void AddRegion(Scene scene) { m_scene = scene; - m_dialogModule = m_scene.RequestModuleInterface(); m_scene.RegisterModuleInterface(this); m_scene.EventManager.OnNewClient += SubscribeToClientEvents; } - - public void PostInitialise() {} + + public void RemoveRegion(Scene scene) + { + m_scene.UnregisterModuleInterface(this); + m_scene.EventManager.OnNewClient -= SubscribeToClientEvents; + m_scene = null; + } + + public void RegionLoaded(Scene scene) + { + } + public void Close() {} public string Name { get { return "Gods Module"; } } - public bool IsSharedModule { get { return false; } } - + + public Type ReplaceableInterface + { + get { return null; } + } + public void SubscribeToClientEvents(IClientAPI client) { client.OnGodKickUser += KickUser; @@ -96,8 +127,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods } else { - if (m_dialogModule != null) - m_dialogModule.SendAlertToUser(agentID, "Request for god powers denied"); + if (DialogModule != null) + DialogModule.SendAlertToUser(agentID, "Request for god powers denied"); } } } @@ -121,7 +152,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods if (sp != null || agentID == kickUserID) { - m_dialogModule = m_scene.RequestModuleInterface(); if (m_scene.Permissions.IsGod(godID)) { if (kickflags == 0) @@ -163,27 +193,27 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods if (kickflags == 1) { sp.AllowMovement = false; - if (m_dialogModule != null) + if (DialogModule != null) { - m_dialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason)); - m_dialogModule.SendAlertToUser(godID, "User Frozen"); + DialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason)); + DialogModule.SendAlertToUser(godID, "User Frozen"); } } if (kickflags == 2) { sp.AllowMovement = true; - if (m_dialogModule != null) + if (DialogModule != null) { - m_dialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason)); - m_dialogModule.SendAlertToUser(godID, "User Unfrozen"); + DialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason)); + DialogModule.SendAlertToUser(godID, "User Unfrozen"); } } } else { - if (m_dialogModule != null) - m_dialogModule.SendAlertToUser(godID, "Kick request denied"); + if (DialogModule != null) + DialogModule.SendAlertToUser(godID, "Kick request denied"); } } } diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index 6d67b67577..f9c1ac2656 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs @@ -141,9 +141,9 @@ namespace OpenSim.Tests.Common TestScene testScene = new TestScene( regInfo, m_acm, scs, m_simDataService, m_estateDataService, null, false, configSource, null); - IRegionModule godsModule = new GodsModule(); - godsModule.Initialise(testScene, new IniConfigSource()); - testScene.AddModule(godsModule.Name, godsModule); + INonSharedRegionModule godsModule = new GodsModule(); + godsModule.Initialise(new IniConfigSource()); + godsModule.AddRegion(testScene); // Add scene to services m_assetService.AddRegion(testScene); From 2ef00626644334091c16c38fb3262bcd6515ddc4 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 10 Nov 2012 17:48:04 -0800 Subject: [PATCH 29/71] One more module converted: XferModule. --- .../CoreModules/Agent/Xfer/XferModule.cs | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs index b8e2820db7..0ab5ed5160 100644 --- a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs +++ b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs @@ -35,9 +35,12 @@ using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using Mono.Addins; + namespace OpenSim.Region.CoreModules.Agent.Xfer { - public class XferModule : IRegionModule, IXfer + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class XferModule : INonSharedRegionModule, IXfer { private Scene m_scene; private Dictionary NewFiles = new Dictionary(); @@ -59,9 +62,13 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer public int Count; } - #region IRegionModule Members + #region INonSharedRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) + { + } + + public void AddRegion(Scene scene) { m_scene = scene; m_scene.EventManager.OnNewClient += NewClient; @@ -69,8 +76,21 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer m_scene.RegisterModuleInterface(this); } - public void PostInitialise() + public void RemoveRegion(Scene scene) { + m_scene.EventManager.OnNewClient -= NewClient; + + m_scene.UnregisterModuleInterface(this); + m_scene = null; + } + + public void RegionLoaded(Scene scene) + { + } + + public Type ReplaceableInterface + { + get { return null; } } public void Close() @@ -82,11 +102,6 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer get { return "XferModule"; } } - public bool IsSharedModule - { - get { return false; } - } - #endregion #region IXfer Members From 09deaa890d32319cdba715f41ea4e46722d19791 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 10 Nov 2012 17:56:25 -0800 Subject: [PATCH 30/71] One more module converted: GroupsModule. --- .../CoreModules/Avatar/Groups/GroupsModule.cs | 50 ++++++++++++++++--- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs index b258e13dce..27f94ea9db 100644 --- a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Collections.Generic; using System.Reflection; using log4net; @@ -34,9 +35,12 @@ using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using Mono.Addins; + namespace OpenSim.Region.CoreModules.Avatar.Groups { - public class GroupsModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class GroupsModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -55,9 +59,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups private static GroupMembershipData osGroup = new GroupMembershipData(); - #region IRegionModule Members + private bool m_Enabled = false; - public void Initialise(Scene scene, IConfigSource config) + #region ISharedRegionModule Members + + public void Initialise(IConfigSource config) { IConfig groupsConfig = config.Configs["Groups"]; @@ -67,7 +73,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups } else { - if (!groupsConfig.GetBoolean("Enabled", false)) + m_Enabled = groupsConfig.GetBoolean("Enabled", false); + if (!m_Enabled) { m_log.Info("[GROUPS]: Groups disabled in configuration"); return; @@ -77,6 +84,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups return; } + } + + public void AddRegion(Scene scene) + { + if (!m_Enabled) + return; + lock (m_SceneList) { if (!m_SceneList.Contains(scene)) @@ -96,7 +110,26 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups scene.EventManager.OnNewClient += OnNewClient; scene.EventManager.OnClientClosed += OnClientClosed; -// scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; + // scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; + } + + public void RemoveRegion(Scene scene) + { + if (!m_Enabled) + return; + + lock (m_SceneList) + { + if (m_SceneList.Contains(scene)) + m_SceneList.Remove(scene); + } + + scene.EventManager.OnNewClient -= OnNewClient; + scene.EventManager.OnClientClosed -= OnClientClosed; + } + + public void RegionLoaded(Scene scene) + { } public void PostInitialise() @@ -105,6 +138,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups public void Close() { + if (!m_Enabled) + return; + // m_log.Debug("[GROUPS]: Shutting down group module."); lock (m_ClientMap) @@ -123,9 +159,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups get { return "GroupsModule"; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return true; } + get { return null; } } #endregion From 79d51c27bb4a38040216b607eb0dac8e25167727 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 07:31:25 -0800 Subject: [PATCH 31/71] One more module converted: InventoryArchiverModule. --- .../Archiver/InventoryArchiverModule.cs | 39 +++++++++++++++---- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index fdba68220a..f5a146db5e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs @@ -39,20 +39,18 @@ using OpenSim.Framework.Console; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; +using Mono.Addins; namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { /// /// This module loads and saves OpenSimulator inventory archives /// - public class InventoryArchiverModule : IRegionModule, IInventoryArchiverModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class InventoryArchiverModule : ISharedRegionModule, IInventoryArchiverModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string Name { get { return "Inventory Archiver Module"; } } - - public bool IsSharedModule { get { return true; } } - /// /// Enable or disable checking whether the iar user is actually logged in /// @@ -99,9 +97,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver // public InventoryArchiverModule(bool disablePresenceChecks) // { // DisablePresenceChecks = disablePresenceChecks; -// } + // } - public void Initialise(Scene scene, IConfigSource source) + #region ISharedRegionModule + + public void Initialise(IConfigSource source) + { + } + + public void AddRegion(Scene scene) { if (m_scenes.Count == 0) { @@ -144,10 +148,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver m_scenes[scene.RegionInfo.RegionID] = scene; } - public void PostInitialise() {} + public void RemoveRegion(Scene scene) + { + } public void Close() {} + public void RegionLoaded(Scene scene) + { + } + + public void PostInitialise() + { + } + + public Type ReplaceableInterface + { + get { return null; } + } + + public string Name { get { return "Inventory Archiver Module"; } } + + #endregion + /// /// Trigger the inventory archive saved event. /// From f85d054bc6770ee133b6f86e4736432d555106e5 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 07:46:12 -0800 Subject: [PATCH 32/71] One more module converted: MonitorModule. --- .../Framework/Monitoring/MonitorModule.cs | 243 ++++++++++-------- 1 file changed, 133 insertions(+), 110 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs index e4115851af..d2198f1215 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs @@ -38,10 +38,12 @@ using OpenSim.Region.CoreModules.Framework.Monitoring.Alerts; using OpenSim.Region.CoreModules.Framework.Monitoring.Monitors; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using Mono.Addins; namespace OpenSim.Region.CoreModules.Framework.Monitoring { - public class MonitorModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class MonitorModule : INonSharedRegionModule { /// /// Is this module enabled? @@ -62,14 +64,14 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring private readonly List m_alerts = new List(); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - #region Implementation of IRegionModule - public MonitorModule() { Enabled = true; } - public void Initialise(Scene scene, IConfigSource source) + #region Implementation of INonSharedRegionModule + + public void Initialise(IConfigSource source) { IConfig cnfg = source.Configs["Monitoring"]; @@ -79,6 +81,13 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring if (!Enabled) return; + } + + public void AddRegion(Scene scene) + { + if (!Enabled) + return; + m_scene = scene; m_scene.AddCommand("General", this, "monitor report", @@ -89,101 +98,42 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring MainServer.Instance.AddHTTPHandler("/monitorstats/" + m_scene.RegionInfo.RegionID, StatsPage); MainServer.Instance.AddHTTPHandler( "/monitorstats/" + Uri.EscapeDataString(m_scene.RegionInfo.RegionName), StatsPage); + + AddMonitors(); } - public void DebugMonitors(string module, string[] args) - { - foreach (IMonitor monitor in m_staticMonitors) - { - MainConsole.Instance.OutputFormat( - "[MONITOR MODULE]: {0} reports {1} = {2}", - m_scene.RegionInfo.RegionName, monitor.GetFriendlyName(), monitor.GetFriendlyValue()); - } - - foreach (KeyValuePair tuple in m_scene.StatsReporter.GetExtraSimStats()) - { - MainConsole.Instance.OutputFormat( - "[MONITOR MODULE]: {0} reports {1} = {2}", - m_scene.RegionInfo.RegionName, tuple.Key, tuple.Value); - } - } - - public void TestAlerts() - { - foreach (IAlert alert in m_alerts) - { - alert.Test(); - } - } - - public Hashtable StatsPage(Hashtable request) - { - // If request was for a specific monitor - // eg url/?monitor=Monitor.Name - if (request.ContainsKey("monitor")) - { - string monID = (string) request["monitor"]; - - foreach (IMonitor monitor in m_staticMonitors) - { - string elemName = monitor.ToString(); - if (elemName.StartsWith(monitor.GetType().Namespace)) - elemName = elemName.Substring(monitor.GetType().Namespace.Length + 1); - - if (elemName == monID || monitor.ToString() == monID) - { - Hashtable ereply3 = new Hashtable(); - - ereply3["int_response_code"] = 404; // 200 OK - ereply3["str_response_string"] = monitor.GetValue().ToString(); - ereply3["content_type"] = "text/plain"; - - return ereply3; - } - } - - // FIXME: Arguably this should also be done with dynamic monitors but I'm not sure what the above code - // is even doing. Why are we inspecting the type of the monitor??? - - // No monitor with that name - Hashtable ereply2 = new Hashtable(); - - ereply2["int_response_code"] = 404; // 200 OK - ereply2["str_response_string"] = "No such monitor"; - ereply2["content_type"] = "text/plain"; - - return ereply2; - } - - string xml = ""; - foreach (IMonitor monitor in m_staticMonitors) - { - string elemName = monitor.GetName(); - xml += "<" + elemName + ">" + monitor.GetValue().ToString() + ""; -// m_log.DebugFormat("[MONITOR MODULE]: {0} = {1}", elemName, monitor.GetValue()); - } - - foreach (KeyValuePair tuple in m_scene.StatsReporter.GetExtraSimStats()) - { - xml += "<" + tuple.Key + ">" + tuple.Value + ""; - } - - xml += ""; - - Hashtable ereply = new Hashtable(); - - ereply["int_response_code"] = 200; // 200 OK - ereply["str_response_string"] = xml; - ereply["content_type"] = "text/xml"; - - return ereply; - } - - public void PostInitialise() + public void RemoveRegion(Scene scene) { if (!Enabled) return; + MainServer.Instance.RemoveHTTPHandler("GET", "/monitorstats/" + m_scene.RegionInfo.RegionID); + MainServer.Instance.RemoveHTTPHandler("GET", "/monitorstats/" + Uri.EscapeDataString(m_scene.RegionInfo.RegionName)); + m_scene = null; + } + + public void Close() + { + } + + public string Name + { + get { return "Region Health Monitoring Module"; } + } + + public void RegionLoaded(Scene scene) + { + } + + public Type ReplaceableInterface + { + get { return null; } + } + + #endregion + + public void AddMonitors() + { m_staticMonitors.Add(new AgentCountMonitor(m_scene)); m_staticMonitors.Add(new ChildAgentCountMonitor(m_scene)); m_staticMonitors.Add(new GCMemoryMonitor()); @@ -196,7 +146,7 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring m_staticMonitors.Add(new EventFrameMonitor(m_scene)); m_staticMonitors.Add(new LandFrameMonitor(m_scene)); m_staticMonitors.Add(new LastFrameTimeMonitor(m_scene)); - + m_staticMonitors.Add( new GenericMonitor( m_scene, @@ -357,25 +307,98 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring } } + public void DebugMonitors(string module, string[] args) + { + foreach (IMonitor monitor in m_staticMonitors) + { + MainConsole.Instance.OutputFormat( + "[MONITOR MODULE]: {0} reports {1} = {2}", + m_scene.RegionInfo.RegionName, monitor.GetFriendlyName(), monitor.GetFriendlyValue()); + } + + foreach (KeyValuePair tuple in m_scene.StatsReporter.GetExtraSimStats()) + { + MainConsole.Instance.OutputFormat( + "[MONITOR MODULE]: {0} reports {1} = {2}", + m_scene.RegionInfo.RegionName, tuple.Key, tuple.Value); + } + } + + public void TestAlerts() + { + foreach (IAlert alert in m_alerts) + { + alert.Test(); + } + } + + public Hashtable StatsPage(Hashtable request) + { + // If request was for a specific monitor + // eg url/?monitor=Monitor.Name + if (request.ContainsKey("monitor")) + { + string monID = (string) request["monitor"]; + + foreach (IMonitor monitor in m_staticMonitors) + { + string elemName = monitor.ToString(); + if (elemName.StartsWith(monitor.GetType().Namespace)) + elemName = elemName.Substring(monitor.GetType().Namespace.Length + 1); + + if (elemName == monID || monitor.ToString() == monID) + { + Hashtable ereply3 = new Hashtable(); + + ereply3["int_response_code"] = 404; // 200 OK + ereply3["str_response_string"] = monitor.GetValue().ToString(); + ereply3["content_type"] = "text/plain"; + + return ereply3; + } + } + + // FIXME: Arguably this should also be done with dynamic monitors but I'm not sure what the above code + // is even doing. Why are we inspecting the type of the monitor??? + + // No monitor with that name + Hashtable ereply2 = new Hashtable(); + + ereply2["int_response_code"] = 404; // 200 OK + ereply2["str_response_string"] = "No such monitor"; + ereply2["content_type"] = "text/plain"; + + return ereply2; + } + + string xml = ""; + foreach (IMonitor monitor in m_staticMonitors) + { + string elemName = monitor.GetName(); + xml += "<" + elemName + ">" + monitor.GetValue().ToString() + ""; +// m_log.DebugFormat("[MONITOR MODULE]: {0} = {1}", elemName, monitor.GetValue()); + } + + foreach (KeyValuePair tuple in m_scene.StatsReporter.GetExtraSimStats()) + { + xml += "<" + tuple.Key + ">" + tuple.Value + ""; + } + + xml += ""; + + Hashtable ereply = new Hashtable(); + + ereply["int_response_code"] = 200; // 200 OK + ereply["str_response_string"] = xml; + ereply["content_type"] = "text/xml"; + + return ereply; + } + void OnTriggerAlert(System.Type reporter, string reason, bool fatal) { m_log.Error("[Monitor] " + reporter.Name + " for " + m_scene.RegionInfo.RegionName + " reports " + reason + " (Fatal: " + fatal + ")"); } - - public void Close() - { - } - - public string Name - { - get { return "Region Health Monitoring Module"; } - } - - public bool IsSharedModule - { - get { return false; } - } - - #endregion + } } From d589a8bc0443049aab6f984d2eddde092f1f2d87 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 08:14:58 -0800 Subject: [PATCH 33/71] Deleted 2 obsolete modules: OGSRadmin and OpenGridProtocol. They were still IRegionModule's and they have been dead for a very long time, so no need to drag them along in this revamping of region modules. --- .../Region/CoreModules/InterGrid/OGSRadmin.cs | 150 -- .../InterGrid/OpenGridProtocolModule.cs | 1297 ----------------- 2 files changed, 1447 deletions(-) delete mode 100644 OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs delete mode 100644 OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs diff --git a/OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs b/OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs deleted file mode 100644 index 2cc0a0797f..0000000000 --- a/OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Net; -using System.Reflection; -using System.Text; -using log4net; -using Nini.Config; -using Nwc.XmlRpc; -using OpenMetaverse; -using OpenSim.Framework; -using OpenSim.Framework.Communications; -using OpenSim.Framework.Servers; -using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.Framework.Scenes; - -namespace OpenSim.Region.CoreModules.InterGrid -{ - public class OGSRadmin : IRegionModule - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private readonly List m_scenes = new List(); - private IConfigSource m_settings; - - #region Implementation of IRegionModuleBase - - public string Name - { - get { return "OGS Supporting RAdmin"; } - } - - - public void Initialise(IConfigSource source) - { - m_settings = source; - } - - public void Close() - { - - } - - public void AddRegion(Scene scene) - { - lock (m_scenes) - m_scenes.Add(scene); - } - - public void RemoveRegion(Scene scene) - { - lock (m_scenes) - m_scenes.Remove(scene); - } - - public void RegionLoaded(Scene scene) - { - - } - - public void PostInitialise() - { - if (m_settings.Configs["Startup"].GetBoolean("gridmode", false)) - { - MainServer.Instance.AddXmlRPCHandler("grid_message", GridWideMessage); - } - } - - #endregion - - #region IRegionModule - - public void Initialise(Scene scene, IConfigSource source) - { - m_settings = source; - - lock (m_scenes) - m_scenes.Add(scene); - } - - public bool IsSharedModule - { - get { return true; } - } - - #endregion - - public XmlRpcResponse GridWideMessage(XmlRpcRequest req, IPEndPoint remoteClient) - { - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable responseData = new Hashtable(); - - Hashtable requestData = (Hashtable)req.Params[0]; - - // REFACTORING PROBLEM. This authorization needs to be replaced with some other - //if ((!requestData.Contains("password") || (string)requestData["password"] != m_com.NetworkServersInfo.GridRecvKey)) - //{ - // responseData["accepted"] = false; - // responseData["success"] = false; - // responseData["error"] = "Invalid Key"; - // response.Value = responseData; - // return response; - //} - - string message = (string)requestData["message"]; - string user = (string)requestData["user"]; - m_log.InfoFormat("[RADMIN]: Broadcasting: {0}", message); - - lock (m_scenes) - foreach (Scene scene in m_scenes) - { - IDialogModule dialogModule = scene.RequestModuleInterface(); - if (dialogModule != null) - dialogModule.SendNotificationToUsersInRegion(UUID.Random(), user, message); - } - - responseData["accepted"] = true; - responseData["success"] = true; - response.Value = responseData; - - return response; - } - } -} diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs deleted file mode 100644 index 4a76b00467..0000000000 --- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs +++ /dev/null @@ -1,1297 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using System.IO; -using System.Net; -using System.Net.Security; -using System.Reflection; -using System.Security.Cryptography.X509Certificates; -using System.Threading; -using System.Web; -using log4net; -using Nini.Config; -using OpenMetaverse; -using OpenMetaverse.StructuredData; -using OpenSim.Framework; -using OpenSim.Framework.Capabilities; -using OpenSim.Framework.Monitoring; -using OpenSim.Framework.Servers; -using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.Framework.Scenes; -using Caps=OpenSim.Framework.Capabilities.Caps; -using OSDArray=OpenMetaverse.StructuredData.OSDArray; -using OSDMap=OpenMetaverse.StructuredData.OSDMap; - -namespace OpenSim.Region.CoreModules.InterGrid -{ - public struct OGPState - { - public string first_name; - public string last_name; - public UUID agent_id; - public UUID local_agent_id; - public UUID region_id; - public uint circuit_code; - public UUID secure_session_id; - public UUID session_id; - public bool agent_access; - public string sim_access; - public uint god_level; - public bool god_overide; - public bool identified; - public bool transacted; - public bool age_verified; - public bool allow_redirect; - public int limited_to_estate; - public string inventory_host; - public bool src_can_see_mainland; - public int src_estate_id; - public int src_version; - public int src_parent_estate_id; - public bool visible_to_parent; - public string teleported_into_region; - } - - public class OpenGridProtocolModule : IRegionModule - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private List m_scene = new List(); - - private Dictionary CapsLoginID = new Dictionary(); - private Dictionary m_OGPState = new Dictionary(); - private Dictionary m_loginToRegionState = new Dictionary(); - - - private string LastNameSuffix = "_EXTERNAL"; - private string FirstNamePrefix = ""; - private string httpsCN = ""; - private bool httpSSL = false; - private uint httpsslport = 0; -// private bool GridMode = false; - - #region IRegionModule Members - - public void Initialise(Scene scene, IConfigSource config) - { - bool enabled = false; - IConfig cfg = null; - IConfig httpcfg = null; -// IConfig startupcfg = null; - try - { - cfg = config.Configs["OpenGridProtocol"]; - } catch (NullReferenceException) - { - enabled = false; - } - - try - { - httpcfg = config.Configs["Network"]; - } - catch (NullReferenceException) - { - - } -// try -// { -// startupcfg = config.Configs["Startup"]; -// } -// catch (NullReferenceException) -// { -// -// } - -// if (startupcfg != null) -// { -// GridMode = enabled = startupcfg.GetBoolean("gridmode", false); -// } - - if (cfg != null) - { - enabled = cfg.GetBoolean("ogp_enabled", false); - LastNameSuffix = cfg.GetString("ogp_lastname_suffix", "_EXTERNAL"); - FirstNamePrefix = cfg.GetString("ogp_firstname_prefix", ""); - if (enabled) - { - m_log.Warn("[OGP]: Open Grid Protocol is on, Listening for Clients on /agent/"); - lock (m_scene) - { - if (m_scene.Count == 0) - { - MainServer.Instance.AddLLSDHandler("/agent/", ProcessAgentDomainMessage); - MainServer.Instance.AddLLSDHandler("/", ProcessRegionDomainSeed); - try - { - ServicePointManager.ServerCertificateValidationCallback += customXertificateValidation; - } - catch (NotImplementedException) - { - try - { -#pragma warning disable 0612, 0618 - // Mono does not implement the ServicePointManager.ServerCertificateValidationCallback yet! Don't remove this! - ServicePointManager.CertificatePolicy = new MonoCert(); -#pragma warning restore 0612, 0618 - } - catch (Exception) - { - m_log.Error("[OGP]: Certificate validation handler change not supported. You may get ssl certificate validation errors teleporting from your region to some SSL regions."); - } - } - - } - // can't pick the region 'agent' because it would conflict with our agent domain handler - // a zero length region name would conflict with are base region seed cap - if (!SceneListDuplicateCheck(scene.RegionInfo.RegionName) && scene.RegionInfo.RegionName.ToLower() != "agent" && scene.RegionInfo.RegionName.Length > 0) - { - MainServer.Instance.AddLLSDHandler( - "/" + HttpUtility.UrlPathEncode(scene.RegionInfo.RegionName.ToLower()), - ProcessRegionDomainSeed); - } - - if (!m_scene.Contains(scene)) - m_scene.Add(scene); - } - } - } - lock (m_scene) - { - if (m_scene.Count == 1) - { - if (httpcfg != null) - { - httpSSL = httpcfg.GetBoolean("http_listener_ssl", false); - httpsCN = httpcfg.GetString("http_listener_cn", scene.RegionInfo.ExternalHostName); - if (httpsCN.Length == 0) - httpsCN = scene.RegionInfo.ExternalHostName; - httpsslport = (uint)httpcfg.GetInt("http_listener_sslport",((int)scene.RegionInfo.HttpPort + 1)); - } - } - } - } - - public void PostInitialise() - { - } - - public void Close() - { - //scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel; - } - - public string Name - { - get { return "OpenGridProtocolModule"; } - } - - public bool IsSharedModule - { - get { return true; } - } - - #endregion - - public OSD ProcessRegionDomainSeed(string path, OSD request, string endpoint) - { - string[] pathSegments = path.Split('/'); - - if (pathSegments.Length <= 1) - { - return GenerateNoHandlerMessage(); - - } - - return GenerateRezAvatarRequestMessage(pathSegments[1]); - - - - //m_log.InfoFormat("[OGP]: path {0}, segments {1} segment[1] {2} Last segment {3}", - // path, pathSegments.Length, pathSegments[1], pathSegments[pathSegments.Length - 1]); - //return new OSDMap(); - - } - - public OSD ProcessAgentDomainMessage(string path, OSD request, string endpoint) - { - // /agent/* - - string[] pathSegments = path.Split('/'); - if (pathSegments.Length <= 1) - { - return GenerateNoHandlerMessage(); - - } - if (pathSegments[0].Length == 0 && pathSegments[1].Length == 0) - { - return GenerateRezAvatarRequestMessage(""); - } - m_log.InfoFormat("[OGP]: path {0}, segments {1} segment[1] {2} Last segment {3}", - path, pathSegments.Length, pathSegments[1], pathSegments[pathSegments.Length - 1]); - - switch (pathSegments[pathSegments.Length - 1]) - { - case "rez_avatar": - return RezAvatarMethod(path, request); - //break; - case "derez_avatar": - return DerezAvatarMethod(path, request); - //break; - - } - if (path.Length < 2) - { - return GenerateNoHandlerMessage(); - } - - switch (pathSegments[pathSegments.Length - 2] + "/" + pathSegments[pathSegments.Length - 1]) - { - case "rez_avatar/rez": - return RezAvatarMethod(path, request); - //break; - case "rez_avatar/request": - return RequestRezAvatarMethod(path, request); - case "rez_avatar/place": - return RequestRezAvatarMethod(path, request); - case "rez_avatar/derez": - return DerezAvatarMethod(path, request); - //break; - default: - return GenerateNoHandlerMessage(); - } - //return null; - } - - private OSD GenerateRezAvatarRequestMessage(string regionname) - { - Scene region = null; - bool usedroot = false; - - if (regionname.Length == 0) - { - region = GetRootScene(); - usedroot = true; - } - else - { - region = GetScene(HttpUtility.UrlDecode(regionname).ToLower()); - } - - // this shouldn't happen since we don't listen for a region that is down.. but - // it might if the region was taken down or is in the middle of restarting - - if (region == null) - { - region = GetRootScene(); - usedroot = true; - } - - UUID statekeeper = UUID.Random(); - - - - - RegionInfo reg = region.RegionInfo; - - OSDMap responseMap = new OSDMap(); - string rezHttpProtocol = "http://"; - //string regionCapsHttpProtocol = "http://"; - string httpaddr = reg.ExternalHostName; - string urlport = reg.HttpPort.ToString(); - string requestpath = "/agent/" + statekeeper + "/rez_avatar/request"; - - if (!usedroot) - { - lock (m_loginToRegionState) - { - if (!m_loginToRegionState.ContainsKey(requestpath)) - { - m_loginToRegionState.Add(requestpath, region.RegionInfo.RegionName.ToLower()); - } - } - } - - if (httpSSL) - { - rezHttpProtocol = "https://"; - //regionCapsHttpProtocol = "https://"; - urlport = httpsslport.ToString(); - - if (httpsCN.Length > 0) - httpaddr = httpsCN; - } - - responseMap["connect"] = OSD.FromBoolean(true); - OSDMap capabilitiesMap = new OSDMap(); - capabilitiesMap["rez_avatar/request"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + requestpath); - responseMap["capabilities"] = capabilitiesMap; - - return responseMap; - } - - // Using OpenSim.Framework.Capabilities.Caps here one time.. - // so the long name is probably better then a using statement - public void OnRegisterCaps(UUID agentID, Caps caps) - { - /* If we ever want to register our own caps here.... - * - string capsBase = "/CAPS/" + caps.CapsObjectPath; - caps.RegisterHandler("CAPNAME", - new RestStreamHandler("POST", capsBase + CAPSPOSTFIX!, - delegate(string request, string path, string param, - OSHttpRequest httpRequest, OSHttpResponse httpResponse) - { - return METHODHANDLER(request, path, param, - agentID, caps); - })); - - * - */ - } - - public OSD RequestRezAvatarMethod(string path, OSD request) - { - //m_log.Debug("[REQUESTREZAVATAR]: " + request.ToString()); - - OSDMap requestMap = (OSDMap)request; - - - Scene homeScene = null; - - lock (m_loginToRegionState) - { - if (m_loginToRegionState.ContainsKey(path)) - { - homeScene = GetScene(m_loginToRegionState[path]); - m_loginToRegionState.Remove(path); - - if (homeScene == null) - homeScene = GetRootScene(); - } - else - { - homeScene = GetRootScene(); - } - } - - // Homescene is still null, we must have no regions that are up - if (homeScene == null) - return GenerateNoHandlerMessage(); - - RegionInfo reg = homeScene.RegionInfo; - ulong regionhandle = GetOSCompatibleRegionHandle(reg); - //string RegionURI = reg.ServerURI; - //int RegionPort = (int)reg.HttpPort; - - UUID RemoteAgentID = requestMap["agent_id"].AsUUID(); - - // will be used in the future. The client always connects with the aditi agentid currently - UUID LocalAgentID = RemoteAgentID; - - string FirstName = requestMap["first_name"].AsString(); - string LastName = requestMap["last_name"].AsString(); - - FirstName = FirstNamePrefix + FirstName; - LastName = LastName + LastNameSuffix; - - OGPState userState = GetOGPState(LocalAgentID); - - userState.first_name = requestMap["first_name"].AsString(); - userState.last_name = requestMap["last_name"].AsString(); - userState.age_verified = requestMap["age_verified"].AsBoolean(); - userState.transacted = requestMap["transacted"].AsBoolean(); - userState.agent_access = requestMap["agent_access"].AsBoolean(); - userState.allow_redirect = requestMap["allow_redirect"].AsBoolean(); - userState.identified = requestMap["identified"].AsBoolean(); - userState.god_level = (uint)requestMap["god_level"].AsInteger(); - userState.sim_access = requestMap["sim_access"].AsString(); - userState.agent_id = RemoteAgentID; - userState.limited_to_estate = requestMap["limited_to_estate"].AsInteger(); - userState.src_can_see_mainland = requestMap["src_can_see_mainland"].AsBoolean(); - userState.src_estate_id = requestMap["src_estate_id"].AsInteger(); - userState.local_agent_id = LocalAgentID; - userState.teleported_into_region = reg.RegionName.ToLower(); - - UpdateOGPState(LocalAgentID, userState); - - OSDMap responseMap = new OSDMap(); - - if (RemoteAgentID == UUID.Zero) - { - responseMap["connect"] = OSD.FromBoolean(false); - responseMap["message"] = OSD.FromString("No agent ID was specified in rez_avatar/request"); - m_log.Error("[OGP]: rez_avatar/request failed because no avatar UUID was provided in the request body"); - return responseMap; - } - - responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName); - - // DEPRECATED - responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); - - responseMap["connect"] = OSD.FromBoolean(true); - responseMap["sim_port"] = OSD.FromInteger(reg.InternalEndPoint.Port); - responseMap["region_x"] = OSD.FromInteger(reg.RegionLocX * (uint)Constants.RegionSize); // LLX - responseMap["region_y"] = OSD.FromInteger(reg.RegionLocY * (uint)Constants.RegionSize); // LLY - responseMap["region_id"] = OSD.FromUUID(reg.originRegionID); - - if (reg.RegionSettings.Maturity == 1) - { - responseMap["sim_access"] = OSD.FromString("Mature"); - } - else if (reg.RegionSettings.Maturity == 2) - { - responseMap["sim_access"] = OSD.FromString("Adult"); - } - else - { - responseMap["sim_access"] = OSD.FromString("PG"); - } - - // Generate a dummy agent for the user so we can get back a CAPS path - AgentCircuitData agentData = new AgentCircuitData(); - agentData.AgentID = LocalAgentID; - agentData.BaseFolder = UUID.Zero; - agentData.CapsPath = CapsUtil.GetRandomCapsObjectPath(); - agentData.child = false; - agentData.circuitcode = (uint)(Util.RandomClass.Next()); - agentData.firstname = FirstName; - agentData.lastname = LastName; - agentData.SecureSessionID = UUID.Random(); - agentData.SessionID = UUID.Random(); - agentData.startpos = new Vector3(128f, 128f, 100f); - - // Pre-Fill our region cache with information on the agent. - UserAgentData useragent = new UserAgentData(); - useragent.AgentIP = "unknown"; - useragent.AgentOnline = true; - useragent.AgentPort = (uint)0; - useragent.Handle = regionhandle; - useragent.InitialRegion = reg.originRegionID; - useragent.LoginTime = Util.UnixTimeSinceEpoch(); - useragent.LogoutTime = 0; - useragent.Position = agentData.startpos; - useragent.Region = reg.originRegionID; - useragent.SecureSessionID = agentData.SecureSessionID; - useragent.SessionID = agentData.SessionID; - - UserProfileData userProfile = new UserProfileData(); - userProfile.AboutText = "OGP User"; - userProfile.CanDoMask = (uint)0; - userProfile.Created = Util.UnixTimeSinceEpoch(); - userProfile.CurrentAgent = useragent; - userProfile.CustomType = "OGP"; - userProfile.FirstLifeAboutText = "I'm testing OpenGrid Protocol"; - userProfile.FirstLifeImage = UUID.Zero; - userProfile.FirstName = agentData.firstname; - userProfile.GodLevel = 0; - userProfile.HomeLocation = agentData.startpos; - userProfile.HomeLocationX = agentData.startpos.X; - userProfile.HomeLocationY = agentData.startpos.Y; - userProfile.HomeLocationZ = agentData.startpos.Z; - userProfile.HomeLookAt = Vector3.Zero; - userProfile.HomeLookAtX = userProfile.HomeLookAt.X; - userProfile.HomeLookAtY = userProfile.HomeLookAt.Y; - userProfile.HomeLookAtZ = userProfile.HomeLookAt.Z; - userProfile.HomeRegion = reg.RegionHandle; - userProfile.HomeRegionID = reg.originRegionID; - userProfile.HomeRegionX = reg.RegionLocX; - userProfile.HomeRegionY = reg.RegionLocY; - userProfile.ID = agentData.AgentID; - userProfile.Image = UUID.Zero; - userProfile.LastLogin = Util.UnixTimeSinceEpoch(); - userProfile.Partner = UUID.Zero; - userProfile.PasswordHash = "$1$"; - userProfile.PasswordSalt = ""; - userProfile.SurName = agentData.lastname; - //userProfile.UserAssetURI = homeScene.CommsManager.NetworkServersInfo.AssetURL; - userProfile.UserFlags = 0; - //userProfile.UserInventoryURI = homeScene.CommsManager.NetworkServersInfo.InventoryURL; - userProfile.WantDoMask = 0; - userProfile.WebLoginKey = UUID.Random(); - - // !!! REFACTORING PROBLEM. This needs to be changed for 0.7 - // - //// Do caps registration - //// get seed capagentData.firstname = FirstName;agentData.lastname = LastName; - //if (homeScene.CommsManager.UserService.GetUserProfile(agentData.AgentID) == null && !GridMode) - //{ - // homeScene.CommsManager.UserAdminService.AddUser( - // agentData.firstname, agentData.lastname, CreateRandomStr(7), "", - // homeScene.RegionInfo.RegionLocX, homeScene.RegionInfo.RegionLocY, agentData.AgentID); - - // UserProfileData userProfile2 = homeScene.CommsManager.UserService.GetUserProfile(agentData.AgentID); - // if (userProfile2 != null) - // { - // userProfile = userProfile2; - // userProfile.AboutText = "OGP USER"; - // userProfile.FirstLifeAboutText = "OGP USER"; - // homeScene.CommsManager.UserService.UpdateUserProfile(userProfile); - // } - //} - - //// Stick our data in the cache so the region will know something about us - //homeScene.CommsManager.UserProfileCacheService.PreloadUserCache(userProfile); - - // Call 'new user' event handler - string reason; - if (!homeScene.NewUserConnection(agentData, (uint)TeleportFlags.ViaLogin, out reason)) - { - responseMap["connect"] = OSD.FromBoolean(false); - responseMap["message"] = OSD.FromString(String.Format("Connection refused: {0}", reason)); - m_log.ErrorFormat("[OGP]: rez_avatar/request failed: {0}", reason); - return responseMap; - } - - - //string raCap = string.Empty; - - UUID AvatarRezCapUUID = LocalAgentID; - string rezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar/rez"; - string derezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar/derez"; - // Get a reference to the user's cap so we can pull out the Caps Object Path - Caps userCap - = homeScene.CapsModule.GetCapsForUser(agentData.AgentID); - - string rezHttpProtocol = "http://"; - string regionCapsHttpProtocol = "http://"; - string httpaddr = reg.ExternalHostName; - string urlport = reg.HttpPort.ToString(); - - if (httpSSL) - { - rezHttpProtocol = "https://"; - regionCapsHttpProtocol = "https://"; - urlport = httpsslport.ToString(); - - if (httpsCN.Length > 0) - httpaddr = httpsCN; - } - - // DEPRECATED - responseMap["seed_capability"] - = OSD.FromString( - regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/" + CapsUtil.GetCapsSeedPath(userCap.CapsObjectPath)); - - // REPLACEMENT - responseMap["region_seed_capability"] - = OSD.FromString( - regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/" + CapsUtil.GetCapsSeedPath(userCap.CapsObjectPath)); - - responseMap["rez_avatar"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); - responseMap["rez_avatar/rez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); - responseMap["rez_avatar/derez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + derezAvatarPath); - - // Add the user to the list of CAPS that are outstanding. - // well allow the caps hosts in this dictionary - lock (CapsLoginID) - { - if (CapsLoginID.ContainsKey(rezAvatarPath)) - { - CapsLoginID[rezAvatarPath] = agentData; - - // This is a joke, if you didn't notice... It's so unlikely to happen, that I'll print this message if it does occur! - m_log.Error("[OGP]: Holy anomoly batman! Caps path already existed! All the UUID Duplication worries were founded!"); - } - else - { - CapsLoginID.Add(rezAvatarPath, agentData); - } - } - - //m_log.Debug("Response:" + responseMap.ToString()); - return responseMap; - } - - public OSD RezAvatarMethod(string path, OSD request) - { - m_log.WarnFormat("[REZAVATAR]: {0}", request.ToString()); - - OSDMap responseMap = new OSDMap(); - - AgentCircuitData userData = null; - - // Only people we've issued a cap can go further - if (TryGetAgentCircuitData(path,out userData)) - { - OSDMap requestMap = (OSDMap)request; - - // take these values to start. There's a few more - UUID SecureSessionID=requestMap["secure_session_id"].AsUUID(); - UUID SessionID = requestMap["session_id"].AsUUID(); - int circuitcode = requestMap["circuit_code"].AsInteger(); - OSDArray Parameter = new OSDArray(); - if (requestMap.ContainsKey("parameter")) - { - Parameter = (OSDArray)requestMap["parameter"]; - } - - //int version = 1; - int estateID = 1; - int parentEstateID = 1; - UUID regionID = UUID.Zero; - bool visibleToParent = true; - - for (int i = 0; i < Parameter.Count; i++) - { - OSDMap item = (OSDMap)Parameter[i]; -// if (item.ContainsKey("version")) -// { -// version = item["version"].AsInteger(); -// } - if (item.ContainsKey("estate_id")) - { - estateID = item["estate_id"].AsInteger(); - } - if (item.ContainsKey("parent_estate_id")) - { - parentEstateID = item["parent_estate_id"].AsInteger(); - - } - if (item.ContainsKey("region_id")) - { - regionID = item["region_id"].AsUUID(); - - } - if (item.ContainsKey("visible_to_parent")) - { - visibleToParent = item["visible_to_parent"].AsBoolean(); - } - } - //Update our Circuit data with the real values - userData.SecureSessionID = SecureSessionID; - userData.SessionID = SessionID; - - OGPState userState = GetOGPState(userData.AgentID); - - // Locate a home scene suitable for the user. - Scene homeScene = null; - - homeScene = GetScene(userState.teleported_into_region); - - if (homeScene == null) - homeScene = GetRootScene(); - - if (homeScene != null) - { - // Get a referenceokay - to their Cap object so we can pull out the capobjectroot - Caps userCap - = homeScene.CapsModule.GetCapsForUser(userData.AgentID); - - //Update the circuit data in the region so this user is authorized - homeScene.UpdateCircuitData(userData); - homeScene.ChangeCircuitCode(userData.circuitcode,(uint)circuitcode); - - // Load state - - - // Keep state changes - userState.first_name = requestMap["first_name"].AsString(); - userState.secure_session_id = requestMap["secure_session_id"].AsUUID(); - userState.age_verified = requestMap["age_verified"].AsBoolean(); - userState.region_id = homeScene.RegionInfo.originRegionID; // replace 0000000 with our regionid - userState.transacted = requestMap["transacted"].AsBoolean(); - userState.agent_access = requestMap["agent_access"].AsBoolean(); - userState.inventory_host = requestMap["inventory_host"].AsString(); - userState.identified = requestMap["identified"].AsBoolean(); - userState.session_id = requestMap["session_id"].AsUUID(); - userState.god_level = (uint)requestMap["god_level"].AsInteger(); - userState.last_name = requestMap["last_name"].AsString(); - userState.god_overide = requestMap["god_override"].AsBoolean(); - userState.circuit_code = (uint)requestMap["circuit_code"].AsInteger(); - userState.limited_to_estate = requestMap["limited_to_estate"].AsInteger(); - userState.src_estate_id = estateID; - userState.region_id = regionID; - userState.src_parent_estate_id = parentEstateID; - userState.visible_to_parent = visibleToParent; - - // Save state changes - UpdateOGPState(userData.AgentID, userState); - - // Get the region information for the home region. - RegionInfo reg = homeScene.RegionInfo; - - // Dummy positional and look at info.. we don't have it. - OSDArray PositionArray = new OSDArray(); - PositionArray.Add(OSD.FromInteger(128)); - PositionArray.Add(OSD.FromInteger(128)); - PositionArray.Add(OSD.FromInteger(40)); - - OSDArray LookAtArray = new OSDArray(); - LookAtArray.Add(OSD.FromInteger(1)); - LookAtArray.Add(OSD.FromInteger(1)); - LookAtArray.Add(OSD.FromInteger(1)); - - // Our region's X and Y position in OpenSimulator space. - uint fooX = reg.RegionLocX; - uint fooY = reg.RegionLocY; - m_log.InfoFormat("[OGP]: region x({0}) region y({1})", fooX, fooY); - m_log.InfoFormat("[OGP]: region http {0} {1}", reg.ServerURI, reg.HttpPort); - m_log.InfoFormat("[OGO]: region UUID {0} ", reg.RegionID); - - // Convert the X and Y position to LL space - responseMap["region_x"] = OSD.FromInteger(fooX * (uint)Constants.RegionSize); // convert it to LL X - responseMap["region_y"] = OSD.FromInteger(fooY * (uint)Constants.RegionSize); // convert it to LL Y - - // Give em a new seed capability - responseMap["seed_capability"] = OSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); - responseMap["region"] = OSD.FromUUID(reg.originRegionID); - responseMap["look_at"] = LookAtArray; - - responseMap["sim_port"] = OSD.FromInteger(reg.InternalEndPoint.Port); - responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName);// + ":" + reg.InternalEndPoint.Port.ToString()); - - // DEPRECATED - responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); - - responseMap["session_id"] = OSD.FromUUID(SessionID); - responseMap["secure_session_id"] = OSD.FromUUID(SecureSessionID); - responseMap["circuit_code"] = OSD.FromInteger(circuitcode); - - responseMap["position"] = PositionArray; - - responseMap["region_id"] = OSD.FromUUID(reg.originRegionID); - - responseMap["sim_access"] = OSD.FromString("Mature"); - - responseMap["connect"] = OSD.FromBoolean(true); - - - - m_log.InfoFormat("[OGP]: host: {0}, IP {1}", responseMap["sim_host"].ToString(), responseMap["sim_ip"].ToString()); - } - } - - return responseMap; - } - - public OSD DerezAvatarMethod(string path, OSD request) - { - m_log.ErrorFormat("DerezPath: {0}, Request: {1}", path, request.ToString()); - - //LLSD llsdResponse = null; - OSDMap responseMap = new OSDMap(); - - string[] PathArray = path.Split('/'); - m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]); - string uuidString = PathArray[2]; - m_log.InfoFormat("[OGP]: Request to Derez avatar with UUID {0}", uuidString); - UUID userUUID = UUID.Zero; - if (UUID.TryParse(uuidString, out userUUID)) - { - UUID RemoteID = (UUID)uuidString; - UUID LocalID = RemoteID; - // FIXME: TODO: Routine to map RemoteUUIDs to LocalUUIds - // would be done already.. but the client connects with the Aditi UUID - // regardless over the UDP stack - - OGPState userState = GetOGPState(LocalID); - if (userState.agent_id != UUID.Zero) - { - //OSDMap outboundRequestMap = new OSDMap(); - OSDMap inboundRequestMap = (OSDMap)request; - string rezAvatarString = inboundRequestMap["rez_avatar"].AsString(); - if (rezAvatarString.Length == 0) - { - rezAvatarString = inboundRequestMap["rez_avatar/rez"].AsString(); - } - OSDArray LookAtArray = new OSDArray(); - LookAtArray.Add(OSD.FromInteger(1)); - LookAtArray.Add(OSD.FromInteger(1)); - LookAtArray.Add(OSD.FromInteger(1)); - - OSDArray PositionArray = new OSDArray(); - PositionArray.Add(OSD.FromInteger(128)); - PositionArray.Add(OSD.FromInteger(128)); - PositionArray.Add(OSD.FromInteger(40)); - - OSDArray lookArray = new OSDArray(); - lookArray.Add(OSD.FromInteger(128)); - lookArray.Add(OSD.FromInteger(128)); - lookArray.Add(OSD.FromInteger(40)); - - responseMap["connect"] = OSD.FromBoolean(true);// it's okay to give this user up - responseMap["look_at"] = LookAtArray; - - m_log.WarnFormat("[OGP]: Invoking rez_avatar on host:{0} for avatar: {1} {2}", rezAvatarString, userState.first_name, userState.last_name); - - OSDMap rezResponseMap = invokeRezAvatarCap(responseMap, rezAvatarString,userState); - - // If invoking it returned an error, parse and end - if (rezResponseMap.ContainsKey("connect")) - { - if (rezResponseMap["connect"].AsBoolean() == false) - { - return responseMap; - } - } - - string rezRespSeedCap = ""; - - // DEPRECATED - if (rezResponseMap.ContainsKey("seed_capability")) - rezRespSeedCap = rezResponseMap["seed_capability"].AsString(); - - // REPLACEMENT - if (rezResponseMap.ContainsKey("region_seed_capability")) - rezRespSeedCap = rezResponseMap["region_seed_capability"].AsString(); - - // REPLACEMENT - if (rezResponseMap.ContainsKey("rez_avatar/rez")) - rezRespSeedCap = rezResponseMap["rez_avatar/rez"].AsString(); - - // DEPRECATED - string rezRespSim_ip = rezResponseMap["sim_ip"].AsString(); - - string rezRespSim_host = rezResponseMap["sim_host"].AsString(); - - int rrPort = rezResponseMap["sim_port"].AsInteger(); - int rrX = rezResponseMap["region_x"].AsInteger(); - int rrY = rezResponseMap["region_y"].AsInteger(); - m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY); - UUID rrRID = rezResponseMap["region_id"].AsUUID(); - OSDArray RezResponsePositionArray = null; - string rrAccess = rezResponseMap["sim_access"].AsString(); - if (rezResponseMap.ContainsKey("position")) - { - RezResponsePositionArray = (OSDArray)rezResponseMap["position"]; - } - // DEPRECATED - responseMap["seed_capability"] = OSD.FromString(rezRespSeedCap); - - // REPLACEMENT r3 - responseMap["region_seed_capability"] = OSD.FromString(rezRespSeedCap); - - // DEPRECATED - responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString()); - - responseMap["sim_host"] = OSD.FromString(rezRespSim_host); - responseMap["sim_port"] = OSD.FromInteger(rrPort); - responseMap["region_x"] = OSD.FromInteger(rrX); - responseMap["region_y"] = OSD.FromInteger(rrY); - responseMap["region_id"] = OSD.FromUUID(rrRID); - responseMap["sim_access"] = OSD.FromString(rrAccess); - - if (RezResponsePositionArray != null) - { - responseMap["position"] = RezResponsePositionArray; - } - responseMap["look_at"] = lookArray; - responseMap["connect"] = OSD.FromBoolean(true); - - ShutdownConnection(LocalID,this); - // PLEASE STOP CHANGING THIS TO an M_LOG, M_LOG DOESN'T WORK ON MULTILINE .TOSTRINGS - Console.WriteLine("RESPONSEDEREZ: " + responseMap.ToString()); - return responseMap; - } - else - { - return GenerateNoStateMessage(LocalID); - } - } - else - { - return GenerateNoHandlerMessage(); - } - - //return responseMap; - } - - private OSDMap invokeRezAvatarCap(OSDMap responseMap, string CapAddress, OGPState userState) - { - Scene reg = GetRootScene(); - - WebRequest DeRezRequest = WebRequest.Create(CapAddress); - DeRezRequest.Method = "POST"; - DeRezRequest.ContentType = "application/xml+llsd"; - - OSDMap RAMap = new OSDMap(); - OSDMap AgentParms = new OSDMap(); - OSDMap RegionParms = new OSDMap(); - - OSDArray Parameter = new OSDArray(2); - - OSDMap version = new OSDMap(); - version["version"] = OSD.FromInteger(userState.src_version); - Parameter.Add(version); - - OSDMap SrcData = new OSDMap(); - SrcData["estate_id"] = OSD.FromInteger(reg.RegionInfo.EstateSettings.EstateID); - SrcData["parent_estate_id"] = OSD.FromInteger((reg.RegionInfo.EstateSettings.ParentEstateID == 100 ? 1 : reg.RegionInfo.EstateSettings.ParentEstateID)); - SrcData["region_id"] = OSD.FromUUID(reg.RegionInfo.originRegionID); - SrcData["visible_to_parent"] = OSD.FromBoolean(userState.visible_to_parent); - Parameter.Add(SrcData); - - AgentParms["first_name"] = OSD.FromString(userState.first_name); - AgentParms["last_name"] = OSD.FromString(userState.last_name); - AgentParms["agent_id"] = OSD.FromUUID(userState.agent_id); - RegionParms["region_id"] = OSD.FromUUID(userState.region_id); - AgentParms["circuit_code"] = OSD.FromInteger(userState.circuit_code); - AgentParms["secure_session_id"] = OSD.FromUUID(userState.secure_session_id); - AgentParms["session_id"] = OSD.FromUUID(userState.session_id); - AgentParms["agent_access"] = OSD.FromBoolean(userState.agent_access); - AgentParms["god_level"] = OSD.FromInteger(userState.god_level); - AgentParms["god_overide"] = OSD.FromBoolean(userState.god_overide); - AgentParms["identified"] = OSD.FromBoolean(userState.identified); - AgentParms["transacted"] = OSD.FromBoolean(userState.transacted); - AgentParms["age_verified"] = OSD.FromBoolean(userState.age_verified); - AgentParms["limited_to_estate"] = OSD.FromInteger(userState.limited_to_estate); - AgentParms["inventory_host"] = OSD.FromString(userState.inventory_host); - - // version 1 - RAMap = AgentParms; - - // Planned for version 2 - // RAMap["agent_params"] = AgentParms; - - RAMap["region_params"] = RegionParms; - RAMap["parameter"] = Parameter; - - string RAMapString = RAMap.ToString(); - m_log.InfoFormat("[OGP] RAMap string {0}", RAMapString); - OSD LLSDofRAMap = RAMap; // RENAME if this works - - m_log.InfoFormat("[OGP]: LLSD of map as string was {0}", LLSDofRAMap.ToString()); - //m_log.InfoFormat("[OGP]: LLSD+XML: {0}", LLSDParser.SerializeXmlString(LLSDofRAMap)); - byte[] buffer = OSDParser.SerializeLLSDXmlBytes(LLSDofRAMap); - - //string bufferDump = System.Text.Encoding.ASCII.GetString(buffer); - //m_log.InfoFormat("[OGP]: buffer form is {0}",bufferDump); - //m_log.InfoFormat("[OGP]: LLSD of map was {0}",buffer.Length); - - Stream os = null; - try - { // send the Post - DeRezRequest.ContentLength = buffer.Length; //Count bytes to send - os = DeRezRequest.GetRequestStream(); - os.Write(buffer, 0, buffer.Length); //Send it - os.Close(); - m_log.InfoFormat("[OGP]: Derez Avatar Posted Rez Avatar request to remote sim {0}", CapAddress); - } - catch (WebException ex) - { - m_log.InfoFormat("[OGP] Bad send on de_rez_avatar {0}", ex.Message); - responseMap["connect"] = OSD.FromBoolean(false); - - return responseMap; - } - - m_log.Info("[OGP] waiting for a reply after rez avatar send"); - string rez_avatar_reply = null; - { // get the response - try - { - WebResponse webResponse = DeRezRequest.GetResponse(); - if (webResponse == null) - { - m_log.Info("[OGP:] Null reply on rez_avatar post"); - } - - StreamReader sr = new StreamReader(webResponse.GetResponseStream()); - rez_avatar_reply = sr.ReadToEnd().Trim(); - m_log.InfoFormat("[OGP]: rez_avatar reply was {0} ", rez_avatar_reply); - - } - catch (WebException ex) - { - m_log.InfoFormat("[OGP]: exception on read after send of rez avatar {0}", ex.Message); - responseMap["connect"] = OSD.FromBoolean(false); - - return responseMap; - } - OSD rezResponse = null; - try - { - rezResponse = OSDParser.DeserializeLLSDXml(rez_avatar_reply); - - responseMap = (OSDMap)rezResponse; - } - catch (Exception ex) - { - m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message); - responseMap["connect"] = OSD.FromBoolean(false); - - return responseMap; - } - } - return responseMap; - } - - public OSD GenerateNoHandlerMessage() - { - OSDMap map = new OSDMap(); - map["reason"] = OSD.FromString("LLSDRequest"); - map["message"] = OSD.FromString("No handler registered for LLSD Requests"); - map["login"] = OSD.FromString("false"); - map["connect"] = OSD.FromString("false"); - return map; - } - public OSD GenerateNoStateMessage(UUID passedAvatar) - { - OSDMap map = new OSDMap(); - map["reason"] = OSD.FromString("derez failed"); - map["message"] = OSD.FromString("Unable to locate OGP state for avatar " + passedAvatar.ToString()); - map["login"] = OSD.FromString("false"); - map["connect"] = OSD.FromString("false"); - return map; - } - private bool TryGetAgentCircuitData(string path, out AgentCircuitData userdata) - { - userdata = null; - lock (CapsLoginID) - { - if (CapsLoginID.ContainsKey(path)) - { - userdata = CapsLoginID[path]; - DiscardUsedCap(path); - return true; - } - } - return false; - } - - private void DiscardUsedCap(string path) - { - CapsLoginID.Remove(path); - } - - private Scene GetRootScene() - { - Scene ReturnScene = null; - lock (m_scene) - { - if (m_scene.Count > 0) - { - ReturnScene = m_scene[0]; - } - } - - return ReturnScene; - } - - private Scene GetScene(string scenename) - { - Scene ReturnScene = null; - lock (m_scene) - { - foreach (Scene s in m_scene) - { - if (s.RegionInfo.RegionName.ToLower() == scenename) - { - ReturnScene = s; - break; - } - } - } - - return ReturnScene; - } - - private ulong GetOSCompatibleRegionHandle(RegionInfo reg) - { - return Util.UIntsToLong(reg.RegionLocX, reg.RegionLocY); - } - - private OGPState InitializeNewState() - { - OGPState returnState = new OGPState(); - returnState.first_name = ""; - returnState.last_name = ""; - returnState.agent_id = UUID.Zero; - returnState.local_agent_id = UUID.Zero; - returnState.region_id = UUID.Zero; - returnState.circuit_code = 0; - returnState.secure_session_id = UUID.Zero; - returnState.session_id = UUID.Zero; - returnState.agent_access = true; - returnState.god_level = 0; - returnState.god_overide = false; - returnState.identified = false; - returnState.transacted = false; - returnState.age_verified = false; - returnState.limited_to_estate = 1; - returnState.inventory_host = "http://inv4.mysql.aditi.lindenlab.com"; - returnState.allow_redirect = true; - returnState.sim_access = ""; - returnState.src_can_see_mainland = true; - returnState.src_estate_id = 1; - returnState.src_version = 1; - returnState.src_parent_estate_id = 1; - returnState.visible_to_parent = true; - returnState.teleported_into_region = ""; - - return returnState; - } - - private OGPState GetOGPState(UUID agentId) - { - lock (m_OGPState) - { - if (m_OGPState.ContainsKey(agentId)) - { - return m_OGPState[agentId]; - } - else - { - return InitializeNewState(); - } - } - } - - public void DeleteOGPState(UUID agentId) - { - lock (m_OGPState) - { - if (m_OGPState.ContainsKey(agentId)) - m_OGPState.Remove(agentId); - } - } - - private void UpdateOGPState(UUID agentId, OGPState state) - { - lock (m_OGPState) - { - if (m_OGPState.ContainsKey(agentId)) - { - m_OGPState[agentId] = state; - } - else - { - m_OGPState.Add(agentId,state); - } - } - } - private bool SceneListDuplicateCheck(string str) - { - // no lock, called from locked space! - bool found = false; - - foreach (Scene s in m_scene) - { - if (s.RegionInfo.RegionName == str) - { - found = true; - break; - } - } - - return found; - } - - public void ShutdownConnection(UUID avatarId, OpenGridProtocolModule mod) - { - Scene homeScene = GetRootScene(); - ScenePresence avatar = null; - if (homeScene.TryGetScenePresence(avatarId,out avatar)) - { - KillAUser ku = new KillAUser(avatar,mod); - Watchdog.StartThread(ku.ShutdownNoLogout, "OGPShutdown", ThreadPriority.Normal, true, true); - } - } - -// private string CreateRandomStr(int len) -// { -// Random rnd = new Random(Environment.TickCount); -// string returnstring = ""; -// string chars = "abcdefghijklmnopqrstuvwxyz0123456789"; -// -// for (int i = 0; i < len; i++) -// { -// returnstring += chars.Substring(rnd.Next(chars.Length), 1); -// } -// return returnstring; -// } - - // Temporary hack to allow teleporting to and from Vaak - private static bool customXertificateValidation(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error) - { - //if (cert.Subject == "E=root@lindenlab.com, CN=*.vaak.lindenlab.com, O=\"Linden Lab, Inc.\", L=San Francisco, S=California, C=US") - //{ - return true; - //} - - //return false; - } - } - - public class KillAUser - { - private ScenePresence avToBeKilled = null; - private OpenGridProtocolModule m_mod = null; - - public KillAUser(ScenePresence avatar, OpenGridProtocolModule mod) - { - avToBeKilled = avatar; - m_mod = mod; - } - - public void ShutdownNoLogout() - { - UUID avUUID = UUID.Zero; - - if (avToBeKilled != null) - { - avUUID = avToBeKilled.UUID; - avToBeKilled.MakeChildAgent(); - - avToBeKilled.ControllingClient.SendLogoutPacketWhenClosing = false; - - int sleepMS = 30000; - while (sleepMS > 0) - { - Watchdog.UpdateThread(); - Thread.Sleep(1000); - sleepMS -= 1000; - } - - // test for child agent because they might have come back - if (avToBeKilled.IsChildAgent) - { - m_mod.DeleteOGPState(avUUID); - avToBeKilled.ControllingClient.Close(); - } - } - - Watchdog.RemoveThread(); - } - - } - - public class MonoCert : ICertificatePolicy - { - #region ICertificatePolicy Members - - public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) - { - return true; - } - - #endregion - } -} From 6cf90e55162e62f048489c49029bd9bbf884c3c3 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 08:38:39 -0800 Subject: [PATCH 34/71] One more module converted: LightShareModule. --- .../LightShare/LightShareModule.cs | 95 +++++++++++-------- 1 file changed, 56 insertions(+), 39 deletions(-) diff --git a/OpenSim/Region/CoreModules/LightShare/LightShareModule.cs b/OpenSim/Region/CoreModules/LightShare/LightShareModule.cs index 16cbbf5d37..c9a263f8be 100644 --- a/OpenSim/Region/CoreModules/LightShare/LightShareModule.cs +++ b/OpenSim/Region/CoreModules/LightShare/LightShareModule.cs @@ -37,11 +37,12 @@ using OpenSim.Framework; using OpenSim.Region.CoreModules.Framework.InterfaceCommander; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; - +using Mono.Addins; namespace OpenSim.Region.CoreModules.World.LightShare { - public class LightShareModule : IRegionModule, ICommandableModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class LightShareModule : INonSharedRegionModule, ICommandableModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private readonly Commander m_commander = new Commander("windlight"); @@ -70,12 +71,8 @@ namespace OpenSim.Region.CoreModules.World.LightShare } } - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { - m_scene = scene; - m_scene.RegisterModuleInterface(this); - m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; - // ini file settings try { @@ -86,19 +83,62 @@ namespace OpenSim.Region.CoreModules.World.LightShare m_log.Debug("[WINDLIGHT]: ini failure for enable_windlight - using default"); } - if (m_enableWindlight) - { - m_scene.EventManager.OnMakeRootAgent += EventManager_OnMakeRootAgent; - m_scene.EventManager.OnSaveNewWindlightProfile += EventManager_OnSaveNewWindlightProfile; - m_scene.EventManager.OnSendNewWindlightProfileTargeted += EventManager_OnSendNewWindlightProfileTargeted; - m_scene.LoadWindlightProfile(); - } + m_log.DebugFormat("[WINDLIGHT]: windlight module {0}", (m_enableWindlight ? "enabled" : "disabled")); + } + + public void AddRegion(Scene scene) + { + if (!m_enableWindlight) + return; + + m_scene = scene; + //m_scene.RegisterModuleInterface(this); + m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; + + m_scene.EventManager.OnMakeRootAgent += EventManager_OnMakeRootAgent; + m_scene.EventManager.OnSaveNewWindlightProfile += EventManager_OnSaveNewWindlightProfile; + m_scene.EventManager.OnSendNewWindlightProfileTargeted += EventManager_OnSendNewWindlightProfileTargeted; + m_scene.LoadWindlightProfile(); InstallCommands(); - - m_log.Debug("[WINDLIGHT]: Initialised windlight module"); } + public void RemoveRegion(Scene scene) + { + if (!m_enableWindlight) + return; + + m_scene.EventManager.OnPluginConsole -= EventManager_OnPluginConsole; + + m_scene.EventManager.OnMakeRootAgent -= EventManager_OnMakeRootAgent; + m_scene.EventManager.OnSaveNewWindlightProfile -= EventManager_OnSaveNewWindlightProfile; + m_scene.EventManager.OnSendNewWindlightProfileTargeted -= EventManager_OnSendNewWindlightProfileTargeted; + + m_scene = null; + } + + public void Close() + { + } + + public string Name + { + get { return "LightShareModule"; } + } + + public void RegionLoaded(Scene scene) + { + } + + public Type ReplaceableInterface + { + get { return null; } + } + + #endregion + + #region events + private List compileWindlightSettings(RegionLightShareData wl) { byte[] mBlock = new Byte[249]; @@ -186,29 +226,6 @@ namespace OpenSim.Region.CoreModules.World.LightShare m_scene.ForEachRootClient(SendProfileToClient); } - public void PostInitialise() - { - - } - - public void Close() - { - } - - public string Name - { - get { return "LightShareModule"; } - } - - public bool IsSharedModule - { - get { return false; } - } - - #endregion - - #region events - #endregion #region ICommandableModule Members From a180fef99e556b7f8a3ec3e38ea3859174b57c4d Mon Sep 17 00:00:00 2001 From: PixelTomsen Date: Sun, 11 Nov 2012 18:33:16 +0100 Subject: [PATCH 35/71] remove entry OpenGridProtocol in OpenSimDefaults.ini - module was deleted Signed-off-by: Diva Canto --- bin/OpenSimDefaults.ini | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 4b589857d5..ed1b9693fd 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -1418,16 +1418,6 @@ ; DeleteScriptsOnStartup = false -[OpenGridProtocol] - ;These are the settings for the Open Grid Protocol.. the Agent Domain, Region Domain, you know.. - ;On/true or Off/false - ogp_enabled=false - - ;Name Prefix/suffix when using OGP - ogp_firstname_prefix="" - ogp_lastname_suffix="_EXTERNAL" - - [Concierge] ; Enable concierge module ; Default is false From 37c970090401b620bf58be1d7618e3637c283cfe Mon Sep 17 00:00:00 2001 From: PixelTomsen Date: Sun, 11 Nov 2012 19:12:06 +0100 Subject: [PATCH 36/71] moving windlight-sources to correct namespace-named folder (world); add LightShare as Interface Signed-off-by: Diva Canto --- .../LightShare/EnvironmentModule.cs | 20 +++++----- .../LightShare/LightShareModule.cs | 37 +++++++++---------- .../Framework/Interfaces/ILightShareModule.cs | 33 +++++++++++++++++ 3 files changed, 60 insertions(+), 30 deletions(-) rename OpenSim/Region/CoreModules/{ => World}/LightShare/EnvironmentModule.cs (93%) rename OpenSim/Region/CoreModules/{ => World}/LightShare/LightShareModule.cs (97%) create mode 100644 OpenSim/Region/Framework/Interfaces/ILightShareModule.cs diff --git a/OpenSim/Region/CoreModules/LightShare/EnvironmentModule.cs b/OpenSim/Region/CoreModules/World/LightShare/EnvironmentModule.cs similarity index 93% rename from OpenSim/Region/CoreModules/LightShare/EnvironmentModule.cs rename to OpenSim/Region/CoreModules/World/LightShare/EnvironmentModule.cs index 1526886d7a..c3cea7a58f 100644 --- a/OpenSim/Region/CoreModules/LightShare/EnvironmentModule.cs +++ b/OpenSim/Region/CoreModules/World/LightShare/EnvironmentModule.cs @@ -51,10 +51,10 @@ namespace OpenSim.Region.CoreModules.World.LightShare private Scene m_scene = null; private UUID regionID = UUID.Zero; private static bool Enabled = false; - + private static readonly string capsName = "EnvironmentSettings"; private static readonly string capsBase = "/CAPS/0020/"; - + private LLSDEnvironmentSetResponse setResponse = null; #region INonSharedRegionModule @@ -72,7 +72,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare } Enabled = true; - + m_log.InfoFormat("[{0}]: Module is enabled.", Name); } @@ -132,8 +132,8 @@ namespace OpenSim.Region.CoreModules.World.LightShare #region Events private void OnRegisterCaps(UUID agentID, Caps caps) { -// m_log.DebugFormat("[{0}]: Register capability for agentID {1} in region {2}", -// Name, agentID, caps.RegionName); + // m_log.DebugFormat("[{0}]: Register capability for agentID {1} in region {2}", + // Name, agentID, caps.RegionName); string capsPath = capsBase + UUID.Random(); @@ -163,8 +163,8 @@ namespace OpenSim.Region.CoreModules.World.LightShare private string GetEnvironmentSettings(string request, string path, string param, UUID agentID, Caps caps) { -// m_log.DebugFormat("[{0}]: Environment GET handle for agentID {1} in region {2}", -// Name, agentID, caps.RegionName); + // m_log.DebugFormat("[{0}]: Environment GET handle for agentID {1} in region {2}", + // Name, agentID, caps.RegionName); string env = String.Empty; @@ -188,8 +188,8 @@ namespace OpenSim.Region.CoreModules.World.LightShare UUID agentID, Caps caps) { -// m_log.DebugFormat("[{0}]: Environment SET handle from agentID {1} in region {2}", -// Name, agentID, caps.RegionName); + // m_log.DebugFormat("[{0}]: Environment SET handle from agentID {1} in region {2}", + // Name, agentID, caps.RegionName); setResponse.regionID = regionID; setResponse.success = false; @@ -204,7 +204,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare { m_scene.SimulationDataService.StoreRegionEnvironmentSettings(regionID, request); setResponse.success = true; - + m_log.InfoFormat("[{0}]: New Environment settings has been saved from agentID {1} in region {2}", Name, agentID, caps.RegionName); } diff --git a/OpenSim/Region/CoreModules/LightShare/LightShareModule.cs b/OpenSim/Region/CoreModules/World/LightShare/LightShareModule.cs similarity index 97% rename from OpenSim/Region/CoreModules/LightShare/LightShareModule.cs rename to OpenSim/Region/CoreModules/World/LightShare/LightShareModule.cs index c9a263f8be..bd04ded019 100644 --- a/OpenSim/Region/CoreModules/LightShare/LightShareModule.cs +++ b/OpenSim/Region/CoreModules/World/LightShare/LightShareModule.cs @@ -27,22 +27,20 @@ using System; using System.Collections.Generic; -using System.IO; using System.Reflection; using OpenMetaverse; -using log4net; -using Nini.Config; -using OpenSim.Data; using OpenSim.Framework; using OpenSim.Region.CoreModules.Framework.InterfaceCommander; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using log4net; +using Nini.Config; using Mono.Addins; namespace OpenSim.Region.CoreModules.World.LightShare { [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] - public class LightShareModule : INonSharedRegionModule, ICommandableModule + public class LightShareModule : INonSharedRegionModule, ILightShareModule, ICommandableModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private readonly Commander m_commander = new Commander("windlight"); @@ -58,22 +56,10 @@ namespace OpenSim.Region.CoreModules.World.LightShare #endregion - #region IRegionModule Members - - public static bool EnableWindlight - { - get - { - return m_enableWindlight; - } - set - { - } - } + #region INonSharedRegionModule Members public void Initialise(IConfigSource config) { - // ini file settings try { m_enableWindlight = config.Configs["LightShare"].GetBoolean("enable_windlight", false); @@ -92,7 +78,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare return; m_scene = scene; - //m_scene.RegisterModuleInterface(this); + m_scene.RegisterModuleInterface(this); m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; m_scene.EventManager.OnMakeRootAgent += EventManager_OnMakeRootAgent; @@ -137,6 +123,17 @@ namespace OpenSim.Region.CoreModules.World.LightShare #endregion + public static bool EnableWindlight + { + get + { + return m_enableWindlight; + } + set + { + } + } + #region events private List compileWindlightSettings(RegionLightShareData wl) @@ -260,7 +257,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare private void HandleDisable(Object[] args) { m_log.InfoFormat("[WINDLIGHT]: Plugin now disabled"); - m_enableWindlight=false; + m_enableWindlight = false; } private void HandleEnable(Object[] args) diff --git a/OpenSim/Region/Framework/Interfaces/ILightShareModule.cs b/OpenSim/Region/Framework/Interfaces/ILightShareModule.cs new file mode 100644 index 0000000000..b5fd24fa21 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ILightShareModule.cs @@ -0,0 +1,33 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +namespace OpenSim.Region.Framework.Interfaces +{ + public interface ILightShareModule + { + } +} \ No newline at end of file From b9f602cc77dea1534623b3fd29884323411fa0af Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 11 Nov 2012 21:15:39 +0000 Subject: [PATCH 37/71] Prevent datasnapshot from crashing the simulator --- .../DataSnapshot/DataSnapshotManager.cs | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index 979454922c..18aa609da5 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs @@ -72,6 +72,7 @@ namespace OpenSim.Region.DataSnapshot public string m_listener_port = ConfigSettings.DefaultRegionHttpPort.ToString(); public string m_hostname = "127.0.0.1"; private UUID m_Secret = UUID.Random(); + private bool m_servicesNotified = false; //Update timers private int m_period = 20; // in seconds @@ -179,6 +180,23 @@ namespace OpenSim.Region.DataSnapshot } } } + + // Must be done here because on shared modules, PostInitialise() will run + // BEFORE any scenes are registered. There is no "all scenes have been loaded" + // kind of callback because scenes may be created dynamically, so we cannot + // have that info, ever. + if (!m_servicesNotified) + { + //Hand it the first scene, assuming that all scenes have the same BaseHTTPServer + new DataRequestHandler(m_scenes[0], this); + + m_hostname = m_scenes[0].RegionInfo.ExternalHostName; + + if (m_dataServices != "" && m_dataServices != "noservices") + NotifyDataServices(m_dataServices, "online"); + + m_servicesNotified = true; + } } public void RemoveRegion(Scene scene) @@ -214,16 +232,6 @@ namespace OpenSim.Region.DataSnapshot public void PostInitialise() { - if (!m_enabled) - return; - - //Hand it the first scene, assuming that all scenes have the same BaseHTTPServer - new DataRequestHandler(m_scenes[0], this); - - m_hostname = m_scenes[0].RegionInfo.ExternalHostName; - - if (m_dataServices != "" && m_dataServices != "noservices") - NotifyDataServices(m_dataServices, "online"); } public void RegionLoaded(Scene scene) From c60e1a1ae6b3d4481ba7f663190576647343473f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 13:49:07 -0800 Subject: [PATCH 38/71] J2KDecoderModule: move the code out of PostInitialise() --- .../Agent/TextureSender/J2KDecoderModule.cs | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index 2879154ba6..a54fec7665 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs @@ -55,6 +55,16 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender private readonly Dictionary> m_notifyList = new Dictionary>(); /// Cache that will store decoded JPEG2000 layer boundary data private IImprovedAssetCache m_cache; + private IImprovedAssetCache Cache + { + get + { + if (m_cache == null) + m_cache = m_scene.RequestModuleInterface(); + + return m_cache; + } + } /// Reference to a scene (doesn't matter which one as long as it can load the cache module) private UUID m_CreatorID = UUID.Zero; private Scene m_scene; @@ -98,7 +108,6 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender public void PostInitialise() { - m_cache = m_scene.RequestModuleInterface(); } public void Close() @@ -297,7 +306,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender { m_decodedCache.AddOrUpdate(AssetId, Layers, TimeSpan.FromMinutes(10)); - if (m_cache != null) + if (Cache != null) { string assetID = "j2kCache_" + AssetId.ToString(); @@ -321,7 +330,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender #endregion Serialize Layer Data - m_cache.Cache(layerDecodeAsset); + Cache.Cache(layerDecodeAsset); } } @@ -331,10 +340,10 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender { return true; } - else if (m_cache != null) + else if (Cache != null) { string assetName = "j2kCache_" + AssetId.ToString(); - AssetBase layerDecodeAsset = m_cache.Get(assetName); + AssetBase layerDecodeAsset = Cache.Get(assetName); if (layerDecodeAsset != null) { @@ -346,7 +355,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender if (lines.Length == 0) { m_log.Warn("[J2KDecodeCache]: Expiring corrupted layer data (empty) " + assetName); - m_cache.Expire(assetName); + Cache.Expire(assetName); return false; } @@ -367,7 +376,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender catch (FormatException) { m_log.Warn("[J2KDecodeCache]: Expiring corrupted layer data (format) " + assetName); - m_cache.Expire(assetName); + Cache.Expire(assetName); return false; } @@ -378,7 +387,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender else { m_log.Warn("[J2KDecodeCache]: Expiring corrupted layer data (layout) " + assetName); - m_cache.Expire(assetName); + Cache.Expire(assetName); return false; } } From 23605cf93d110523320430d1c9dd2e83865fca01 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sun, 11 Nov 2012 20:41:20 +0000 Subject: [PATCH 39/71] converting NPC module to ISharedRegionModule Signed-off-by: Diva Canto --- .../OptionalModules/World/NPC/NPCModule.cs | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 3f25bcf58e..b372c88d8a 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -31,6 +31,7 @@ using System.Reflection; using System.Threading; using log4net; using Nini.Config; +using Mono.Addins; using OpenMetaverse; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -40,26 +41,41 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.OptionalModules.World.NPC { - public class NPCModule : IRegionModule, INPCModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class NPCModule : INPCModule, ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Dictionary m_avatars = new Dictionary(); - public void Initialise(Scene scene, IConfigSource source) + public bool Enabled { get; private set; } + + public void Initialise(IConfigSource source) { IConfig config = source.Configs["NPC"]; - if (config != null && config.GetBoolean("Enabled", false)) - { + Enabled = (config != null && config.GetBoolean("Enabled", false)); + } + + public void AddRegion(Scene scene) + { + if (Enabled) scene.RegisterModuleInterface(this); - } + } + + public void RegionLoaded(Scene scene) + { } public void PostInitialise() { } + public void RemoveRegion(Scene scene) + { + scene.UnregisterModuleInterface(this); + } + public void Close() { } @@ -69,10 +85,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC get { return "NPCModule"; } } - public bool IsSharedModule - { - get { return true; } - } + public Type ReplaceableInterface { get { return null; } } public bool IsNPC(UUID agentId, Scene scene) { From f560d581bbeb420dccdfa80c574724deada8038b Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sun, 11 Nov 2012 20:42:55 +0000 Subject: [PATCH 40/71] document & 80-character width terminal formatting Signed-off-by: Diva Canto --- .../Region/Framework/Interfaces/INPCModule.cs | 114 +++++++++++----- .../OptionalModules/World/NPC/NPCModule.cs | 129 +++++++++++------- 2 files changed, 158 insertions(+), 85 deletions(-) diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs index d582149d57..9817cf71b9 100644 --- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs +++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs @@ -32,14 +32,16 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.Framework.Interfaces { /// - /// Temporary interface. More methods to come at some point to make NPCs more object oriented rather than - /// controlling purely through module level interface calls (e.g. sit/stand). + /// Temporary interface. More methods to come at some point to make NPCs + /// more object oriented rather than controlling purely through module + /// level interface calls (e.g. sit/stand). /// public interface INPC { /// - /// Should this NPC be sensed by LSL sensors as an 'agent' (interpreted here to mean a normal user) - /// rather than an OpenSim specific NPC extension? + /// Should this NPC be sensed by LSL sensors as an 'agent' + /// (interpreted here to mean a normal user) rather than an OpenSim + /// specific NPC extension? /// bool SenseAsAgent { get; } } @@ -53,35 +55,42 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// - /// Make the NPC show up as an agent on LSL sensors. The default is that they - /// show up as the NPC type instead, but this is currently an OpenSim-only extension. + /// Make the NPC show up as an agent on LSL sensors. The default is + /// that they show up as the NPC type instead, but this is currently + /// an OpenSim-only extension. /// /// - /// The avatar appearance to use for the new NPC. - /// The UUID of the ScenePresence created. UUID.Zero if there was a failure. - UUID CreateNPC( - string firstname, - string lastname, - Vector3 position, - UUID owner, - bool senseAsAgent, - Scene scene, - AvatarAppearance appearance); + /// + /// The avatar appearance to use for the new NPC. + /// + /// + /// The UUID of the ScenePresence created. UUID.Zero if there was a + /// failure. + /// + UUID CreateNPC(string firstname, string lastname, Vector3 position, + UUID owner, bool senseAsAgent, Scene scene, + AvatarAppearance appearance); /// /// Check if the agent is an NPC. /// /// /// - /// True if the agent is an NPC in the given scene. False otherwise. + /// + /// True if the agent is an NPC in the given scene. False otherwise. + /// bool IsNPC(UUID agentID, Scene scene); /// - /// Get the NPC. This is not currently complete - manipulation of NPCs still occurs through the region interface + /// Get the NPC. /// + /// + /// This is not currently complete - manipulation of NPCs still occurs + /// through the region interface. + /// /// /// - /// The NPC. null if it does not exist. + /// The NPC. null if it does not exist. INPC GetNPC(UUID agentID, Scene scene); /// @@ -89,7 +98,10 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// - /// true if they do, false if they don't or if there's no NPC with the given ID. + /// + /// true if they do, false if they don't or if there's no NPC with the + /// given ID. + /// bool CheckPermissions(UUID npcID, UUID callerID); /// @@ -98,8 +110,12 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// - /// True if the operation succeeded, false if there was no such agent or the agent was not an NPC - bool SetNPCAppearance(UUID agentID, AvatarAppearance appearance, Scene scene); + /// + /// True if the operation succeeded, false if there was no such agent + /// or the agent was not an NPC. + /// + bool SetNPCAppearance(UUID agentID, AvatarAppearance appearance, + Scene scene); /// /// Move an NPC to a target over time. @@ -108,23 +124,29 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// - /// If true, then the avatar will attempt to walk to the location even if it's up in the air. - /// This is to allow walking on prims. + /// If true, then the avatar will attempt to walk to the location even + /// if it's up in the air. This is to allow walking on prims. /// /// /// If true and the avatar is flying when it reaches the target, land. /// name="running"> /// If true, NPC moves with running speed. - /// True if the operation succeeded, false if there was no such agent or the agent was not an NPC - /// - bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget, bool running); + /// + /// True if the operation succeeded, false if there was no such agent + /// or the agent was not an NPC. + /// + bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, + bool landAtTarget, bool running); /// /// Stop the NPC's current movement. /// /// The UUID of the NPC /// - /// True if the operation succeeded, false if there was no such agent or the agent was not an NPC + /// + /// True if the operation succeeded, false if there was no such agent + /// or the agent was not an NPC. + /// bool StopMoveToTarget(UUID agentID, Scene scene); /// @@ -133,7 +155,10 @@ namespace OpenSim.Region.Framework.Interfaces /// The UUID of the NPC /// /// - /// True if the operation succeeded, false if there was no such agent or the agent was not an NPC + /// + /// True if the operation succeeded, false if there was no such agent + /// or the agent was not an NPC. + /// bool Say(UUID agentID, Scene scene, string text); /// @@ -143,7 +168,10 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// - /// True if the operation succeeded, false if there was no such agent or the agent was not an NPC + /// + /// True if the operation succeeded, false if there was no such agent + /// or the agent was not an NPC. + /// bool Say(UUID agentID, Scene scene, string text, int channel); /// @@ -153,7 +181,10 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// - /// True if the operation succeeded, false if there was no such agent or the agent was not an NPC + /// + /// True if the operation succeeded, false if there was no such agent + /// or the agent was not an NPC. + /// bool Shout(UUID agentID, Scene scene, string text, int channel); /// @@ -163,7 +194,10 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// - /// True if the operation succeeded, false if there was no such agent or the agent was not an NPC + /// + /// True if the operation succeeded, false if there was no such agent + /// or the agent was not an NPC. + /// bool Whisper(UUID agentID, Scene scene, string text, int channel); /// @@ -188,7 +222,9 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// - /// true if the touch is actually attempted, false if not + /// + /// true if the touch is actually attempted, false if not. + /// bool Touch(UUID agentID, UUID partID); /// @@ -196,14 +232,20 @@ namespace OpenSim.Region.Framework.Interfaces /// /// The UUID of the NPC /// - /// True if the operation succeeded, false if there was no such agent or the agent was not an NPC + /// + /// True if the operation succeeded, false if there was no such agent + /// or the agent was not an NPC. + /// bool DeleteNPC(UUID agentID, Scene scene); /// /// Get the owner of a NPC /// /// The UUID of the NPC - /// UUID of owner if the NPC exists, UUID.Zero if there was no such agent, the agent is unowned or the agent was not an NPC + /// + /// UUID of owner if the NPC exists, UUID.Zero if there was no such + /// agent, the agent is unowned or the agent was not an NPC. + /// UUID GetOwner(UUID agentID); } -} \ No newline at end of file +} diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index b372c88d8a..41e70970cb 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -29,14 +29,16 @@ using System; using System.Collections.Generic; using System.Reflection; using System.Threading; +using Timer = System.Timers.Timer; + using log4net; using Nini.Config; using Mono.Addins; using OpenMetaverse; + using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Framework; -using Timer=System.Timers.Timer; using OpenSim.Services.Interfaces; namespace OpenSim.Region.OptionalModules.World.NPC @@ -44,9 +46,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] public class NPCModule : INPCModule, ISharedRegionModule { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger( + MethodBase.GetCurrentMethod().DeclaringType); - private Dictionary m_avatars = new Dictionary(); + private Dictionary m_avatars = + new Dictionary(); public bool Enabled { get; private set; } @@ -89,8 +93,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC public bool IsNPC(UUID agentId, Scene scene) { - // FIXME: This implementation could not just use the ScenePresence.PresenceType (and callers could inspect - // that directly). + // FIXME: This implementation could not just use the + // ScenePresence.PresenceType (and callers could inspect that + // directly). ScenePresence sp = scene.GetScenePresence(agentId); if (sp == null || sp.IsChildAgent) return false; @@ -99,7 +104,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC return m_avatars.ContainsKey(agentId); } - public bool SetNPCAppearance(UUID agentId, AvatarAppearance appearance, Scene scene) + public bool SetNPCAppearance(UUID agentId, + AvatarAppearance appearance, Scene scene) { ScenePresence npc = scene.GetScenePresence(agentId); if (npc == null || npc.IsChildAgent) @@ -112,34 +118,35 @@ namespace OpenSim.Region.OptionalModules.World.NPC // Delete existing npc attachments scene.AttachmentsModule.DeleteAttachmentsFromScene(npc, false); - // XXX: We can't just use IAvatarFactoryModule.SetAppearance() yet since it doesn't transfer attachments - AvatarAppearance npcAppearance = new AvatarAppearance(appearance, true); + // XXX: We can't just use IAvatarFactoryModule.SetAppearance() yet + // since it doesn't transfer attachments + AvatarAppearance npcAppearance = new AvatarAppearance(appearance, + true); npc.Appearance = npcAppearance; - + // Rez needed npc attachments scene.AttachmentsModule.RezAttachments(npc); - IAvatarFactoryModule module = scene.RequestModuleInterface(); + IAvatarFactoryModule module = + scene.RequestModuleInterface(); module.SendAppearance(npc.UUID); - + return true; } - public UUID CreateNPC( - string firstname, - string lastname, - Vector3 position, - UUID owner, - bool senseAsAgent, - Scene scene, - AvatarAppearance appearance) + public UUID CreateNPC(string firstname, string lastname, + Vector3 position, UUID owner, bool senseAsAgent, Scene scene, + AvatarAppearance appearance) { - NPCAvatar npcAvatar = new NPCAvatar(firstname, lastname, position, owner, senseAsAgent, scene); - npcAvatar.CircuitCode = (uint)Util.RandomClass.Next(0, int.MaxValue); + NPCAvatar npcAvatar = new NPCAvatar(firstname, lastname, position, + owner, senseAsAgent, scene); + npcAvatar.CircuitCode = (uint)Util.RandomClass.Next(0, + int.MaxValue); m_log.DebugFormat( - "[NPC MODULE]: Creating NPC {0} {1} {2}, owner={3}, senseAsAgent={4} at {5} in {6}", - firstname, lastname, npcAvatar.AgentId, owner, senseAsAgent, position, scene.RegionInfo.RegionName); + "[NPC MODULE]: Creating NPC {0} {1} {2}, owner={3}, senseAsAgent={4} at {5} in {6}", + firstname, lastname, npcAvatar.AgentId, owner, + senseAsAgent, position, scene.RegionInfo.RegionName); AgentCircuitData acd = new AgentCircuitData(); acd.AgentID = npcAvatar.AgentId; @@ -147,42 +154,55 @@ namespace OpenSim.Region.OptionalModules.World.NPC acd.lastname = lastname; acd.ServiceURLs = new Dictionary(); - AvatarAppearance npcAppearance = new AvatarAppearance(appearance, true); + AvatarAppearance npcAppearance = new AvatarAppearance(appearance, + true); acd.Appearance = npcAppearance; -// for (int i = 0; i < acd.Appearance.Texture.FaceTextures.Length; i++) -// { -// m_log.DebugFormat( -// "[NPC MODULE]: NPC avatar {0} has texture id {1} : {2}", -// acd.AgentID, i, acd.Appearance.Texture.FaceTextures[i]); -// } + /* + for (int i = 0; + i < acd.Appearance.Texture.FaceTextures.Length; i++) + { + m_log.DebugFormat( + "[NPC MODULE]: NPC avatar {0} has texture id {1} : {2}", + acd.AgentID, i, + acd.Appearance.Texture.FaceTextures[i]); + } + */ lock (m_avatars) { - scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode, acd); + scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode, + acd); scene.AddNewClient(npcAvatar, PresenceType.Npc); ScenePresence sp; if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) { -// m_log.DebugFormat( -// "[NPC MODULE]: Successfully retrieved scene presence for NPC {0} {1}", sp.Name, sp.UUID); + /* + m_log.DebugFormat( + "[NPC MODULE]: Successfully retrieved scene presence for NPC {0} {1}", + sp.Name, sp.UUID); + */ sp.CompleteMovement(npcAvatar, false); m_avatars.Add(npcAvatar.AgentId, npcAvatar); - m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", npcAvatar.AgentId, sp.Name); + m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", + npcAvatar.AgentId, sp.Name); return npcAvatar.AgentId; } else { - m_log.WarnFormat("[NPC MODULE]: Could not find scene presence for NPC {0} {1}", sp.Name, sp.UUID); + m_log.WarnFormat( + "[NPC MODULE]: Could not find scene presence for NPC {0} {1}", + sp.Name, sp.UUID); return UUID.Zero; } } } - public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget, bool running) + public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, + bool noFly, bool landAtTarget, bool running) { lock (m_avatars) { @@ -192,12 +212,13 @@ namespace OpenSim.Region.OptionalModules.World.NPC if (scene.TryGetScenePresence(agentID, out sp)) { m_log.DebugFormat( - "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}", - sp.Name, pos, scene.RegionInfo.RegionName, noFly, landAtTarget); + "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}", + sp.Name, pos, scene.RegionInfo.RegionName, + noFly, landAtTarget); sp.MoveToTarget(pos, noFly, landAtTarget); sp.SetAlwaysRun = running; - + return true; } } @@ -270,9 +291,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC ScenePresence sp; if (scene.TryGetScenePresence(agentID, out sp)) { - sp.HandleAgentRequestSit(m_avatars[agentID], agentID, partID, Vector3.Zero); - // sp.HandleAgentSit(m_avatars[agentID], agentID); - + sp.HandleAgentRequestSit(m_avatars[agentID], agentID, + partID, Vector3.Zero); + //sp.HandleAgentSit(m_avatars[agentID], agentID); + return true; } } @@ -281,7 +303,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC return false; } - public bool Whisper(UUID agentID, Scene scene, string text, int channel) + public bool Whisper(UUID agentID, Scene scene, string text, + int channel) { lock (m_avatars) { @@ -356,16 +379,23 @@ namespace OpenSim.Region.OptionalModules.World.NPC NPCAvatar av; if (m_avatars.TryGetValue(agentID, out av)) { -// m_log.DebugFormat("[NPC MODULE]: Found {0} {1} to remove", agentID, av.Name); + /* + m_log.DebugFormat("[NPC MODULE]: Found {0} {1} to remove", + agentID, av.Name); + */ scene.RemoveClient(agentID, false); m_avatars.Remove(agentID); - - m_log.DebugFormat("[NPC MODULE]: Removed NPC {0} {1}", agentID, av.Name); + /* + m_log.DebugFormat("[NPC MODULE]: Removed NPC {0} {1}", + agentID, av.Name); + */ return true; } } - -// m_log.DebugFormat("[NPC MODULE]: Could not find {0} to remove", agentID); + /* + m_log.DebugFormat("[NPC MODULE]: Could not find {0} to remove", + agentID); + */ return false; } @@ -389,7 +419,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC /// true if they do, false if they don't. private bool CheckPermissions(NPCAvatar av, UUID callerID) { - return callerID == UUID.Zero || av.OwnerID == UUID.Zero || av.OwnerID == callerID; + return callerID == UUID.Zero || av.OwnerID == UUID.Zero || + av.OwnerID == callerID; } } } From 84be90e5f83835800443dde3473545ad73c62a9b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 14:00:58 -0800 Subject: [PATCH 41/71] One more module converted: EmailModule. --- .../Scripting/EMailModules/EmailModule.cs | 110 ++++++++++-------- 1 file changed, 64 insertions(+), 46 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs b/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs index e91e8b9f45..d943b20a2a 100644 --- a/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs @@ -37,10 +37,12 @@ using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using Mono.Addins; namespace OpenSim.Region.CoreModules.Scripting.EmailModules { - public class EmailModule : IRegionModule, IEmailModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "EmailModule")] + public class EmailModule : ISharedRegionModule, IEmailModule { // // Log @@ -72,31 +74,9 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules private bool m_Enabled = false; - public void InsertEmail(UUID to, Email email) - { - // It's tempting to create the queue here. Don't; objects which have - // not yet called GetNextEmail should have no queue, and emails to them - // should be silently dropped. + #region ISharedRegionModule - lock (m_MailQueues) - { - if (m_MailQueues.ContainsKey(to)) - { - if (m_MailQueues[to].Count >= m_MaxQueueSize) - { - // fail silently - return; - } - - lock (m_MailQueues[to]) - { - m_MailQueues[to].Add(email); - } - } - } - } - - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { m_Config = config; IConfig SMTPConfig; @@ -129,36 +109,44 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules SMTP_SERVER_PORT = SMTPConfig.GetInt("SMTP_SERVER_PORT", SMTP_SERVER_PORT); SMTP_SERVER_LOGIN = SMTPConfig.GetString("SMTP_SERVER_LOGIN", SMTP_SERVER_LOGIN); SMTP_SERVER_PASSWORD = SMTPConfig.GetString("SMTP_SERVER_PASSWORD", SMTP_SERVER_PASSWORD); - m_MaxEmailSize = SMTPConfig.GetInt("email_max_size", m_MaxEmailSize); + m_MaxEmailSize = SMTPConfig.GetInt("email_max_size", m_MaxEmailSize); } catch (Exception e) { - m_log.Error("[EMAIL] DefaultEmailModule not configured: "+ e.Message); + m_log.Error("[EMAIL] DefaultEmailModule not configured: " + e.Message); m_Enabled = false; return; } - // It's a go! - if (m_Enabled) + } + + public void AddRegion(Scene scene) + { + if (!m_Enabled) + return; + + // It's a go! + lock (m_Scenes) { - lock (m_Scenes) + // Claim the interface slot + scene.RegisterModuleInterface(this); + + // Add to scene list + if (m_Scenes.ContainsKey(scene.RegionInfo.RegionHandle)) { - // Claim the interface slot - scene.RegisterModuleInterface(this); - - // Add to scene list - if (m_Scenes.ContainsKey(scene.RegionInfo.RegionHandle)) - { - m_Scenes[scene.RegionInfo.RegionHandle] = scene; - } - else - { - m_Scenes.Add(scene.RegionInfo.RegionHandle, scene); - } + m_Scenes[scene.RegionInfo.RegionHandle] = scene; + } + else + { + m_Scenes.Add(scene.RegionInfo.RegionHandle, scene); } - - m_log.Info("[EMAIL] Activated DefaultEmailModule"); } + + m_log.Info("[EMAIL] Activated DefaultEmailModule"); + } + + public void RemoveRegion(Scene scene) + { } public void PostInitialise() @@ -174,9 +162,39 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules get { return "DefaultEmailModule"; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return true; } + get { return null; } + } + + public void RegionLoaded(Scene scene) + { + } + + #endregion + + public void InsertEmail(UUID to, Email email) + { + // It's tempting to create the queue here. Don't; objects which have + // not yet called GetNextEmail should have no queue, and emails to them + // should be silently dropped. + + lock (m_MailQueues) + { + if (m_MailQueues.ContainsKey(to)) + { + if (m_MailQueues[to].Count >= m_MaxQueueSize) + { + // fail silently + return; + } + + lock (m_MailQueues[to]) + { + m_MailQueues[to].Add(email); + } + } + } } private bool IsLocal(UUID objectID) From 963b1e861c710337b23276680ddfb68ec2ceaadf Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 14:22:06 -0800 Subject: [PATCH 42/71] One more module converted: ScriptsHttpRequests. --- .../HttpRequest/ScriptsHttpRequests.cs | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index d328eb37dc..a676971a28 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs @@ -41,6 +41,7 @@ using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using Mono.Addins; /***************************************************** * @@ -87,7 +88,8 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Scripting.HttpRequest { - public class HttpRequestModule : IRegionModule, IHttpRequestModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HttpRequestModule")] + public class HttpRequestModule : ISharedRegionModule, IHttpRequestModule { private object HttpListLock = new object(); private int httpTimeout = 30000; @@ -270,24 +272,38 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest #endregion - #region IRegionModule Members + #region ISharedRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { - m_scene = scene; - - m_scene.RegisterModuleInterface(this); - m_proxyurl = config.Configs["Startup"].GetString("HttpProxy"); m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions"); m_pendingRequests = new Dictionary(); } + public void AddRegion(Scene scene) + { + m_scene = scene; + + m_scene.RegisterModuleInterface(this); + } + + public void RemoveRegion(Scene scene) + { + scene.UnregisterModuleInterface(this); + if (scene == m_scene) + m_scene = null; + } + public void PostInitialise() { } + public void RegionLoaded(Scene scene) + { + } + public void Close() { } @@ -297,9 +313,9 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest get { return m_name; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return true; } + get { return null; } } #endregion From 6759ed1013b78371b28c2d802c5d793e7b32c723 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 14:46:22 -0800 Subject: [PATCH 43/71] One more module converted: LoadImageURLModule. Also removed it from its hard-coded instantiation (I think I understood what the problem was, and that I've done it right). --- .../LoadRegions/LoadRegionsPlugin.cs | 4 +- .../LoadImageURL/LoadImageURLModule.cs | 57 ++++++++++++------- 2 files changed, 40 insertions(+), 21 deletions(-) diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index 00657028e4..e7b12bee0e 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs @@ -101,8 +101,8 @@ namespace OpenSim.ApplicationPlugins.LoadRegions m_log.Info("[LOAD REGIONS PLUGIN]: Loading specific shared modules..."); m_log.Info("[LOAD REGIONS PLUGIN]: DynamicTextureModule..."); m_openSim.ModuleLoader.LoadDefaultSharedModule(new DynamicTextureModule()); - m_log.Info("[LOAD REGIONS PLUGIN]: LoadImageURLModule..."); - m_openSim.ModuleLoader.LoadDefaultSharedModule(new LoadImageURLModule()); + //m_log.Info("[LOAD REGIONS PLUGIN]: LoadImageURLModule..."); + //m_openSim.ModuleLoader.LoadDefaultSharedModule(new LoadImageURLModule()); m_log.Info("[LOAD REGIONS PLUGIN]: XMLRPCModule..."); m_openSim.ModuleLoader.LoadDefaultSharedModule(new XMLRPCModule()); // m_log.Info("[LOADREGIONSPLUGIN]: AssetTransactionModule..."); diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs index 45e652788a..a08a183784 100644 --- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs @@ -37,16 +37,33 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using log4net; using System.Reflection; +using Mono.Addins; namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL { - public class LoadImageURLModule : IRegionModule, IDynamicTextureRender + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LoadImageURLModule")] + public class LoadImageURLModule : ISharedRegionModule, IDynamicTextureRender { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private string m_name = "LoadImageURL"; private Scene m_scene; private IDynamicTextureManager m_textureManager; + private IDynamicTextureManager TextureManager + { + get + { + if (m_textureManager == null && m_scene != null) + { + m_textureManager = m_scene.RequestModuleInterface(); + if (m_textureManager != null) + { + m_textureManager.RegisterRender(GetContentType(), this); + } + } + return m_textureManager; + } + } private string m_proxyurl = ""; private string m_proxyexcepts = ""; @@ -104,29 +121,31 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL #endregion - #region IRegionModule Members + #region ISharedRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { - if (m_scene == null) - { - m_scene = scene; - } - m_proxyurl = config.Configs["Startup"].GetString("HttpProxy"); m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions"); } public void PostInitialise() { - if (m_scene != null) - { - m_textureManager = m_scene.RequestModuleInterface(); - if (m_textureManager != null) - { - m_textureManager.RegisterRender(GetContentType(), this); - } - } + } + + public void AddRegion(Scene scene) + { + if (m_scene == null) + m_scene = scene; + + } + + public void RemoveRegion(Scene scene) + { + } + + public void RegionLoaded(Scene scene) + { } public void Close() @@ -138,9 +157,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL get { return m_name; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return true; } + get { return null; } } #endregion @@ -252,7 +271,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL m_log.DebugFormat("[LOADIMAGEURLMODULE]: Returning {0} bytes of image data for request {1}", imageJ2000.Length, state.RequestID); - m_textureManager.ReturnData( + TextureManager.ReturnData( state.RequestID, new OpenSim.Region.CoreModules.Scripting.DynamicTexture.DynamicTexture( request.RequestUri, null, imageJ2000, newSize, false)); From 9f45198516ef7c7bfc92d638ae142d821852a4d9 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 14:54:40 -0800 Subject: [PATCH 44/71] One more module: DynamicTextureModule. Removed it from the special load in the beginning. --- .../LoadRegions/LoadRegionsPlugin.cs | 4 +- .../DynamicTexture/DynamicTextureModule.cs | 40 +++++++++++++------ 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index e7b12bee0e..920a6bcca5 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs @@ -99,8 +99,8 @@ namespace OpenSim.ApplicationPlugins.LoadRegions RegionInfo[] regionsToLoad = regionLoader.LoadRegions(); m_log.Info("[LOAD REGIONS PLUGIN]: Loading specific shared modules..."); - m_log.Info("[LOAD REGIONS PLUGIN]: DynamicTextureModule..."); - m_openSim.ModuleLoader.LoadDefaultSharedModule(new DynamicTextureModule()); + //m_log.Info("[LOAD REGIONS PLUGIN]: DynamicTextureModule..."); + //m_openSim.ModuleLoader.LoadDefaultSharedModule(new DynamicTextureModule()); //m_log.Info("[LOAD REGIONS PLUGIN]: LoadImageURLModule..."); //m_openSim.ModuleLoader.LoadDefaultSharedModule(new LoadImageURLModule()); m_log.Info("[LOAD REGIONS PLUGIN]: XMLRPCModule..."); diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index 93a045eff7..9d905174f9 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs @@ -37,10 +37,12 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using log4net; using System.Reflection; +using Mono.Addins; namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture { - public class DynamicTextureModule : IRegionModule, IDynamicTextureManager + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DynamicTextureModule")] + public class DynamicTextureModule : ISharedRegionModule, IDynamicTextureManager { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -323,17 +325,30 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture #endregion - #region IRegionModule Members + #region ISharedRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { IConfig texturesConfig = config.Configs["Textures"]; if (texturesConfig != null) { ReuseTextures = texturesConfig.GetBoolean("ReuseDynamicTextures", false); ReuseLowDataTextures = texturesConfig.GetBoolean("ReuseDynamicLowDataTextures", false); - } + if (ReuseTextures) + { + m_reuseableDynamicTextures = new Cache(CacheMedium.Memory, CacheStrategy.Conservative); + m_reuseableDynamicTextures.DefaultTTL = new TimeSpan(24, 0, 0); + } + } + } + + public void PostInitialise() + { + } + + public void AddRegion(Scene scene) + { if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID)) { RegisteredScenes.Add(scene.RegionInfo.RegionID, scene); @@ -341,13 +356,14 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture } } - public void PostInitialise() + public void RegionLoaded(Scene scene) { - if (ReuseTextures) - { - m_reuseableDynamicTextures = new Cache(CacheMedium.Memory, CacheStrategy.Conservative); - m_reuseableDynamicTextures.DefaultTTL = new TimeSpan(24, 0, 0); - } + } + + public void RemoveRegion(Scene scene) + { + if (RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID)) + RegisteredScenes.Remove(scene.RegionInfo.RegionID); } public void Close() @@ -359,9 +375,9 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture get { return "DynamicTextureModule"; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return true; } + get { return null; } } #endregion From 4de8915dddf7fdf6456b471c303b4d214ad1bb8e Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 15:04:02 -0800 Subject: [PATCH 45/71] One more module converted: VectorRenderModule. --- .../VectorRender/VectorRenderModule.cs | 68 +++++++++++-------- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index b4e3d775c5..efa99e9648 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -40,12 +40,14 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using log4net; using System.Reflection; +using Mono.Addins; //using Cairo; namespace OpenSim.Region.CoreModules.Scripting.VectorRender { - public class VectorRenderModule : IRegionModule, IDynamicTextureRender + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "VectorRenderModule")] + public class VectorRenderModule : ISharedRegionModule, IDynamicTextureRender { // These fields exist for testing purposes, please do not remove. // private static bool s_flipper; @@ -56,6 +58,22 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender private Scene m_scene; private IDynamicTextureManager m_textureManager; + private IDynamicTextureManager TextureManager + { + get + { + if (m_textureManager == null && m_scene != null) + { + m_textureManager = m_scene.RequestModuleInterface(); + if (m_textureManager != null) + { + m_textureManager.RegisterRender(GetContentType(), this); + } + } + return m_textureManager; + } + } + private Graphics m_graph; private string m_fontName = "Arial"; @@ -104,7 +122,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender public bool AsyncConvertData(UUID id, string bodyData, string extraParams) { // XXX: This isn't actually being done asynchronously! - m_textureManager.ReturnData(id, ConvertData(bodyData, extraParams)); + TextureManager.ReturnData(id, ConvertData(bodyData, extraParams)); return true; } @@ -131,45 +149,41 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender #endregion - #region IRegionModule Members + #region ISharedRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { - if (m_scene == null) - { - m_scene = scene; - } - - if (m_graph == null) - { - // We won't dispose of these explicitly since this module is only removed when the entire simulator - // is shut down. - Bitmap bitmap = new Bitmap(1024, 1024, PixelFormat.Format32bppArgb); - m_graph = Graphics.FromImage(bitmap); - } - IConfig cfg = config.Configs["VectorRender"]; if (null != cfg) { m_fontName = cfg.GetString("font_name", m_fontName); } m_log.DebugFormat("[VECTORRENDERMODULE]: using font \"{0}\" for text rendering.", m_fontName); + + // We won't dispose of these explicitly since this module is only removed when the entire simulator + // is shut down. + Bitmap bitmap = new Bitmap(1024, 1024, PixelFormat.Format32bppArgb); + m_graph = Graphics.FromImage(bitmap); } public void PostInitialise() { - m_textureManager = m_scene.RequestModuleInterface(); - if (m_textureManager != null) + } + + public void AddRegion(Scene scene) + { + if (m_scene == null) { - m_textureManager.RegisterRender(GetContentType(), this); + m_scene = scene; } + } - // This code exists for testing purposes, please do not remove. -// s_asset1Data = m_scene.AssetService.Get("00000000-0000-1111-9999-000000000001").Data; -// s_asset1Data = m_scene.AssetService.Get("9f4acf0d-1841-4e15-bdb8-3a12efc9dd8f").Data; + public void RegionLoaded(Scene scene) + { + } - // Terrain dirt - smallest bin/assets file (6004 bytes) -// s_asset2Data = m_scene.AssetService.Get("b8d3965a-ad78-bf43-699b-bff8eca6c975").Data; + public void RemoveRegion(Scene scene) + { } public void Close() @@ -181,9 +195,9 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender get { return "VectorRenderModule"; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return true; } + get { return null; } } #endregion From 571f6a030002e754e9c711218396fa649ac28de6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 15:29:25 -0800 Subject: [PATCH 46/71] One more module converted: XMLRPCModule. Removed it from the special loading at start. --- .../LoadRegions/LoadRegionsPlugin.cs | 4 +- .../Scripting/XMLRPC/XMLRPCModule.cs | 82 ++++++++++++------- 2 files changed, 53 insertions(+), 33 deletions(-) diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index 920a6bcca5..a8a3237389 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs @@ -103,8 +103,8 @@ namespace OpenSim.ApplicationPlugins.LoadRegions //m_openSim.ModuleLoader.LoadDefaultSharedModule(new DynamicTextureModule()); //m_log.Info("[LOAD REGIONS PLUGIN]: LoadImageURLModule..."); //m_openSim.ModuleLoader.LoadDefaultSharedModule(new LoadImageURLModule()); - m_log.Info("[LOAD REGIONS PLUGIN]: XMLRPCModule..."); - m_openSim.ModuleLoader.LoadDefaultSharedModule(new XMLRPCModule()); + //m_log.Info("[LOAD REGIONS PLUGIN]: XMLRPCModule..."); + //m_openSim.ModuleLoader.LoadDefaultSharedModule(new XMLRPCModule()); // m_log.Info("[LOADREGIONSPLUGIN]: AssetTransactionModule..."); // m_openSim.ModuleLoader.LoadDefaultSharedModule(new AssetTransactionModule()); m_log.Info("[LOAD REGIONS PLUGIN]: Done."); diff --git a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs index 0003af2cc9..385f5ad7f1 100644 --- a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs @@ -40,6 +40,7 @@ using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using Mono.Addins; /***************************************************** * @@ -76,7 +77,8 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Scripting.XMLRPC { - public class XMLRPCModule : IRegionModule, IXMLRPC + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "XMLRPCModule")] + public class XMLRPCModule : ISharedRegionModule, IXMLRPC { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -86,6 +88,10 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC private Dictionary m_openChannels; private Dictionary m_pendingSRDResponses; private int m_remoteDataPort = 0; + public int Port + { + get { return m_remoteDataPort; } + } private Dictionary m_rpcPending; private Dictionary m_rpcPendingResponses; @@ -94,34 +100,24 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC private int RemoteReplyScriptWait = 300; private object XMLRPCListLock = new object(); - #region IRegionModule Members + #region ISharedRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { // We need to create these early because the scripts might be calling // But since this gets called for every region, we need to make sure they // get called only one time (or we lose any open channels) - if (null == m_openChannels) - { - m_openChannels = new Dictionary(); - m_rpcPending = new Dictionary(); - m_rpcPendingResponses = new Dictionary(); - m_pendingSRDResponses = new Dictionary(); + m_openChannels = new Dictionary(); + m_rpcPending = new Dictionary(); + m_rpcPendingResponses = new Dictionary(); + m_pendingSRDResponses = new Dictionary(); - try - { - m_remoteDataPort = config.Configs["XMLRPC"].GetInt("XmlRpcPort", m_remoteDataPort); - } - catch (Exception) - { - } + try + { + m_remoteDataPort = config.Configs["XMLRPC"].GetInt("XmlRpcPort", m_remoteDataPort); } - - if (!m_scenes.Contains(scene)) + catch (Exception) { - m_scenes.Add(scene); - - scene.RegisterModuleInterface(this); } } @@ -131,15 +127,44 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC { // Start http server // Attach xmlrpc handlers -// m_log.InfoFormat( -// "[XML RPC MODULE]: Starting up XMLRPC Server on port {0} for llRemoteData commands.", -// m_remoteDataPort); + // m_log.InfoFormat( + // "[XML RPC MODULE]: Starting up XMLRPC Server on port {0} for llRemoteData commands.", + // m_remoteDataPort); IHttpServer httpServer = MainServer.GetHttpServer((uint)m_remoteDataPort); httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData); } } + public void AddRegion(Scene scene) + { + if (!IsEnabled()) + return; + + if (!m_scenes.Contains(scene)) + { + m_scenes.Add(scene); + + scene.RegisterModuleInterface(this); + } + } + + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + if (!IsEnabled()) + return; + + if (m_scenes.Contains(scene)) + { + scene.UnregisterModuleInterface(this); + m_scenes.Remove(scene); + } + } + public void Close() { } @@ -149,14 +174,9 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC get { return m_name; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return true; } - } - - public int Port - { - get { return m_remoteDataPort; } + get { return null; } } #endregion From ba2318bd6143fb465ca641647d44a3c6e1ffc8c1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 15:59:09 -0800 Subject: [PATCH 47/71] One more module converted: PermissionsModule. --- .../World/Permissions/PermissionsModule.cs | 305 ++++++++++-------- 1 file changed, 174 insertions(+), 131 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 7a8a57c833..ddaa227c79 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -37,13 +37,17 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; +using Mono.Addins; + namespace OpenSim.Region.CoreModules.World.Permissions { - public class PermissionsModule : IRegionModule, IPermissionsModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "PermissionsModule")] + public class PermissionsModule : INonSharedRegionModule, IPermissionsModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected Scene m_scene; + protected bool m_Enabled; private InventoryFolderImpl m_libraryRootFolder; protected InventoryFolderImpl LibraryRootFolder @@ -114,18 +118,44 @@ namespace OpenSim.Region.CoreModules.World.Permissions private Dictionary GrantVB = new Dictionary(); private Dictionary GrantJS = new Dictionary(); private Dictionary GrantYP = new Dictionary(); + private IFriendsModule m_friendsModule; + private IFriendsModule FriendsModule + { + get + { + if (m_friendsModule == null) + m_friendsModule = m_scene.RequestModuleInterface(); + return m_friendsModule; + } + } private IGroupsModule m_groupsModule; - private IMoapModule m_moapModule; + private IGroupsModule GroupsModule + { + get + { + if (m_groupsModule == null) + m_groupsModule = m_scene.RequestModuleInterface(); + return m_groupsModule; + } + } + private IMoapModule m_moapModule; + private IMoapModule MoapModule + { + get + { + if (m_moapModule == null) + m_moapModule = m_scene.RequestModuleInterface(); + return m_moapModule; + } + } #endregion - #region IRegionModule Members + #region INonSharedRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { - m_scene = scene; - IConfig myConfig = config.Configs["Startup"]; string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule"); @@ -135,6 +165,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions if (!modules.Contains("DefaultPermissionsModule")) return; + m_Enabled = true; + m_allowGridGods = myConfig.GetBoolean("allow_grid_gods", false); m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true); m_propagatePermissions = myConfig.GetBoolean("propagate_permissions", true); @@ -144,7 +176,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions m_SimpleBuildPermissions = myConfig.GetBoolean("simple_build_permissions", false); - m_allowedScriptCreators + m_allowedScriptCreators = ParseUserSetConfigSetting(myConfig, "allowed_script_creators", m_allowedScriptCreators); m_allowedScriptEditors = ParseUserSetConfigSetting(myConfig, "allowed_script_editors", m_allowedScriptEditors); @@ -154,97 +186,31 @@ namespace OpenSim.Region.CoreModules.World.Permissions else m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks"); - scene.RegisterModuleInterface(this); - - //Register functions with Scene External Checks! - m_scene.Permissions.OnBypassPermissions += BypassPermissions; - m_scene.Permissions.OnSetBypassPermissions += SetBypassPermissions; - m_scene.Permissions.OnPropagatePermissions += PropagatePermissions; - m_scene.Permissions.OnGenerateClientFlags += GenerateClientFlags; - m_scene.Permissions.OnAbandonParcel += CanAbandonParcel; - m_scene.Permissions.OnReclaimParcel += CanReclaimParcel; - m_scene.Permissions.OnDeedParcel += CanDeedParcel; - m_scene.Permissions.OnDeedObject += CanDeedObject; - m_scene.Permissions.OnIsGod += IsGod; - m_scene.Permissions.OnIsGridGod += IsGridGod; - m_scene.Permissions.OnIsAdministrator += IsAdministrator; - m_scene.Permissions.OnDuplicateObject += CanDuplicateObject; - m_scene.Permissions.OnDeleteObject += CanDeleteObject; //MAYBE FULLY IMPLEMENTED - m_scene.Permissions.OnEditObject += CanEditObject; //MAYBE FULLY IMPLEMENTED - m_scene.Permissions.OnEditParcelProperties += CanEditParcelProperties; //MAYBE FULLY IMPLEMENTED - m_scene.Permissions.OnInstantMessage += CanInstantMessage; - m_scene.Permissions.OnInventoryTransfer += CanInventoryTransfer; //NOT YET IMPLEMENTED - m_scene.Permissions.OnIssueEstateCommand += CanIssueEstateCommand; //FULLY IMPLEMENTED - m_scene.Permissions.OnMoveObject += CanMoveObject; //MAYBE FULLY IMPLEMENTED - m_scene.Permissions.OnObjectEntry += CanObjectEntry; - m_scene.Permissions.OnReturnObjects += CanReturnObjects; //NOT YET IMPLEMENTED - m_scene.Permissions.OnRezObject += CanRezObject; //MAYBE FULLY IMPLEMENTED - m_scene.Permissions.OnRunConsoleCommand += CanRunConsoleCommand; - m_scene.Permissions.OnRunScript += CanRunScript; //NOT YET IMPLEMENTED - m_scene.Permissions.OnCompileScript += CanCompileScript; - m_scene.Permissions.OnSellParcel += CanSellParcel; - m_scene.Permissions.OnTakeObject += CanTakeObject; - m_scene.Permissions.OnTakeCopyObject += CanTakeCopyObject; - m_scene.Permissions.OnTerraformLand += CanTerraformLand; - m_scene.Permissions.OnLinkObject += CanLinkObject; //NOT YET IMPLEMENTED - m_scene.Permissions.OnDelinkObject += CanDelinkObject; //NOT YET IMPLEMENTED - m_scene.Permissions.OnBuyLand += CanBuyLand; //NOT YET IMPLEMENTED - - m_scene.Permissions.OnViewNotecard += CanViewNotecard; //NOT YET IMPLEMENTED - m_scene.Permissions.OnViewScript += CanViewScript; //NOT YET IMPLEMENTED - m_scene.Permissions.OnEditNotecard += CanEditNotecard; //NOT YET IMPLEMENTED - m_scene.Permissions.OnEditScript += CanEditScript; //NOT YET IMPLEMENTED - - m_scene.Permissions.OnCreateObjectInventory += CanCreateObjectInventory; - m_scene.Permissions.OnEditObjectInventory += CanEditObjectInventory;//MAYBE FULLY IMPLEMENTED - m_scene.Permissions.OnCopyObjectInventory += CanCopyObjectInventory; //NOT YET IMPLEMENTED - m_scene.Permissions.OnDeleteObjectInventory += CanDeleteObjectInventory; //NOT YET IMPLEMENTED - m_scene.Permissions.OnResetScript += CanResetScript; - - m_scene.Permissions.OnCreateUserInventory += CanCreateUserInventory; //NOT YET IMPLEMENTED - m_scene.Permissions.OnCopyUserInventory += CanCopyUserInventory; //NOT YET IMPLEMENTED - m_scene.Permissions.OnEditUserInventory += CanEditUserInventory; //NOT YET IMPLEMENTED - m_scene.Permissions.OnDeleteUserInventory += CanDeleteUserInventory; //NOT YET IMPLEMENTED - - m_scene.Permissions.OnTeleport += CanTeleport; //NOT YET IMPLEMENTED - - m_scene.Permissions.OnControlPrimMedia += CanControlPrimMedia; - m_scene.Permissions.OnInteractWithPrimMedia += CanInteractWithPrimMedia; - - m_scene.AddCommand("Users", this, "bypass permissions", - "bypass permissions ", - "Bypass permission checks", - HandleBypassPermissions); - - m_scene.AddCommand("Users", this, "force permissions", - "force permissions ", - "Force permissions on or off", - HandleForcePermissions); - - m_scene.AddCommand("Debug", this, "debug permissions", - "debug permissions ", - "Turn on permissions debugging", - HandleDebugPermissions); - - string grant = myConfig.GetString("GrantLSL",""); - if (grant.Length > 0) { - foreach (string uuidl in grant.Split(',')) { + string grant = myConfig.GetString("GrantLSL", ""); + if (grant.Length > 0) + { + foreach (string uuidl in grant.Split(',')) + { string uuid = uuidl.Trim(" \t".ToCharArray()); GrantLSL.Add(uuid, true); } } - grant = myConfig.GetString("GrantCS",""); - if (grant.Length > 0) { - foreach (string uuidl in grant.Split(',')) { + grant = myConfig.GetString("GrantCS", ""); + if (grant.Length > 0) + { + foreach (string uuidl in grant.Split(',')) + { string uuid = uuidl.Trim(" \t".ToCharArray()); GrantCS.Add(uuid, true); } } - grant = myConfig.GetString("GrantVB",""); - if (grant.Length > 0) { - foreach (string uuidl in grant.Split(',')) { + grant = myConfig.GetString("GrantVB", ""); + if (grant.Length > 0) + { + foreach (string uuidl in grant.Split(',')) + { string uuid = uuidl.Trim(" \t".ToCharArray()); GrantVB.Add(uuid, true); } @@ -269,9 +235,119 @@ namespace OpenSim.Region.CoreModules.World.Permissions GrantYP.Add(uuid, true); } } - } + public void AddRegion(Scene scene) + { + if (!m_Enabled) + return; + + m_scene = scene; + + scene.RegisterModuleInterface(this); + + //Register functions with Scene External Checks! + m_scene.Permissions.OnBypassPermissions += BypassPermissions; + m_scene.Permissions.OnSetBypassPermissions += SetBypassPermissions; + m_scene.Permissions.OnPropagatePermissions += PropagatePermissions; + m_scene.Permissions.OnGenerateClientFlags += GenerateClientFlags; + m_scene.Permissions.OnAbandonParcel += CanAbandonParcel; + m_scene.Permissions.OnReclaimParcel += CanReclaimParcel; + m_scene.Permissions.OnDeedParcel += CanDeedParcel; + m_scene.Permissions.OnDeedObject += CanDeedObject; + m_scene.Permissions.OnIsGod += IsGod; + m_scene.Permissions.OnIsGridGod += IsGridGod; + m_scene.Permissions.OnIsAdministrator += IsAdministrator; + m_scene.Permissions.OnDuplicateObject += CanDuplicateObject; + m_scene.Permissions.OnDeleteObject += CanDeleteObject; + m_scene.Permissions.OnEditObject += CanEditObject; + m_scene.Permissions.OnEditParcelProperties += CanEditParcelProperties; + m_scene.Permissions.OnInstantMessage += CanInstantMessage; + m_scene.Permissions.OnInventoryTransfer += CanInventoryTransfer; + m_scene.Permissions.OnIssueEstateCommand += CanIssueEstateCommand; + m_scene.Permissions.OnMoveObject += CanMoveObject; + m_scene.Permissions.OnObjectEntry += CanObjectEntry; + m_scene.Permissions.OnReturnObjects += CanReturnObjects; + m_scene.Permissions.OnRezObject += CanRezObject; + m_scene.Permissions.OnRunConsoleCommand += CanRunConsoleCommand; + m_scene.Permissions.OnRunScript += CanRunScript; + m_scene.Permissions.OnCompileScript += CanCompileScript; + m_scene.Permissions.OnSellParcel += CanSellParcel; + m_scene.Permissions.OnTakeObject += CanTakeObject; + m_scene.Permissions.OnTakeCopyObject += CanTakeCopyObject; + m_scene.Permissions.OnTerraformLand += CanTerraformLand; + m_scene.Permissions.OnLinkObject += CanLinkObject; + m_scene.Permissions.OnDelinkObject += CanDelinkObject; + m_scene.Permissions.OnBuyLand += CanBuyLand; + + m_scene.Permissions.OnViewNotecard += CanViewNotecard; + m_scene.Permissions.OnViewScript += CanViewScript; + m_scene.Permissions.OnEditNotecard += CanEditNotecard; + m_scene.Permissions.OnEditScript += CanEditScript; + + m_scene.Permissions.OnCreateObjectInventory += CanCreateObjectInventory; + m_scene.Permissions.OnEditObjectInventory += CanEditObjectInventory; + m_scene.Permissions.OnCopyObjectInventory += CanCopyObjectInventory; + m_scene.Permissions.OnDeleteObjectInventory += CanDeleteObjectInventory; + m_scene.Permissions.OnResetScript += CanResetScript; + + m_scene.Permissions.OnCreateUserInventory += CanCreateUserInventory; + m_scene.Permissions.OnCopyUserInventory += CanCopyUserInventory; + m_scene.Permissions.OnEditUserInventory += CanEditUserInventory; + m_scene.Permissions.OnDeleteUserInventory += CanDeleteUserInventory; + + m_scene.Permissions.OnTeleport += CanTeleport; + + m_scene.Permissions.OnControlPrimMedia += CanControlPrimMedia; + m_scene.Permissions.OnInteractWithPrimMedia += CanInteractWithPrimMedia; + + m_scene.AddCommand("Users", this, "bypass permissions", + "bypass permissions ", + "Bypass permission checks", + HandleBypassPermissions); + + m_scene.AddCommand("Users", this, "force permissions", + "force permissions ", + "Force permissions on or off", + HandleForcePermissions); + + m_scene.AddCommand("Debug", this, "debug permissions", + "debug permissions ", + "Turn on permissions debugging", + HandleDebugPermissions); + + } + + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + if (!m_Enabled) + return; + + m_scene.UnregisterModuleInterface(this); + } + + public void Close() + { + } + + public string Name + { + get { return "PermissionsModule"; } + } + + public Type ReplaceableInterface + { + get { return null; } + } + + #endregion + + #region Console command handlers + public void HandleBypassPermissions(string module, string[] args) { if (m_scene.ConsoleScene() != null && @@ -290,7 +366,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions m_bypassPermissions = val; m_log.InfoFormat( - "[PERMISSIONS]: Set permissions bypass to {0} for {1}", + "[PERMISSIONS]: Set permissions bypass to {0} for {1}", m_bypassPermissions, m_scene.RegionInfo.RegionName); } } @@ -343,39 +419,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions } } - public void PostInitialise() - { - m_friendsModule = m_scene.RequestModuleInterface(); - - if (m_friendsModule == null) - m_log.Debug("[PERMISSIONS]: Friends module not found, friend permissions will not work"); - - m_groupsModule = m_scene.RequestModuleInterface(); - - if (m_groupsModule == null) - m_log.Debug("[PERMISSIONS]: Groups module not found, group permissions will not work"); - - m_moapModule = m_scene.RequestModuleInterface(); - - // This log line will be commented out when no longer required for debugging -// if (m_moapModule == null) -// m_log.Warn("[PERMISSIONS]: Media on a prim module not found, media on a prim permissions will not work"); - } - - public void Close() - { - } - - public string Name - { - get { return "PermissionsModule"; } - } - - public bool IsSharedModule - { - get { return false; } - } - #endregion #region Helper Functions @@ -400,10 +443,10 @@ namespace OpenSim.Region.CoreModules.World.Permissions /// protected bool IsGroupMember(UUID groupID, UUID userID, ulong powers) { - if (null == m_groupsModule) + if (null == GroupsModule) return false; - GroupMembershipData gmd = m_groupsModule.GetMembershipData(groupID, userID); + GroupMembershipData gmd = GroupsModule.GetMembershipData(groupID, userID); if (gmd != null) { @@ -503,10 +546,10 @@ namespace OpenSim.Region.CoreModules.World.Permissions if (user == UUID.Zero) return false; - if (m_friendsModule == null) + if (FriendsModule == null) return false; - int friendPerms = m_friendsModule.GetRightsGrantedByFriend(user, objectOwner); + int friendPerms = FriendsModule.GetRightsGrantedByFriend(user, objectOwner); return (friendPerms & (int)FriendRights.CanModifyObjects) != 0; } @@ -1915,14 +1958,14 @@ namespace OpenSim.Region.CoreModules.World.Permissions // "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}", // agentID, primID, face); - if (null == m_moapModule) + if (null == MoapModule) return false; SceneObjectPart part = m_scene.GetSceneObjectPart(primID); if (null == part) return false; - MediaEntry me = m_moapModule.GetMediaEntry(part, face); + MediaEntry me = MoapModule.GetMediaEntry(part, face); // If there is no existing media entry then it can be controlled (in this context, created). if (null == me) @@ -1941,14 +1984,14 @@ namespace OpenSim.Region.CoreModules.World.Permissions // "[PERMISSONS]: Performing CanInteractWithPrimMedia check with agentID {0}, primID {1}, face {2}", // agentID, primID, face); - if (null == m_moapModule) + if (null == MoapModule) return false; SceneObjectPart part = m_scene.GetSceneObjectPart(primID); if (null == part) return false; - MediaEntry me = m_moapModule.GetMediaEntry(part, face); + MediaEntry me = MoapModule.GetMediaEntry(part, face); // If there is no existing media entry then it can be controlled (in this context, created). if (null == me) From abef034d1b4f3553384b43b33da2b6993d6437b6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 16:10:47 -0800 Subject: [PATCH 48/71] One more module converted: IRCStackModule. --- .../InternetRelayClientView/IRCStackModule.cs | 74 +++++++++++-------- 1 file changed, 45 insertions(+), 29 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index cfe1278786..406b715f25 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Net; using System.Reflection; using log4net; @@ -33,29 +34,65 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server; +using Mono.Addins; + namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView { - public class IRCStackModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "IRCStackModule")] + public class IRCStackModule : INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private IRCServer m_server; + private int m_Port; // private Scene m_scene; + private bool m_Enabled; - #region Implementation of IRegionModule + #region Implementation of INonSharedRegionModule - public void Initialise(Scene scene, IConfigSource source) + public void Initialise(IConfigSource source) { if (null != source.Configs["IRCd"] && - source.Configs["IRCd"].GetBoolean("Enabled",false)) + source.Configs["IRCd"].GetBoolean("Enabled", false)) { - int portNo = source.Configs["IRCd"].GetInt("Port",6666); -// m_scene = scene; - m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), portNo, scene); - m_server.OnNewIRCClient += m_server_OnNewIRCClient; + m_Enabled = true; + m_Port = source.Configs["IRCd"].GetInt("Port", 6666); } } + public void AddRegion(Scene scene) + { + if (!m_Enabled) + return; + + m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), m_Port, scene); + m_server.OnNewIRCClient += m_server_OnNewIRCClient; + } + + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + } + + public void Close() + { + } + + public string Name + { + get { return "IRCClientStackModule"; } + } + + public Type ReplaceableInterface + { + get { return null; } + } + + #endregion + void m_server_OnNewIRCClient(IRCClientView user) { user.OnIRCReady += user_OnIRCReady; @@ -68,26 +105,5 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView m_log.Info("[IRCd] Added user to Scene"); } - public void PostInitialise() - { - - } - - public void Close() - { - - } - - public string Name - { - get { return "IRCClientStackModule"; } - } - - public bool IsSharedModule - { - get { return false; } - } - - #endregion } } From 4e8c8b2cd8954ca2ce87d642e4c106c904ec2295 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 16:18:47 -0800 Subject: [PATCH 49/71] One more module converted: MRMModule. --- .../Scripting/Minimodule/MRMModule.cs | 95 +++++++++++-------- 1 file changed, 58 insertions(+), 37 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs index 03481d2d29..6fb28e2d1b 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs @@ -43,13 +43,17 @@ using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using Mono.Addins; namespace OpenSim.Region.OptionalModules.Scripting.Minimodule { - public class MRMModule : IRegionModule, IMRMModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MRMModule")] + public class MRMModule : INonSharedRegionModule, IMRMModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; + private bool m_Enabled; + private bool m_Hidden; private readonly Dictionary m_scripts = new Dictionary(); @@ -67,7 +71,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule m_extensions[typeof (T)] = instance; } - public void Initialise(Scene scene, IConfigSource source) + #region INonSharedRegionModule + + public void Initialise(IConfigSource source) { if (source.Configs["MRM"] != null) { @@ -76,23 +82,60 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule if (source.Configs["MRM"].GetBoolean("Enabled", false)) { m_log.Info("[MRM]: Enabling MRM Module"); - m_scene = scene; - - // when hidden, we don't listen for client initiated script events - // only making the MRM engine available for region modules - if (!source.Configs["MRM"].GetBoolean("Hidden", false)) - { - scene.EventManager.OnRezScript += EventManager_OnRezScript; - scene.EventManager.OnStopScript += EventManager_OnStopScript; - } - - scene.EventManager.OnFrame += EventManager_OnFrame; - - scene.RegisterModuleInterface(this); + m_Enabled = true; + m_Hidden = source.Configs["MRM"].GetBoolean("Hidden", false); } } } + public void AddRegion(Scene scene) + { + if (!m_Enabled) + return; + + m_scene = scene; + + // when hidden, we don't listen for client initiated script events + // only making the MRM engine available for region modules + if (!m_Hidden) + { + scene.EventManager.OnRezScript += EventManager_OnRezScript; + scene.EventManager.OnStopScript += EventManager_OnStopScript; + } + + scene.EventManager.OnFrame += EventManager_OnFrame; + + scene.RegisterModuleInterface(this); + } + + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + } + + public void Close() + { + foreach (KeyValuePair pair in m_scripts) + { + pair.Value.Stop(); + } + } + + public string Name + { + get { return "MiniRegionModule"; } + } + + public Type ReplaceableInterface + { + get { return null; } + } + + #endregion + void EventManager_OnStopScript(uint localID, UUID itemID) { if (m_scripts.ContainsKey(itemID)) @@ -293,28 +336,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule mmb.InitMiniModule(world, host, itemID); } - public void PostInitialise() - { - } - - public void Close() - { - foreach (KeyValuePair pair in m_scripts) - { - pair.Value.Stop(); - } - } - - public string Name - { - get { return "MiniRegionModule"; } - } - - public bool IsSharedModule - { - get { return false; } - } - /// /// Stolen from ScriptEngine Common /// From 64fad2f80e1bf7a73b7e92adf4462e1b6f9aa335 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 16:44:59 -0800 Subject: [PATCH 50/71] Two more modules converted: XmlRpcGridRouterModule and XmlRpcRouterModule. --- .../XmlRpcGridRouterModule.cs | 36 ++++++++++++---- .../XmlRpcRouterModule/XmlRpcRouterModule.cs | 42 ++++++++++++++----- 2 files changed, 60 insertions(+), 18 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs index 2187449471..6120a81b6c 100644 --- a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs @@ -32,6 +32,7 @@ using System.Reflection; using log4net; using Nini.Config; using OpenMetaverse; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Framework.Communications; @@ -49,7 +50,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule public string uri; } - public class XmlRpcGridRouter : IRegionModule, IXmlRpcRouter + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "XmlRpcGridRouter")] + public class XmlRpcGridRouter : INonSharedRegionModule, IXmlRpcRouter { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -59,9 +61,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule private bool m_Enabled = false; private string m_ServerURI = String.Empty; - public void Initialise(Scene scene, IConfigSource config) + #region INonSharedRegionModule + + public void Initialise(IConfigSource config) { - IConfig startupConfig = config.Configs["Startup"]; + IConfig startupConfig = config.Configs["XMLRPC"]; if (startupConfig == null) return; @@ -74,14 +78,28 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule m_log.Error("[XMLRPC GRID ROUTER] Module configured but no URI given. Disabling"); return; } - - scene.RegisterModuleInterface(this); m_Enabled = true; } } - public void PostInitialise() + public void AddRegion(Scene scene) { + if (!m_Enabled) + return; + + scene.RegisterModuleInterface(this); + } + + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + if (!m_Enabled) + return; + + scene.UnregisterModuleInterface(this); } public void Close() @@ -93,11 +111,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule get { return "XmlRpcGridRouterModule"; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return false; } + get { return null; } } + #endregion + public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri) { if (!m_Channels.ContainsKey(itemID)) diff --git a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs index 32659c8e5d..4783f4c25a 100644 --- a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs @@ -31,6 +31,7 @@ using System.Reflection; using log4net; using Nini.Config; using OpenMetaverse; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; @@ -39,25 +40,44 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule { - public class XmlRpcRouter : IRegionModule, IXmlRpcRouter + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "XmlRpcRouter")] + public class XmlRpcRouter : INonSharedRegionModule, IXmlRpcRouter { //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - public void Initialise(Scene scene, IConfigSource config) + + private bool m_Enabled; + + #region INonSharedRegionModule + + public void Initialise(IConfigSource config) { - IConfig startupConfig = config.Configs["Startup"]; + IConfig startupConfig = config.Configs["XMLRPC"]; if (startupConfig == null) return; if (startupConfig.GetString("XmlRpcRouterModule", "XmlRpcRouterModule") == "XmlRpcRouterModule") - { - scene.RegisterModuleInterface(this); - } + m_Enabled = true; } - public void PostInitialise() + public void AddRegion(Scene scene) { + if (!m_Enabled) + return; + + scene.RegisterModuleInterface(this); + } + + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + if (!m_Enabled) + return; + + scene.UnregisterModuleInterface(this); } public void Close() @@ -69,11 +89,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule get { return "XmlRpcRouterModule"; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return false; } + get { return null; } } + #endregion + public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri) { scriptEngine.PostScriptEvent(itemID, "xmlrpc_uri", new Object[] {uri}); From 113a9704f286077c64c2f51c59503b64bf681734 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 17:02:22 -0800 Subject: [PATCH 51/71] One more module converted: WebStatsModule. --- .../Region/UserStatistics/WebStatsModule.cs | 169 ++++++++++-------- 1 file changed, 93 insertions(+), 76 deletions(-) diff --git a/OpenSim/Region/UserStatistics/WebStatsModule.cs b/OpenSim/Region/UserStatistics/WebStatsModule.cs index 625eba4b0a..b08233c7aa 100644 --- a/OpenSim/Region/UserStatistics/WebStatsModule.cs +++ b/OpenSim/Region/UserStatistics/WebStatsModule.cs @@ -43,15 +43,20 @@ using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using Mono.Data.SqliteClient; +using Mono.Addins; using Caps = OpenSim.Framework.Capabilities.Caps; using OSD = OpenMetaverse.StructuredData.OSD; using OSDMap = OpenMetaverse.StructuredData.OSDMap; +[assembly: Addin("WebStats", "1.0")] +[assembly: AddinDependency("OpenSim", "0.5")] + namespace OpenSim.Region.UserStatistics { - public class WebStatsModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WebStatsModule")] + public class WebStatsModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -74,59 +79,69 @@ namespace OpenSim.Region.UserStatistics private string m_loglines = String.Empty; private volatile int lastHit = 12000; - public virtual void Initialise(Scene scene, IConfigSource config) + #region ISharedRegionModule + + public virtual void Initialise(IConfigSource config) { IConfig cnfg = config.Configs["WebStats"]; if (cnfg != null) enabled = cnfg.GetBoolean("enabled", false); - + } + + public virtual void PostInitialise() + { + if (!enabled) + return; + + AddEventHandlers(); + + if (Util.IsWindows()) + Util.LoadArchSpecificWindowsDll("sqlite3.dll"); + + //IConfig startupConfig = config.Configs["Startup"]; + + dbConn = new SqliteConnection("URI=file:LocalUserStatistics.db,version=3"); + dbConn.Open(); + CreateTables(dbConn); + + Prototype_distributor protodep = new Prototype_distributor(); + Updater_distributor updatedep = new Updater_distributor(); + ActiveConnectionsAJAX ajConnections = new ActiveConnectionsAJAX(); + SimStatsAJAX ajSimStats = new SimStatsAJAX(); + LogLinesAJAX ajLogLines = new LogLinesAJAX(); + Default_Report defaultReport = new Default_Report(); + Clients_report clientReport = new Clients_report(); + Sessions_Report sessionsReport = new Sessions_Report(); + + reports.Add("prototype.js", protodep); + reports.Add("updater.js", updatedep); + reports.Add("activeconnectionsajax.html", ajConnections); + reports.Add("simstatsajax.html", ajSimStats); + reports.Add("activelogajax.html", ajLogLines); + reports.Add("default.report", defaultReport); + reports.Add("clients.report", clientReport); + reports.Add("sessions.report", sessionsReport); + + //// + // Add Your own Reports here (Do Not Modify Lines here Devs!) + //// + + //// + // End Own reports section + //// + + MainServer.Instance.AddHTTPHandler("/SStats/", HandleStatsRequest); + MainServer.Instance.AddHTTPHandler("/CAPS/VS/", HandleUnknownCAPSRequest); + } + + public virtual void AddRegion(Scene scene) + { if (!enabled) return; lock (m_scenes) { - if (m_scenes.Count == 0) - { - if (Util.IsWindows()) - Util.LoadArchSpecificWindowsDll("sqlite3.dll"); - - //IConfig startupConfig = config.Configs["Startup"]; - - dbConn = new SqliteConnection("URI=file:LocalUserStatistics.db,version=3"); - dbConn.Open(); - CreateTables(dbConn); - - Prototype_distributor protodep = new Prototype_distributor(); - Updater_distributor updatedep = new Updater_distributor(); - ActiveConnectionsAJAX ajConnections = new ActiveConnectionsAJAX(); - SimStatsAJAX ajSimStats = new SimStatsAJAX(); - LogLinesAJAX ajLogLines = new LogLinesAJAX(); - Default_Report defaultReport = new Default_Report(); - Clients_report clientReport = new Clients_report(); - Sessions_Report sessionsReport = new Sessions_Report(); - - reports.Add("prototype.js", protodep); - reports.Add("updater.js", updatedep); - reports.Add("activeconnectionsajax.html", ajConnections); - reports.Add("simstatsajax.html", ajSimStats); - reports.Add("activelogajax.html", ajLogLines); - reports.Add("default.report", defaultReport); - reports.Add("clients.report", clientReport); - reports.Add("sessions.report", sessionsReport); - - //// - // Add Your own Reports here (Do Not Modify Lines here Devs!) - //// - - //// - // End Own reports section - //// - - MainServer.Instance.AddHTTPHandler("/SStats/", HandleStatsRequest); - MainServer.Instance.AddHTTPHandler("/CAPS/VS/", HandleUnknownCAPSRequest); - } - m_scenes.Add(scene); if (m_simstatsCounters.ContainsKey(scene.RegionInfo.RegionID)) m_simstatsCounters.Remove(scene.RegionInfo.RegionID); @@ -136,6 +151,39 @@ namespace OpenSim.Region.UserStatistics } } + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + } + + public virtual void Close() + { + if (!enabled) + return; + + dbConn.Close(); + dbConn.Dispose(); + m_sessions.Clear(); + m_scenes.Clear(); + reports.Clear(); + m_simstatsCounters.Clear(); + } + + public virtual string Name + { + get { return "ViewerStatsModule"; } + } + + public Type ReplaceableInterface + { + get { return null; } + } + + #endregion + private void ReceiveClassicSimStatsPacket(SimStats stats) { if (!enabled) @@ -251,37 +299,6 @@ namespace OpenSim.Region.UserStatistics } } - public virtual void PostInitialise() - { - if (!enabled) - return; - - AddHandlers(); - } - - public virtual void Close() - { - if (!enabled) - return; - - dbConn.Close(); - dbConn.Dispose(); - m_sessions.Clear(); - m_scenes.Clear(); - reports.Clear(); - m_simstatsCounters.Clear(); - } - - public virtual string Name - { - get { return "ViewerStatsModule"; } - } - - public bool IsSharedModule - { - get { return true; } - } - private void OnRegisterCaps(UUID agentID, Caps caps) { // m_log.DebugFormat("[WEB STATS MODULE]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps); @@ -302,7 +319,7 @@ namespace OpenSim.Region.UserStatistics { } - protected virtual void AddHandlers() + protected virtual void AddEventHandlers() { lock (m_scenes) { From db418bff2bb6b2676c996e77b260b0977e886f5d Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 19:39:21 -0800 Subject: [PATCH 52/71] Fix issues with the DynamicTextureModule and corresponding unit tests. --- .../DynamicTexture/DynamicTextureModule.cs | 10 ++++++ .../LoadImageURL/LoadImageURLModule.cs | 31 +++++++++---------- .../VectorRender/VectorRenderModule.cs | 30 +++++++++--------- OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 10 +++--- 4 files changed, 44 insertions(+), 37 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index 9d905174f9..9d77b19f7f 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs @@ -83,6 +83,16 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture /// private Cache m_reuseableDynamicTextures; + /// + /// This constructor is only here because of the Unit Tests... + /// Don't use it. + /// + public DynamicTextureModule() + { + m_reuseableDynamicTextures = new Cache(CacheMedium.Memory, CacheStrategy.Conservative); + m_reuseableDynamicTextures.DefaultTTL = new TimeSpan(24, 0, 0); + } + #region IDynamicTextureManager Members public void RegisterRender(string handleType, IDynamicTextureRender render) diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs index a08a183784..65737fa693 100644 --- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs @@ -49,21 +49,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL private string m_name = "LoadImageURL"; private Scene m_scene; private IDynamicTextureManager m_textureManager; - private IDynamicTextureManager TextureManager - { - get - { - if (m_textureManager == null && m_scene != null) - { - m_textureManager = m_scene.RequestModuleInterface(); - if (m_textureManager != null) - { - m_textureManager.RegisterRender(GetContentType(), this); - } - } - return m_textureManager; - } - } private string m_proxyurl = ""; private string m_proxyexcepts = ""; @@ -146,6 +131,14 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL public void RegionLoaded(Scene scene) { + if (m_textureManager == null && m_scene == scene) + { + m_textureManager = m_scene.RequestModuleInterface(); + if (m_textureManager != null) + { + m_textureManager.RegisterRender(GetContentType(), this); + } + } } public void Close() @@ -191,6 +184,12 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL private void HttpRequestReturn(IAsyncResult result) { + if (m_textureManager == null) + { + m_log.WarnFormat("[LOADIMAGEURLMODULE]: No texture manager. Can't function."); + return; + } + RequestState state = (RequestState) result.AsyncState; WebRequest request = (WebRequest) state.Request; Stream stream = null; @@ -271,7 +270,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL m_log.DebugFormat("[LOADIMAGEURLMODULE]: Returning {0} bytes of image data for request {1}", imageJ2000.Length, state.RequestID); - TextureManager.ReturnData( + m_textureManager.ReturnData( state.RequestID, new OpenSim.Region.CoreModules.Scripting.DynamicTexture.DynamicTexture( request.RequestUri, null, imageJ2000, newSize, false)); diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index efa99e9648..689e8a7970 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -58,21 +58,6 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender private Scene m_scene; private IDynamicTextureManager m_textureManager; - private IDynamicTextureManager TextureManager - { - get - { - if (m_textureManager == null && m_scene != null) - { - m_textureManager = m_scene.RequestModuleInterface(); - if (m_textureManager != null) - { - m_textureManager.RegisterRender(GetContentType(), this); - } - } - return m_textureManager; - } - } private Graphics m_graph; private string m_fontName = "Arial"; @@ -121,8 +106,13 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender public bool AsyncConvertData(UUID id, string bodyData, string extraParams) { + if (m_textureManager == null) + { + m_log.Warn("[VECTORRENDERMODULE]: No texture manager. Can't function"); + return false; + } // XXX: This isn't actually being done asynchronously! - TextureManager.ReturnData(id, ConvertData(bodyData, extraParams)); + m_textureManager.ReturnData(id, ConvertData(bodyData, extraParams)); return true; } @@ -180,6 +170,14 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender public void RegionLoaded(Scene scene) { + if (m_textureManager == null && m_scene == scene) + { + m_textureManager = m_scene.RequestModuleInterface(); + if (m_textureManager != null) + { + m_textureManager.RegisterRender(GetContentType(), this); + } + } } public void RemoveRegion(Scene scene) diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index f9c1ac2656..db0a7fc3b9 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs @@ -383,6 +383,11 @@ namespace OpenSim.Tests.Common } } + foreach (IRegionModuleBase module in newModules) + { + if (module is ISharedRegionModule) ((ISharedRegionModule)module).PostInitialise(); + } + foreach (IRegionModuleBase module in newModules) { foreach (Scene scene in scenes) @@ -392,11 +397,6 @@ namespace OpenSim.Tests.Common } } - foreach (IRegionModuleBase module in newModules) - { - if (module is ISharedRegionModule) ((ISharedRegionModule)module).PostInitialise(); - } - // RegionLoaded is fired after all modules have been appropriately added to all scenes foreach (IRegionModuleBase module in newModules) foreach (Scene scene in scenes) From 152d5dc2a7c9c9e304654fcbea47f8c126d7e727 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 21:13:14 -0800 Subject: [PATCH 53/71] Fix mantis #6425 --- .../Framework/InventoryAccess/InventoryAccessModule.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 8b34c286fc..d112a90709 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -180,12 +180,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess if (!m_Scene.Permissions.CanCreateUserInventory(invType, remoteClient.AgentId)) return; - InventoryFolderBase f = new InventoryFolderBase(folderID, remoteClient.AgentId); - InventoryFolderBase folder = m_Scene.InventoryService.GetFolder(f); - - if (folder == null || folder.Owner != remoteClient.AgentId) - return; - if (transactionID == UUID.Zero) { ScenePresence presence; From 0d15a6a01feeb129b015f7516fd13a541b3e6fce Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 12 Nov 2012 19:18:20 +0000 Subject: [PATCH 54/71] Remove any mention of IRegionModule from region names and comments to aid grepping for remaining uses --- .../RegionModulesControllerPlugin.cs | 2 +- OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs | 2 +- .../Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs | 4 ++-- .../Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs | 4 ++-- .../Agent/AssetTransaction/AssetTransactionModule.cs | 2 +- .../CoreModules/Agent/TextureSender/J2KDecoderModule.cs | 2 +- .../CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 2 +- .../Avatar/InstantMessage/InstantMessageModule.cs | 2 +- .../Avatar/Inventory/Transfer/InventoryTransferModule.cs | 2 +- .../Asset/AssetServiceInConnectorModule.cs | 2 +- .../AuthenticationServiceInConnectorModule.cs | 2 +- .../Grid/GridInfoServiceInConnectorModule.cs | 2 +- .../Hypergrid/HypergridServiceInConnectorModule.cs | 2 +- .../Inventory/InventoryServiceInConnectorModule.cs | 2 +- .../Land/LandServiceInConnectorModule.cs | 2 +- .../Login/LLLoginServiceInConnectorModule.cs | 2 +- .../MapImage/MapImageServiceInConnectorModule.cs | 2 +- .../Neighbour/NeighbourServiceInConnectorModule.cs | 2 +- .../Simulation/SimulationServiceInConnectorModule.cs | 2 +- .../Simulation/LocalSimulationConnector.cs | 6 +++--- .../Simulation/RemoteSimulationConnector.cs | 6 +++--- .../CoreModules/World/Estate/EstateManagementModule.cs | 2 +- .../Region/CoreModules/World/LegacyMap/MapImageModule.cs | 2 +- .../Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | 2 +- OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | 2 +- .../Avatar/XmlRpcGroups/GroupsMessagingModule.cs | 2 +- .../OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 2 +- .../XmlRpcGroups/SimianGroupsServicesConnectorModule.cs | 2 +- .../XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | 2 +- .../OptionalModules/Scripting/JsonStore/JsonStoreModule.cs | 2 +- .../Scripting/JsonStore/JsonStoreScriptModule.cs | 2 +- .../Freeswitch/FreeswitchServiceInConnectorModule.cs | 2 +- .../World/TreePopulator/TreePopulatorModule.cs | 3 +-- 33 files changed, 39 insertions(+), 40 deletions(-) diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs index 49bd911baf..633d0055fd 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs @@ -215,7 +215,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController } } -#region IRegionModulesController implementation +#region Region Module interfacesController implementation /// /// Check that the given module is no disabled in the [Modules] section of the config files. diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs index 0d7b1fc6e6..9bb0f5efd3 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs @@ -58,7 +58,7 @@ namespace OpenSim.Region.ClientStack.Linden private bool m_Enabled = true; private string m_URL; - #region IRegionModuleBase Members + #region Region Module interfaceBase Members public Type ReplaceableInterface { diff --git a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs index 52c4f44c8c..c03e6e67c5 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs @@ -58,7 +58,7 @@ namespace OpenSim.Region.ClientStack.Linden private bool m_enabled = true; private int m_levelUpload = 0; - #region IRegionModuleBase Members + #region Region Module interfaceBase Members public Type ReplaceableInterface @@ -98,7 +98,7 @@ namespace OpenSim.Region.ClientStack.Linden #endregion - #region IRegionModule Members + #region Region Module interface diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs index ba902b2a3b..725b4f13d4 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs @@ -58,7 +58,7 @@ namespace OpenSim.Region.ClientStack.Linden LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; - #region IRegionModuleBase Members + #region Region Module interfaceBase Members public Type ReplaceableInterface @@ -92,7 +92,7 @@ namespace OpenSim.Region.ClientStack.Linden #endregion - #region IRegionModule Members + #region Region Module interface diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs index 73d1f72b2a..e97365204e 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs @@ -54,7 +54,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction private Dictionary AgentTransactions = new Dictionary(); - #region IRegionModule Members + #region Region Module interface public void Initialise(IConfigSource source) { diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index a54fec7665..47c4b59067 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs @@ -123,7 +123,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender get { return null; } } - #endregion IRegionModule + #endregion Region Module interface #region IJ2KDecoder diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index c3e4679f61..aaeeb24eff 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory private object m_setAppearanceLock = new object(); - #region IRegionModule + #region Region Module interface public void Initialise(IConfigSource config) { diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs index ca5d485657..569ef264f7 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs @@ -49,7 +49,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage private readonly List m_scenes = new List(); - #region IRegionModule Members + #region Region Module interface private IMessageTransferModule m_TransferModule = null; diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index e200775f03..24208df43a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs @@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer private IMessageTransferModule m_TransferModule = null; private bool m_Enabled = true; - #region IRegionModule Members + #region Region Module interface public void Initialise(IConfigSource config) { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs index 554168499a..563b1a163b 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs @@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset private IConfigSource m_Config; bool m_Registered = false; - #region IRegionModule interface + #region Region Module interface public void Initialise(IConfigSource config) { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs index ccf22755b9..2c6a0b865e 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs @@ -49,7 +49,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Authentication private IConfigSource m_Config; bool m_Registered = false; - #region IRegionModule interface + #region Region Module interface public void Initialise(IConfigSource config) { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs index 0e16e5ab82..f37b75cc56 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs @@ -49,7 +49,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid private IConfigSource m_Config; bool m_Registered = false; - #region IRegionModule interface + #region Region Module interface public void Initialise(IConfigSource config) { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs index a7dd0dd4dd..f681ef22f1 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs @@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Hypergrid private GatekeeperServiceInConnector m_HypergridHandler; private UserAgentServerConnector m_UASHandler; - #region IRegionModule interface + #region Region Module interface public void Initialise(IConfigSource config) { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs index 831ea27bd1..87b4119b91 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs @@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory private IConfigSource m_Config; bool m_Registered = false; - #region IRegionModule interface + #region Region Module interface public void Initialise(IConfigSource config) { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs index 2f3c350c52..dab89ea781 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs @@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land private IConfigSource m_Config; private List m_Scenes = new List(); - #region IRegionModule interface + #region Region Module interface public void Initialise(IConfigSource config) { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs index ecdb380209..0a86fb761f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs @@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Login private IConfigSource m_Config; private List m_Scenes = new List(); - #region IRegionModule interface + #region Region Module interface public void Initialise(IConfigSource config) { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs index d38af23dd1..ec14a98254 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs @@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.MapImage private IConfigSource m_Config; - #region IRegionModule interface + #region Region Module interface public void Initialise(IConfigSource config) { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs index b544ab3be5..1f26ed9236 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs @@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Neighbour private IConfigSource m_Config; private List m_Scenes = new List(); - #region IRegionModule interface + #region Region Module interface public void Initialise(IConfigSource config) { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs index 0a5275d3d0..4748e1922f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs @@ -49,7 +49,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Simulation private IConfigSource m_Config; bool m_Registered = false; - #region IRegionModule interface + #region Region Module interface public void Initialise(IConfigSource config) { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index 1e52d3705c..316ecd24ee 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs @@ -58,7 +58,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation /// private bool m_ModuleEnabled = false; - #region IRegionModule + #region Region Module interface public void Initialise(IConfigSource config) { @@ -156,7 +156,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation } } - #endregion /* IRegionModule */ + #endregion #region ISimulation @@ -374,4 +374,4 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation #endregion } -} \ No newline at end of file +} diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index bd4a23b873..bc505a1164 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs @@ -60,7 +60,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation protected bool m_safemode; protected IPAddress m_thisIP; - #region IRegionModule + #region Region Module interface public virtual void Initialise(IConfigSource config) { @@ -147,7 +147,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName); } - #endregion /* IRegionModule */ + #endregion #region IInterregionComms @@ -302,4 +302,4 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation #endregion /* IInterregionComms */ } -} \ No newline at end of file +} diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 0e6d663000..39cc93d73d 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -1072,7 +1072,7 @@ namespace OpenSim.Region.CoreModules.World.Estate #endregion - #region IRegionModule Members + #region Region Module interface public string Name { get { return "EstateManagementModule"; } } diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs index aa306c7db5..6a443d0247 100644 --- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs @@ -131,7 +131,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap #endregion - #region IRegionModule Members + #region Region Module interface public void Initialise(IConfigSource source) { diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index 2d762fbc8c..9e81331d62 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs @@ -63,7 +63,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap private bool m_useAntiAliasing = false; // TODO: Make this a config option private bool m_Enabled = false; - #region IRegionModule Members + #region Region Module interface public void Initialise(IConfigSource source) { diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index 18aa609da5..a7b9099df2 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs @@ -99,7 +99,7 @@ namespace OpenSim.Region.DataSnapshot #endregion - #region IRegionModule + #region Region Module interface public void Initialise(IConfigSource config) { diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs index 1528330385..e03a27c359 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs @@ -79,7 +79,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups private int m_usersOnlineCacheExpirySeconds = 20; - #region IRegionModuleBase Members + #region Region Module interfaceBase Members public void Initialise(IConfigSource config) { diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index b9b441331a..856e4e20b6 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs @@ -86,7 +86,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups private bool m_debugEnabled = false; private int m_levelGroupCreate = 0; - #region IRegionModuleBase Members + #region Region Module interfaceBase Members public void Initialise(IConfigSource config) { diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs index 5d57f70733..5c7a3acfce 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs @@ -176,7 +176,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups // private IUserAccountService m_accountService = null; - #region IRegionModuleBase Members + #region Region Module interfaceBase Members public string Name { diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index d412cd1082..cfc26a00dc 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs @@ -83,7 +83,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups private Dictionary> m_groupsAgentsDroppedFromChatSession = new Dictionary>(); private Dictionary> m_groupsAgentsInvitedToChatSession = new Dictionary>(); - #region IRegionModuleBase Members + #region Region Module interfaceBase Members public string Name { diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs index 732c28f66d..e68764ab63 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs @@ -59,7 +59,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore private Dictionary m_JsonValueStore; private UUID m_sharedStore; -#region IRegionModule Members +#region Region Module interface // ----------------------------------------------------------------- /// diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs index 6910d14c67..0c175caa7f 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs @@ -58,7 +58,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore private IScriptModuleComms m_comms; private IJsonStoreModule m_store; -#region IRegionModule Members +#region Region Module interface // ----------------------------------------------------------------- /// diff --git a/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs b/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs index 74c51391c1..78c870adf4 100644 --- a/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs @@ -48,7 +48,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Freeswitch private IConfigSource m_Config; bool m_Registered = false; - #region IRegionModule interface + #region Region Module interface public void Initialise(IConfigSource config) { diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index 6ebdf4dcc9..3d0b9fbaff 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs @@ -168,7 +168,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator #endregion - #region IRegionModule Members + #region Region Module interface public void Initialise(IConfigSource config) { @@ -200,7 +200,6 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator public void AddRegion(Scene scene) { m_scene = scene; - //m_scene.RegisterModuleInterface(this); m_scene.RegisterModuleCommander(m_commander); m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; From e41374dd014721a01b8850d1dcf5f486a50f3b44 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 12 Nov 2012 22:25:35 +0000 Subject: [PATCH 55/71] Remove IRegionModule support from the test setup helper --- OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 28 ++++---------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index db0a7fc3b9..c424439ebc 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs @@ -359,28 +359,10 @@ namespace OpenSim.Tests.Common List newModules = new List(); foreach (object module in modules) { -// Console.WriteLine("MODULE RAW {0}", module); - if (module is IRegionModule) - { - IRegionModule m = (IRegionModule)module; - - foreach (Scene scene in scenes) - { - m.Initialise(scene, config); - scene.AddModule(m.Name, m); - } - - m.PostInitialise(); - } - else if (module is IRegionModuleBase) - { - // for the new system, everything has to be initialised first, - // shared modules have to be post-initialised, then all get an AddRegion with the scene - IRegionModuleBase m = (IRegionModuleBase)module; -// Console.WriteLine("MODULE {0}", m.Name); - m.Initialise(config); - newModules.Add(m); - } + IRegionModuleBase m = (IRegionModuleBase)module; +// Console.WriteLine("MODULE {0}", m.Name); + m.Initialise(config); + newModules.Add(m); } foreach (IRegionModuleBase module in newModules) @@ -709,4 +691,4 @@ namespace OpenSim.Tests.Common return sog; } } -} \ No newline at end of file +} From 8c130bcaf5a60fa042d8df38ba1d1e1cb328d768 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 12 Nov 2012 22:50:28 +0000 Subject: [PATCH 56/71] Remove the old style module loader and all references to it --- .../LoadRegions/LoadRegionsPlugin.cs | 3 - OpenSim/Region/Application/OpenSim.cs | 47 +--- OpenSim/Region/Application/OpenSimBase.cs | 26 +- OpenSim/Region/Framework/ModuleLoader.cs | 262 ------------------ OpenSim/Region/Framework/Scenes/Scene.cs | 4 +- OpenSim/Region/Framework/Scenes/SceneBase.cs | 80 +----- .../Region/Framework/Scenes/SceneManager.cs | 16 -- OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 2 +- OpenSim/Tests/Common/Mock/TestScene.cs | 6 +- 9 files changed, 21 insertions(+), 425 deletions(-) delete mode 100644 OpenSim/Region/Framework/ModuleLoader.cs diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index a8a3237389..fcb6991969 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs @@ -136,9 +136,6 @@ namespace OpenSim.ApplicationPlugins.LoadRegions } } } - - m_openSim.ModuleLoader.PostInitialise(); - m_openSim.ModuleLoader.ClearCache(); } public void Dispose() diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 2236e4388a..47252f69f4 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -757,33 +757,13 @@ namespace OpenSim switch (cmdparams[0].ToLower()) { case "list": - foreach (IRegionModule irm in m_moduleLoader.GetLoadedSharedModules) - { - MainConsole.Instance.Output(String.Format("Shared region module: {0}", irm.Name)); - } + //TODO: Convert to new region modules break; case "unload": - if (cmdparams.Length > 1) - { - foreach (IRegionModule rm in new ArrayList(m_moduleLoader.GetLoadedSharedModules)) - { - if (rm.Name.ToLower() == cmdparams[1].ToLower()) - { - MainConsole.Instance.Output(String.Format("Unloading module: {0}", rm.Name)); - m_moduleLoader.UnloadModule(rm); - } - } - } + //TODO: Convert to new region modules break; case "load": - if (cmdparams.Length > 1) - { - foreach (Scene s in new ArrayList(SceneManager.Scenes)) - { - MainConsole.Instance.Output(String.Format("Loading module: {0}", cmdparams[1])); - m_moduleLoader.LoadRegionModules(cmdparams[1], s); - } - } + //TODO: Convert to new region modules break; } } @@ -1018,28 +998,9 @@ namespace OpenSim break; case "modules": - MainConsole.Instance.Output("The currently loaded shared modules are:"); - foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) - { - MainConsole.Instance.Output("Shared Module: " + module.Name); - } - SceneManager.ForEachScene( delegate(Scene scene) { - m_log.Error("The currently loaded modules in " + scene.RegionInfo.RegionName + " are:"); - foreach (IRegionModule module in scene.Modules.Values) - { - if (!module.IsSharedModule) - { - m_log.Error("Region Module: " + module.Name); - } - } - } - ); - - SceneManager.ForEachScene( - delegate(Scene scene) { - MainConsole.Instance.Output("Loaded new region modules in" + scene.RegionInfo.RegionName + " are:"); + MainConsole.Instance.Output("Loaded region modules in" + scene.RegionInfo.RegionName + " are:"); foreach (IRegionModuleBase module in scene.RegionModules.Values) { Type type = module.GetType().GetInterface("ISharedRegionModule"); diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 7b591a88be..a3d6820d57 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -127,14 +127,6 @@ namespace OpenSim get { return m_httpServerPort; } } - public ModuleLoader ModuleLoader - { - get { return m_moduleLoader; } - set { m_moduleLoader = value; } - } - - protected ModuleLoader m_moduleLoader; - protected IRegistryCore m_applicationRegistry = new RegistryCore(); public IRegistryCore ApplicationRegistry @@ -223,9 +215,6 @@ namespace OpenSim base.StartupSpecific(); - // Create a ModuleLoader instance - m_moduleLoader = new ModuleLoader(m_config.Source); - LoadPlugins(); foreach (IApplicationPlugin plugin in m_plugins) { @@ -370,12 +359,6 @@ namespace OpenSim m_log.Info("[MODULES]: Loading Region's modules (old style)"); - List modules = m_moduleLoader.PickupModules(scene, "."); - - // This needs to be ahead of the script engine load, so the - // script module can pick up events exposed by a module - m_moduleLoader.InitialiseSharedModules(scene); - // Use this in the future, the line above will be deprecated soon m_log.Info("[REGIONMODULES]: Loading Region's modules (new style)"); IRegionModulesController controller; @@ -426,13 +409,6 @@ namespace OpenSim clientServer.Start(); } - if (do_post_init) - { - foreach (IRegionModule module in modules) - { - module.PostInitialise(); - } - } scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); }; mscene = scene; @@ -722,7 +698,7 @@ namespace OpenSim return new Scene( regionInfo, circuitManager, sceneGridService, - simDataService, estateDataService, m_moduleLoader, false, + simDataService, estateDataService, false, m_config.Source, m_version); } diff --git a/OpenSim/Region/Framework/ModuleLoader.cs b/OpenSim/Region/Framework/ModuleLoader.cs deleted file mode 100644 index 14ecd4430a..0000000000 --- a/OpenSim/Region/Framework/ModuleLoader.cs +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using log4net; -using Nini.Config; -using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.Framework.Scenes; - -namespace OpenSim.Region.Framework -{ - public class ModuleLoader - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - public Dictionary LoadedAssemblys = new Dictionary(); - - private readonly List m_loadedModules = new List(); - private readonly Dictionary m_loadedSharedModules = new Dictionary(); - private readonly IConfigSource m_config; - - public ModuleLoader(IConfigSource config) - { - m_config = config; - } - - public IRegionModule[] GetLoadedSharedModules - { - get - { - IRegionModule[] regionModules = new IRegionModule[m_loadedSharedModules.Count]; - m_loadedSharedModules.Values.CopyTo(regionModules, 0); - return regionModules; - } - } - - public List PickupModules(Scene scene, string moduleDir) - { - DirectoryInfo dir = new DirectoryInfo(moduleDir); - List modules = new List(); - - foreach (FileInfo fileInfo in dir.GetFiles("*.dll")) - { - modules.AddRange(LoadRegionModules(fileInfo.FullName, scene)); - } - return modules; - } - - public void LoadDefaultSharedModule(IRegionModule module) - { - if (m_loadedSharedModules.ContainsKey(module.Name)) - { - m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module not added!", module.Name); - } - else - { - m_loadedSharedModules.Add(module.Name, module); - } - } - - - public void InitialiseSharedModules(Scene scene) - { - foreach (IRegionModule module in m_loadedSharedModules.Values) - { - module.Initialise(scene, m_config); - scene.AddModule(module.Name, module); //should be doing this? - } - } - - public void InitializeModule(IRegionModule module, Scene scene) - { - module.Initialise(scene, m_config); - scene.AddModule(module.Name, module); - m_loadedModules.Add(module); - } - - /// - /// Loads/initialises a Module instance that can be used by multiple Regions - /// - /// - /// - public void LoadSharedModule(string dllName, string moduleName) - { - IRegionModule module = LoadModule(dllName, moduleName); - - if (module != null) - LoadSharedModule(module); - } - - /// - /// Loads/initialises a Module instance that can be used by multiple Regions - /// - /// - public void LoadSharedModule(IRegionModule module) - { - if (!m_loadedSharedModules.ContainsKey(module.Name)) - { - m_loadedSharedModules.Add(module.Name, module); - } - } - - public List LoadRegionModules(string dllName, Scene scene) - { - IRegionModule[] modules = LoadModules(dllName); - List initializedModules = new List(); - - if (modules.Length > 0) - { - m_log.InfoFormat("[MODULES]: Found Module Library [{0}]", dllName); - foreach (IRegionModule module in modules) - { - if (!module.IsSharedModule) - { - m_log.InfoFormat("[MODULES]: [{0}]: Initializing.", module.Name); - InitializeModule(module, scene); - initializedModules.Add(module); - } - else - { - m_log.InfoFormat("[MODULES]: [{0}]: Loading Shared Module.", module.Name); - LoadSharedModule(module); - } - } - } - return initializedModules; - } - - public void LoadRegionModule(string dllName, string moduleName, Scene scene) - { - IRegionModule module = LoadModule(dllName, moduleName); - if (module != null) - { - InitializeModule(module, scene); - } - } - - /// - /// Loads a external Module (if not already loaded) and creates a new instance of it. - /// - /// - /// - public IRegionModule LoadModule(string dllName, string moduleName) - { - IRegionModule[] modules = LoadModules(dllName); - - foreach (IRegionModule module in modules) - { - if ((module != null) && (module.Name == moduleName)) - { - return module; - } - } - - return null; - } - - public IRegionModule[] LoadModules(string dllName) - { - //m_log.DebugFormat("[MODULES]: Looking for modules in {0}", dllName); - - List modules = new List(); - - Assembly pluginAssembly; - if (!LoadedAssemblys.TryGetValue(dllName, out pluginAssembly)) - { - try - { - pluginAssembly = Assembly.LoadFrom(dllName); - LoadedAssemblys.Add(dllName, pluginAssembly); - } - catch (BadImageFormatException) - { - //m_log.InfoFormat("[MODULES]: The file [{0}] is not a module assembly.", e.FileName); - } - } - - if (pluginAssembly != null) - { - try - { - foreach (Type pluginType in pluginAssembly.GetTypes()) - { - if (pluginType.IsPublic) - { - if (!pluginType.IsAbstract) - { - if (pluginType.GetInterface("IRegionModule") != null) - { - modules.Add((IRegionModule)Activator.CreateInstance(pluginType)); - } - } - } - } - } - catch (Exception e) - { - m_log.ErrorFormat( - "[MODULES]: Could not load types for plugin DLL {0}. Exception {1} {2}", - pluginAssembly.FullName, e.Message, e.StackTrace); - - // justincc: Right now this is fatal to really get the user's attention - throw e; - } - } - - return modules.ToArray(); - } - - public void PostInitialise() - { - foreach (IRegionModule module in m_loadedSharedModules.Values) - { - module.PostInitialise(); - } - - foreach (IRegionModule module in m_loadedModules) - { - module.PostInitialise(); - } - } - - public void ClearCache() - { - LoadedAssemblys.Clear(); - } - - public void UnloadModule(IRegionModule rm) - { - rm.Close(); - - m_loadedModules.Remove(rm); - } - } -} diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 69c10273c0..db45d6b4f3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -176,7 +176,6 @@ namespace OpenSim.Region.Framework.Scenes protected List m_regionRestartNotifyList = new List(); protected List m_neighbours = new List(); protected string m_simulatorVersion = "OpenSimulator Server"; - protected ModuleLoader m_moduleLoader; protected AgentCircuitManager m_authenticateHandler; protected SceneCommunicationService m_sceneGridService; @@ -659,7 +658,7 @@ namespace OpenSim.Region.Framework.Scenes public Scene(RegionInfo regInfo, AgentCircuitManager authen, SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService, - ModuleLoader moduleLoader, bool dumpAssetsToFile, + bool dumpAssetsToFile, IConfigSource config, string simulatorVersion) : this(regInfo) { @@ -670,7 +669,6 @@ namespace OpenSim.Region.Framework.Scenes Random random = new Random(); m_lastAllocatedLocalId = (uint)(random.NextDouble() * (double)(uint.MaxValue / 2)) + (uint)(uint.MaxValue / 4); - m_moduleLoader = moduleLoader; m_authenticateHandler = authen; m_sceneGridService = sceneGridService; m_SimulationDataService = simDataService; diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index b87a38a335..d3e968e531 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs @@ -67,12 +67,6 @@ namespace OpenSim.Region.Framework.Scenes /// /// All the region modules attached to this scene. /// - public Dictionary Modules - { - get { return m_modules; } - } - protected Dictionary m_modules = new Dictionary(); - public Dictionary RegionModules { get { return m_regionModules; } @@ -272,16 +266,6 @@ namespace OpenSim.Region.Framework.Scenes /// public virtual void Close() { - // Shut down all non shared modules. - foreach (IRegionModule module in Modules.Values) - { - if (!module.IsSharedModule) - { - module.Close(); - } - } - Modules.Clear(); - try { EventManager.TriggerShutdown(); @@ -311,19 +295,6 @@ namespace OpenSim.Region.Framework.Scenes #region Module Methods - /// - /// Add a module to this scene. - /// - /// - /// - public void AddModule(string name, IRegionModule module) - { - if (!Modules.ContainsKey(name)) - { - Modules.Add(name, module); - } - } - /// /// Add a region-module to this scene. TODO: This will replace AddModule in the future. /// @@ -508,9 +479,9 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// - public void AddCommand(object mod, string command, string shorthelp, string longhelp, CommandDelegate callback) + public void AddCommand(IRegionModuleBase module, string command, string shorthelp, string longhelp, CommandDelegate callback) { - AddCommand(mod, command, shorthelp, longhelp, string.Empty, callback); + AddCommand(module, command, shorthelp, longhelp, string.Empty, callback); } /// @@ -528,9 +499,9 @@ namespace OpenSim.Region.Framework.Scenes /// /// public void AddCommand( - string category, object mod, string command, string shorthelp, string longhelp, CommandDelegate callback) + string category, IRegionModuleBase module, string command, string shorthelp, string longhelp, CommandDelegate callback) { - AddCommand(category, mod, command, shorthelp, longhelp, string.Empty, callback); + AddCommand(category, module, command, shorthelp, longhelp, string.Empty, callback); } /// @@ -542,29 +513,14 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// - public void AddCommand(object mod, string command, string shorthelp, string longhelp, string descriptivehelp, CommandDelegate callback) + public void AddCommand(IRegionModuleBase module, string command, string shorthelp, string longhelp, string descriptivehelp, CommandDelegate callback) { string moduleName = ""; - if (mod != null) - { - if (mod is IRegionModule) - { - IRegionModule module = (IRegionModule)mod; - moduleName = module.Name; - } - else if (mod is IRegionModuleBase) - { - IRegionModuleBase module = (IRegionModuleBase)mod; - moduleName = module.Name; - } - else - { - throw new Exception("AddCommand module parameter must be IRegionModule or IRegionModuleBase"); - } - } + if (module != null) + moduleName = module.Name; - AddCommand(moduleName, mod, command, shorthelp, longhelp, descriptivehelp, callback); + AddCommand(moduleName, module, command, shorthelp, longhelp, descriptivehelp, callback); } /// @@ -580,7 +536,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// public void AddCommand( - string category, object mod, string command, + string category, IRegionModuleBase module, string command, string shorthelp, string longhelp, string descriptivehelp, CommandDelegate callback) { if (MainConsole.Instance == null) @@ -588,22 +544,8 @@ namespace OpenSim.Region.Framework.Scenes bool shared = false; - if (mod != null) - { - if (mod is IRegionModule) - { - IRegionModule module = (IRegionModule)mod; - shared = module.IsSharedModule; - } - else if (mod is IRegionModuleBase) - { - shared = mod is ISharedRegionModule; - } - else - { - throw new Exception("AddCommand module parameter must be IRegionModule or IRegionModuleBase"); - } - } + if (module != null) + shared = module is ISharedRegionModule; MainConsole.Instance.Commands.AddCommand( category, shared, command, shorthelp, longhelp, descriptivehelp, callback); diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index cb5b2ba9b2..992e71df2e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs @@ -144,22 +144,6 @@ namespace OpenSim.Region.Framework.Scenes // collect known shared modules in sharedModules Dictionary sharedModules = new Dictionary(); - lock (m_localScenes) - { - for (int i = 0; i < m_localScenes.Count; i++) - { - // extract known shared modules from scene - foreach (string k in m_localScenes[i].Modules.Keys) - { - if (m_localScenes[i].Modules[k].IsSharedModule && - !sharedModules.ContainsKey(k)) - sharedModules[k] = m_localScenes[i].Modules[k]; - } - // close scene/region - m_localScenes[i].Close(); - } - } - // all regions/scenes are now closed, we can now safely // close all shared modules foreach (IRegionModule mod in sharedModules.Values) diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index c424439ebc..939fc33f70 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs @@ -139,7 +139,7 @@ namespace OpenSim.Tests.Common SceneCommunicationService scs = new SceneCommunicationService(); TestScene testScene = new TestScene( - regInfo, m_acm, scs, m_simDataService, m_estateDataService, null, false, configSource, null); + regInfo, m_acm, scs, m_simDataService, m_estateDataService, false, configSource, null); INonSharedRegionModule godsModule = new GodsModule(); godsModule.Initialise(new IniConfigSource()); diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs index eea68c3b40..d4b564869b 100644 --- a/OpenSim/Tests/Common/Mock/TestScene.cs +++ b/OpenSim/Tests/Common/Mock/TestScene.cs @@ -41,9 +41,9 @@ namespace OpenSim.Tests.Common.Mock public TestScene( RegionInfo regInfo, AgentCircuitManager authen, SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService, - ModuleLoader moduleLoader, bool dumpAssetsToFile, + bool dumpAssetsToFile, IConfigSource config, string simulatorVersion) - : base(regInfo, authen, sceneGridService, simDataService, estateDataService, moduleLoader, + : base(regInfo, authen, sceneGridService, simDataService, estateDataService, dumpAssetsToFile, config, simulatorVersion) { } @@ -73,4 +73,4 @@ namespace OpenSim.Tests.Common.Mock get { return m_asyncSceneObjectDeleter; } } } -} \ No newline at end of file +} From faca7559959db6914b2c82d816f038be5c1fbb9f Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 12 Nov 2012 22:51:24 +0000 Subject: [PATCH 57/71] Stop closing old style modules --- OpenSim/Region/Framework/Scenes/SceneManager.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index 992e71df2e..9bd27d342f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs @@ -141,15 +141,6 @@ namespace OpenSim.Region.Framework.Scenes public void Close() { - // collect known shared modules in sharedModules - Dictionary sharedModules = new Dictionary(); - - // all regions/scenes are now closed, we can now safely - // close all shared modules - foreach (IRegionModule mod in sharedModules.Values) - { - mod.Close(); - } } public void Close(Scene cscene) From 4edaa4e41a03109ff5db903da532fde7c26fccd3 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 12 Nov 2012 22:56:59 +0000 Subject: [PATCH 58/71] Completely remove the IRegionModule interface --- .../Framework/Interfaces/IRegionModule.cs | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 OpenSim/Region/Framework/Interfaces/IRegionModule.cs diff --git a/OpenSim/Region/Framework/Interfaces/IRegionModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionModule.cs deleted file mode 100644 index aacc26b001..0000000000 --- a/OpenSim/Region/Framework/Interfaces/IRegionModule.cs +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -using System; - -using Nini.Config; -using OpenSim.Region.Framework.Scenes; - -namespace OpenSim.Region.Framework.Interfaces -{ - /// - /// DEPRECATED! Use INonSharedRegionModule or ISharedRegionModule instead - /// - [Obsolete("Use INonSharedRegionModule or ISharedRegionModule instead", false)] - public interface IRegionModule - { - /// - /// Initialize the module. - /// - /// - /// For a shared module this can be called multiple times - once per scene. - /// - /// - /// Configuration information. For a shared module this will be identical on every scene call - void Initialise(Scene scene, IConfigSource source); - - void PostInitialise(); - void Close(); - string Name { get; } - bool IsSharedModule { get; } - } -} From 40d5148bbcc05d2cfd9ab14e06aee768b49819a0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 13 Nov 2012 01:56:32 +0000 Subject: [PATCH 59/71] Update ScriptModuleComms name space to CoreModules --- .../Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs index dc54c3f821..f6e1d393a8 100644 --- a/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs @@ -38,7 +38,7 @@ using OpenMetaverse; using System.Linq; using System.Linq.Expressions; -namespace OpenSim.Region.OptionalModules.Scripting.ScriptModuleComms +namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms { [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ScriptModuleCommsModule")] class ScriptModuleCommsModule : INonSharedRegionModule, IScriptModuleComms From 86903f23dd9c0e671fcc9854c031bcc0c6d6cc7f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 12 Nov 2012 18:08:02 -0800 Subject: [PATCH 60/71] Cleanup on region modules: gave short node id's to all of them. --- .../ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs | 2 +- .../ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | 2 +- OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs | 2 +- OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs | 2 +- OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs | 2 +- OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs | 2 +- .../Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs | 2 +- OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs | 2 +- .../Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs | 2 +- .../Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs | 2 +- .../Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs | 2 +- OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs | 2 +- OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs | 2 +- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 2 +- .../CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 2 +- OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | 2 +- OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs | 2 +- OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs | 2 +- OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs | 2 +- OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs | 2 +- .../Avatar/InstantMessage/HGMessageTransferModule.cs | 2 +- .../Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 2 +- OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs | 2 +- OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs | 2 +- OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs | 2 +- .../Region/CoreModules/Framework/Monitoring/MonitorModule.cs | 2 +- .../Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs | 2 +- .../MapImage/MapImageServiceInConnectorModule.cs | 2 +- .../ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | 2 +- OpenSim/Region/CoreModules/World/LightShare/LightShareModule.cs | 2 +- OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | 2 +- .../Avatar/XmlRpcGroups/GroupsMessagingModule.cs | 2 +- .../Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 2 +- .../Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs | 2 +- .../Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | 2 +- .../OptionalModules/World/MoneyModule/SampleMoneyModule.cs | 2 +- OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 2 +- .../Connectors/SimianGrid/SimianAssetServiceConnector.cs | 2 +- .../SimianGrid/SimianAuthenticationServiceConnector.cs | 2 +- .../Connectors/SimianGrid/SimianAvatarServiceConnector.cs | 2 +- .../Connectors/SimianGrid/SimianInventoryServiceConnector.cs | 2 +- .../Connectors/SimianGrid/SimianPresenceServiceConnector.cs | 2 +- OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs | 2 +- .../Connectors/SimianGrid/SimianUserAccountServiceConnector.cs | 2 +- 44 files changed, 44 insertions(+), 44 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs index 66b865f676..b735dfa244 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs @@ -45,7 +45,7 @@ using Caps = OpenSim.Framework.Capabilities.Caps; namespace OpenSim.Region.ClientStack.Linden { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BunchOfCapsModule")] public class BunchOfCapsModule : INonSharedRegionModule { // private static readonly ILog m_log = diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index b96b1db6f9..4d2c0f25fc 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -55,7 +55,7 @@ namespace OpenSim.Region.ClientStack.Linden public OSDMap body; } - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "EventQueueGetModule")] public class EventQueueGetModule : IEventQueue, INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs b/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs index cb5afcc38f..87d3d1c676 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs @@ -45,7 +45,7 @@ namespace OpenSim.Region.ClientStack.Linden /// /// This module implements both WebFetchInventoryDescendents and FetchInventoryDescendents2 capabilities. /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "FetchInventory2Module")] public class FetchInventory2Module : INonSharedRegionModule { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs index 9bb0f5efd3..8e1f63aff7 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs @@ -47,7 +47,7 @@ using Caps = OpenSim.Framework.Capabilities.Caps; namespace OpenSim.Region.ClientStack.Linden { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GetMeshModule")] public class GetMeshModule : INonSharedRegionModule { // private static readonly ILog m_log = diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index 5ae9cc3307..13415f82fc 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs @@ -51,7 +51,7 @@ using OpenSim.Capabilities.Handlers; namespace OpenSim.Region.ClientStack.Linden { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GetTextureModule")] public class GetTextureModule : INonSharedRegionModule { // private static readonly ILog m_log = diff --git a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs index 44a68839ca..33b1f77bab 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs @@ -45,7 +45,7 @@ namespace OpenSim.Region.ClientStack.Linden /// /// MeshUploadFlag capability. This is required for uploading Mesh. /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MeshUploadFlagModule")] public class MeshUploadFlagModule : INonSharedRegionModule { // private static readonly ILog m_log = diff --git a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs index c03e6e67c5..5529550fe1 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs @@ -47,7 +47,7 @@ using OpenSim.Framework.Capabilities; namespace OpenSim.Region.ClientStack.Linden { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "NewFileAgentInventoryVariablePriceModule")] public class NewFileAgentInventoryVariablePriceModule : INonSharedRegionModule { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs index 642d8b4a2a..92805e26ea 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs @@ -42,7 +42,7 @@ using Caps=OpenSim.Framework.Capabilities.Caps; namespace OpenSim.Region.ClientStack.Linden { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ObjectAdd")] public class ObjectAdd : INonSharedRegionModule { // private static readonly ILog m_log = diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs index 725b4f13d4..55a503e68c 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs @@ -51,7 +51,7 @@ using ExtraParamType = OpenMetaverse.ExtraParamType; namespace OpenSim.Region.ClientStack.Linden { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "UploadObjectAssetModule")] public class UploadObjectAssetModule : INonSharedRegionModule { private static readonly ILog m_log = diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs index 8ed0fb3e1f..191bccf812 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs @@ -53,7 +53,7 @@ namespace OpenSim.Region.ClientStack.Linden /// NOTE: Part of this code was adapted from the Aurora project, specifically /// the normal part of the response in the capability handler. /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimulatorFeaturesModule")] public class SimulatorFeaturesModule : ISharedRegionModule, ISimulatorFeaturesModule { // private static readonly ILog m_log = diff --git a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs index 6aac5911ee..3b0ccd75ec 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs @@ -50,7 +50,7 @@ using OpenSim.Capabilities.Handlers; namespace OpenSim.Region.ClientStack.Linden { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "UploadBakedTextureModule")] public class UploadBakedTextureModule : INonSharedRegionModule { // private static readonly ILog m_log = diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index 2359bd6683..6890f4a7e6 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs @@ -45,7 +45,7 @@ namespace OpenSim.Region.ClientStack.Linden /// /// This module implements both WebFetchInventoryDescendents and FetchInventoryDescendents2 capabilities. /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WebFetchInvDescModule")] public class WebFetchInvDescModule : INonSharedRegionModule { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs index 0ab5ed5160..4299726055 100644 --- a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs +++ b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs @@ -39,7 +39,7 @@ using Mono.Addins; namespace OpenSim.Region.CoreModules.Agent.Xfer { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "XferModule")] public class XferModule : INonSharedRegionModule, IXfer { private Scene m_scene; diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index b77bc59afc..232d9f507f 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -54,7 +54,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Asset { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "FlotsamAssetCache")] public class FlotsamAssetCache : ISharedRegionModule, IImprovedAssetCache, IAssetService { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index aaeeb24eff..0a69979d34 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -43,7 +43,7 @@ using Mono.Addins; namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "AvatarFactoryModule")] public class AvatarFactoryModule : IAvatarFactoryModule, INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index c1a22bf931..343cdb5c1e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs @@ -37,7 +37,7 @@ using Mono.Addins; namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CombatModule")] public class CombatModule : ISharedRegionModule { //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs index d85a6e3d6a..d26907b322 100644 --- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs @@ -40,7 +40,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Avatar.Dialog { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DialogModule")] public class DialogModule : IDialogModule, INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs index de70dba30c..095c57b2bc 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs @@ -40,7 +40,7 @@ using Mono.Addins; namespace OpenSim.Region.CoreModules.Avatar.Gestures { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GesturesModule")] public class GesturesModule : INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs index 2d3585ac69..5a7446f3d1 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs @@ -37,7 +37,7 @@ using Mono.Addins; namespace OpenSim.Region.CoreModules.Avatar.Gods { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GodsModule")] public class GodsModule : INonSharedRegionModule, IGodsModule { /// Special UUID for actions that apply to all agents diff --git a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs index 27f94ea9db..af54c1a1de 100644 --- a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs @@ -39,7 +39,7 @@ using Mono.Addins; namespace OpenSim.Region.CoreModules.Avatar.Groups { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GroupsModule")] public class GroupsModule : ISharedRegionModule { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs index bf1d78760b..7bf19c268f 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs @@ -48,7 +48,7 @@ using OpenSim.Server.Handlers.Hypergrid; namespace OpenSim.Region.CoreModules.Avatar.InstantMessage { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HGMessageTransferModule")] public class HGMessageTransferModule : ISharedRegionModule, IMessageTransferModule, IInstantMessageSimConnector { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index f5a146db5e..849449b323 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs @@ -46,7 +46,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// /// This module loads and saves OpenSimulator inventory archives /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "InventoryArchiverModule")] public class InventoryArchiverModule : ISharedRegionModule, IInventoryArchiverModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs index 9c369f6060..232a4fe5ae 100644 --- a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs @@ -42,7 +42,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.Avatar.Lure { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HGLureModule")] public class HGLureModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger( diff --git a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs index 87ca3277be..bf24030771 100644 --- a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs @@ -42,7 +42,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Avatar.Profile { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BasicProfileModule")] public class BasicProfileModule : IProfileModule, ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs index 4ea85a8bcb..8329af040b 100644 --- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs @@ -43,7 +43,7 @@ using Caps=OpenSim.Framework.Capabilities.Caps; namespace OpenSim.Region.CoreModules.Framework { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CapabilitiesModule")] public class CapabilitiesModule : INonSharedRegionModule, ICapabilitiesModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs index d2198f1215..d84460a7a8 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs @@ -42,7 +42,7 @@ using Mono.Addins; namespace OpenSim.Region.CoreModules.Framework.Monitoring { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MonitorModule")] public class MonitorModule : INonSharedRegionModule { /// diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs index 2d2ea2f14b..2c2c99caa6 100644 --- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs @@ -90,7 +90,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Scripting.WorldComm { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WorldCommModule")] public class WorldCommModule : IWorldComm, INonSharedRegionModule { // private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs index ec14a98254..c14bce7474 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs @@ -42,7 +42,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.MapImage { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MapImageServiceInConnectorModule")] public class MapImageServiceInConnectorModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs index 9d282b8741..a8390865f7 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs @@ -52,7 +52,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage /// /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MapImageServiceModule")] public class MapImageServiceModule : ISharedRegionModule { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/World/LightShare/LightShareModule.cs b/OpenSim/Region/CoreModules/World/LightShare/LightShareModule.cs index bd04ded019..4e20196ce0 100644 --- a/OpenSim/Region/CoreModules/World/LightShare/LightShareModule.cs +++ b/OpenSim/Region/CoreModules/World/LightShare/LightShareModule.cs @@ -39,7 +39,7 @@ using Mono.Addins; namespace OpenSim.Region.CoreModules.World.LightShare { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LightShareModule")] public class LightShareModule : INonSharedRegionModule, ILightShareModule, ICommandableModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index a7b9099df2..5e62f23b0c 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs @@ -47,7 +47,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.DataSnapshot { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DataSnapshotManager")] public class DataSnapshotManager : ISharedRegionModule, IDataSnapshot { #region Class members diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs index e03a27c359..2802e2fb7f 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs @@ -42,7 +42,7 @@ using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo; namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GroupsMessagingModule")] public class GroupsMessagingModule : ISharedRegionModule, IGroupsMessagingModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 856e4e20b6..193d1db84d 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs @@ -43,7 +43,7 @@ using DirFindFlags = OpenMetaverse.DirectoryManager.DirFindFlags; namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GroupsModule")] public class GroupsModule : ISharedRegionModule, IGroupsModule { /// diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs index 5c7a3acfce..7bae8f74f7 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs @@ -102,7 +102,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianGroupsServicesConnectorModule")] public class SimianGroupsServicesConnectorModule : ISharedRegionModule, IGroupsServicesConnector { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index cfc26a00dc..d0c3ea5910 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs @@ -47,7 +47,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "XmlRpcGroupsServicesConnectorModule")] public class XmlRpcGroupsServicesConnectorModule : ISharedRegionModule, IGroupsServicesConnector { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index 9c838d057c..8f04ede454 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs @@ -55,7 +55,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule /// /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SampleMoneyModule")] public class SampleMoneyModule : IMoneyModule, ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 41e70970cb..7d46d92613 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -43,7 +43,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.OptionalModules.World.NPC { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "NPCModule")] public class NPCModule : INPCModule, ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger( diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 6bfc5cc4f2..63a32e749a 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs @@ -45,7 +45,7 @@ namespace OpenSim.Services.Connectors.SimianGrid /// /// Connects to the SimianGrid asset service /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianAssetServiceConnector")] public class SimianAssetServiceConnector : IAssetService, ISharedRegionModule { private static readonly ILog m_log = diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs index 69f6ed2eac..6603f6e4dc 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs @@ -43,7 +43,7 @@ namespace OpenSim.Services.Connectors.SimianGrid /// /// Connects authentication/authorization to the SimianGrid backend /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianAuthenticationServiceConnector")] public class SimianAuthenticationServiceConnector : IAuthenticationService, ISharedRegionModule { private static readonly ILog m_log = diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs index 360f0dd29f..841bfa0bd1 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs @@ -47,7 +47,7 @@ namespace OpenSim.Services.Connectors.SimianGrid /// /// Connects avatar appearance data to the SimianGrid backend /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianAvatarServiceConnector")] public class SimianAvatarServiceConnector : IAvatarService, ISharedRegionModule { private static readonly ILog m_log = diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index f828abbb58..4d7841b415 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs @@ -59,7 +59,7 @@ namespace OpenSim.Services.Connectors.SimianGrid /// /// Connects avatar inventories to the SimianGrid backend /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianInventoryServiceConnector")] public class SimianInventoryServiceConnector : IInventoryService, ISharedRegionModule { private static readonly ILog m_log = diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index ca1b64f2b7..854bea4a99 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs @@ -47,7 +47,7 @@ namespace OpenSim.Services.Connectors.SimianGrid /// Connects avatar presence information (for tracking current location and /// message routing) to the SimianGrid backend /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianPresenceServiceConnector")] public class SimianPresenceServiceConnector : IPresenceService, IGridUserService, ISharedRegionModule { private static readonly ILog m_log = diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs index 6aefc38ed3..bd8069f49c 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs @@ -59,7 +59,7 @@ namespace OpenSim.Services.Connectors.SimianGrid /// Connects avatar profile and classified queries to the SimianGrid /// backend /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianProfiles")] public class SimianProfiles : INonSharedRegionModule { private static readonly ILog m_log = diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index 4350749295..6e32b3a7be 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs @@ -45,7 +45,7 @@ namespace OpenSim.Services.Connectors.SimianGrid /// Connects user account data (creating new users, looking up existing /// users) to the SimianGrid backend /// - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianUserAccountServiceConnector")] public class SimianUserAccountServiceConnector : IUserAccountService, ISharedRegionModule { private const double CACHE_EXPIRATION_SECONDS = 120.0; From 48577af3253757061ef1d3d5ff724efd6f8eaeec Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 12 Nov 2012 18:23:20 -0800 Subject: [PATCH 61/71] More module cleanup: removed the CoreModules.Framework modules directives out of .addin.xml. --- .../Framework/EntityTransfer/EntityTransferModule.cs | 2 ++ .../Framework/EntityTransfer/HGEntityTransferModule.cs | 2 ++ .../Framework/InventoryAccess/HGInventoryAccessModule.cs | 2 ++ .../Framework/InventoryAccess/InventoryAccessModule.cs | 2 ++ .../Framework/UserManagement/HGUserManagementModule.cs | 2 ++ .../Framework/UserManagement/UserManagementModule.cs | 2 ++ .../Region/CoreModules/Resources/CoreModulePlugin.addin.xml | 6 ------ 7 files changed, 12 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 7498cfe73e..3cb1901494 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -43,9 +43,11 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; using OpenMetaverse; using log4net; using Nini.Config; +using Mono.Addins; namespace OpenSim.Region.CoreModules.Framework.EntityTransfer { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "EntityTransferModule")] public class EntityTransferModule : INonSharedRegionModule, IEntityTransferModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index e37d4293c1..41ca13b8ea 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs @@ -42,9 +42,11 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; using OpenMetaverse; using log4net; using Nini.Config; +using Mono.Addins; namespace OpenSim.Region.CoreModules.Framework.EntityTransfer { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HGEntityTransferModule")] public class HGEntityTransferModule : EntityTransferModule, INonSharedRegionModule, IEntityTransferModule, IUserAgentVerificationModule { diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 6bb758ea07..964efdaa46 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs @@ -42,9 +42,11 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; using OpenMetaverse; using log4net; using Nini.Config; +using Mono.Addins; namespace OpenSim.Region.CoreModules.Framework.InventoryAccess { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HGInventoryAccessModule")] public class HGInventoryAccessModule : BasicInventoryAccessModule, INonSharedRegionModule, IInventoryAccessModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index d112a90709..8b7c16e1ca 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -46,9 +46,11 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; using OpenMetaverse; using log4net; using Nini.Config; +using Mono.Addins; namespace OpenSim.Region.CoreModules.Framework.InventoryAccess { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BasicInventoryAccessModule")] public class BasicInventoryAccessModule : INonSharedRegionModule, IInventoryAccessModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs index acefc97276..4ef57fe978 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs @@ -41,9 +41,11 @@ using OpenMetaverse; using OpenMetaverse.Packets; using log4net; using Nini.Config; +using Mono.Addins; namespace OpenSim.Region.CoreModules.Framework.UserManagement { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HGUserManagementModule")] public class HGUserManagementModule : UserManagementModule, ISharedRegionModule, IUserManagement { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index b4811dadce..86e70045e0 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs @@ -42,6 +42,7 @@ using OpenMetaverse; using OpenMetaverse.Packets; using log4net; using Nini.Config; +using Mono.Addins; namespace OpenSim.Region.CoreModules.Framework.UserManagement { @@ -54,6 +55,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement public Dictionary ServerURLs { get; set; } } + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "UserManagementModule")] public class UserManagementModule : ISharedRegionModule, IUserManagement { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index 81f1ff61a4..fee1d5f0f5 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -8,12 +8,6 @@ - - - - - - From f605a6242734bacc6dc4f224f0b7f9867ac8b432 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 13 Nov 2012 04:15:21 +0000 Subject: [PATCH 62/71] Disable code to get server-side to move given items to a destination folder on TaskInventoryAccepted. This is because the fixes to inventory versioning (so that they better match viewer expections) now appear to allow the viewer to execute #RLV moves, as happens on the LL grid. Doing it again server-side now wrongly creates another child #RLV folder underneath the root one. As per http://opensimulator.org/mantis/view.php?id=6311 --- .../Transfer/InventoryTransferModule.cs | 137 +++++++++--------- 1 file changed, 70 insertions(+), 67 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 24208df43a..5d4fec10cb 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs @@ -298,73 +298,76 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer } } - // XXX: This code was placed here to try and accomdate RLV which moves given folders named #RLV/~ - // to a folder called name in #RLV. However, this approach may not be ultimately correct - from analysis - // of Firestorm 4.2.2 on sending an InventoryOffered instead of TaskInventoryOffered (as was previously - // done), the viewer itself would appear to move and rename the folder, rather than the simulator doing it here. - else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) - { - UUID destinationFolderID = UUID.Zero; - - if (im.binaryBucket != null && im.binaryBucket.Length >= 16) - { - destinationFolderID = new UUID(im.binaryBucket, 0); - } - - if (destinationFolderID != UUID.Zero) - { - InventoryFolderBase destinationFolder = new InventoryFolderBase(destinationFolderID, client.AgentId); - if (destinationFolder == null) - { - m_log.WarnFormat( - "[INVENTORY TRANSFER]: TaskInventoryAccepted message from {0} in {1} specified folder {2} which does not exist", - client.Name, scene.Name, destinationFolderID); - - return; - } - - IInventoryService invService = scene.InventoryService; - - UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip - - InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); - item = invService.GetItem(item); - InventoryFolderBase folder = null; - UUID? previousParentFolderID = null; - - if (item != null) // It's an item - { - previousParentFolderID = item.Folder; - item.Folder = destinationFolderID; - - invService.DeleteItems(item.Owner, new List() { item.ID }); - scene.AddInventoryItem(client, item); - } - else - { - folder = new InventoryFolderBase(inventoryID, client.AgentId); - folder = invService.GetFolder(folder); - - if (folder != null) // It's a folder - { - previousParentFolderID = folder.ParentID; - folder.ParentID = destinationFolderID; - invService.MoveFolder(folder); - } - } - - // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code). - if (previousParentFolderID != null) - { - InventoryFolderBase previousParentFolder - = new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId); - previousParentFolder = invService.GetFolder(previousParentFolder); - scene.SendInventoryUpdate(client, previousParentFolder, true, true); - - scene.SendInventoryUpdate(client, destinationFolder, true, true); - } - } - } + // Disabled for now as it looks like http://opensimulator.org/mantis/view.php?id=6311 was fixed by fixes + // to inventory folder versioning allowing the viewer to move the received folder itself as happens on the + // LL grid. Doing it again server-side then wrongly does a second create and move +// // XXX: This code was placed here to try and accomdate RLV which moves given folders named #RLV/~ +// // to a folder called name in #RLV. However, this approach may not be ultimately correct - from analysis +// // of Firestorm 4.2.2 on sending an InventoryOffered instead of TaskInventoryOffered (as was previously +// // done), the viewer itself would appear to move and rename the folder, rather than the simulator doing it here. +// else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) +// { +// UUID destinationFolderID = UUID.Zero; +// +// if (im.binaryBucket != null && im.binaryBucket.Length >= 16) +// { +// destinationFolderID = new UUID(im.binaryBucket, 0); +// } +// +// if (destinationFolderID != UUID.Zero) +// { +// InventoryFolderBase destinationFolder = new InventoryFolderBase(destinationFolderID, client.AgentId); +// if (destinationFolder == null) +// { +// m_log.WarnFormat( +// "[INVENTORY TRANSFER]: TaskInventoryAccepted message from {0} in {1} specified folder {2} which does not exist", +// client.Name, scene.Name, destinationFolderID); +// +// return; +// } +// +// IInventoryService invService = scene.InventoryService; +// +// UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip +// +// InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); +// item = invService.GetItem(item); +// InventoryFolderBase folder = null; +// UUID? previousParentFolderID = null; +// +// if (item != null) // It's an item +// { +// previousParentFolderID = item.Folder; +// item.Folder = destinationFolderID; +// +// invService.DeleteItems(item.Owner, new List() { item.ID }); +// scene.AddInventoryItem(client, item); +// } +// else +// { +// folder = new InventoryFolderBase(inventoryID, client.AgentId); +// folder = invService.GetFolder(folder); +// +// if (folder != null) // It's a folder +// { +// previousParentFolderID = folder.ParentID; +// folder.ParentID = destinationFolderID; +// invService.MoveFolder(folder); +// } +// } +// +// // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code). +// if (previousParentFolderID != null) +// { +// InventoryFolderBase previousParentFolder +// = new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId); +// previousParentFolder = invService.GetFolder(previousParentFolder); +// scene.SendInventoryUpdate(client, previousParentFolder, true, true); +// +// scene.SendInventoryUpdate(client, destinationFolder, true, true); +// } +// } +// } else if ( im.dialog == (byte)InstantMessageDialog.InventoryDeclined || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined) From 2fd36653b98c4c69645f2e4d6dea02bbe9f1260d Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 13 Nov 2012 04:34:03 +0000 Subject: [PATCH 63/71] minor: Add some explanative method doc to SceneHelpers.SetupSceneModules() --- OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index 939fc33f70..ea3e3487f0 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs @@ -350,6 +350,10 @@ namespace OpenSim.Tests.Common /// /// /// If called directly, then all the modules must be shared modules. + /// + /// We are emulating here the normal calls made to setup region modules + /// (Initialise(), PostInitialise(), AddRegion, RegionLoaded()). + /// TODO: Need to reuse normal runtime module code. /// /// /// From 31177d9259a22c3dbe38fc5d13065c13dabfcf84 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 12 Nov 2012 21:14:58 -0800 Subject: [PATCH 64/71] Another 10 modules' directives moved from .addin.xml --- .../Region/CoreModules/Hypergrid/HGWorldMapModule.cs | 2 ++ .../CoreModules/Resources/CoreModulePlugin.addin.xml | 10 ---------- .../CoreModules/World/Archiver/ArchiverModule.cs | 2 ++ OpenSim/Region/CoreModules/World/Land/DwellModule.cs | 2 ++ .../CoreModules/World/Land/LandManagementModule.cs | 2 ++ .../Region/CoreModules/World/Land/PrimCountModule.cs | 2 ++ .../CoreModules/World/Serialiser/SerialiserModule.cs | 2 ++ .../Region/CoreModules/World/Terrain/TerrainModule.cs | 2 ++ .../CoreModules/World/Warp3DMap/Warp3DImageModule.cs | 2 ++ .../CoreModules/World/WorldMap/MapSearchModule.cs | 2 ++ .../CoreModules/World/WorldMap/WorldMapModule.cs | 2 ++ 11 files changed, 20 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs index 0c60391fe2..e0921adf51 100644 --- a/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs +++ b/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs @@ -31,6 +31,7 @@ using System.Reflection; using log4net; using Nini.Config; using OpenMetaverse; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Region.CoreModules.World.WorldMap; using OpenSim.Region.Framework.Interfaces; @@ -39,6 +40,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.Hypergrid { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HGWorldMapModule")] public class HGWorldMapModule : WorldMapModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index fee1d5f0f5..31b61b2b02 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -8,15 +8,6 @@ - - - - - - - - - @@ -34,7 +25,6 @@ - diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index abf3713671..1be6386971 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs @@ -32,6 +32,7 @@ using System.Reflection; using log4net; using NDesk.Options; using Nini.Config; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Framework.Console; using OpenSim.Region.Framework.Interfaces; @@ -42,6 +43,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// /// This module loads and saves OpenSimulator region archives /// + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ArchiverModule")] public class ArchiverModule : INonSharedRegionModule, IRegionArchiverModule { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/World/Land/DwellModule.cs b/OpenSim/Region/CoreModules/World/Land/DwellModule.cs index d1f05a714a..bd221550cc 100644 --- a/OpenSim/Region/CoreModules/World/Land/DwellModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/DwellModule.cs @@ -36,6 +36,7 @@ using Nini.Config; using OpenMetaverse; using OpenMetaverse.StructuredData; using OpenMetaverse.Messages.Linden; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Framework.Capabilities; using OpenSim.Framework.Console; @@ -51,6 +52,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.World.Land { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DwellModule")] public class DwellModule : IDwellModule, INonSharedRegionModule { private Scene m_scene; diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index e93546258d..8682798d93 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -36,6 +36,7 @@ using Nini.Config; using OpenMetaverse; using OpenMetaverse.StructuredData; using OpenMetaverse.Messages.Linden; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Framework.Capabilities; using OpenSim.Framework.Console; @@ -60,6 +61,7 @@ namespace OpenSim.Region.CoreModules.World.Land public byte RegionAccess; } + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LandManagementModule")] public class LandManagementModule : INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs index 665875fc49..f9cc0cf1b2 100644 --- a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs @@ -34,6 +34,7 @@ using log4net; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; +using Mono.Addins; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; @@ -49,6 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Land public Dictionary Users = new Dictionary (); } + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "PrimCountModule")] public class PrimCountModule : IPrimCountModule, INonSharedRegionModule { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs b/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs index 0e861a1509..e0247d94b3 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs @@ -32,6 +32,7 @@ using System.Reflection; using log4net; using Nini.Config; +using Mono.Addins; using OpenMetaverse; using OpenSim.Region.CoreModules.Framework.InterfaceCommander; @@ -41,6 +42,7 @@ using OpenSim.Region.Framework.Scenes.Serialization; namespace OpenSim.Region.CoreModules.World.Serialiser { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SerialiserModule")] public class SerialiserModule : ISharedRegionModule, IRegionSerialiserModule { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index 4694b148b4..52b4313306 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs @@ -33,6 +33,7 @@ using System.Net; using log4net; using Nini.Config; using OpenMetaverse; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Region.CoreModules.Framework.InterfaceCommander; using OpenSim.Region.CoreModules.World.Terrain.FileLoaders; @@ -43,6 +44,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.World.Terrain { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "TerrainModule")] public class TerrainModule : INonSharedRegionModule, ICommandableModule, ITerrainModule { #region StandardTerrainEffects enum diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index 9e81331d62..5e0dfa76a5 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs @@ -35,6 +35,7 @@ using CSJ2K; using Nini.Config; using log4net; using Rednettle.Warp3D; +using Mono.Addins; using OpenMetaverse; using OpenMetaverse.Imaging; using OpenMetaverse.Rendering; @@ -49,6 +50,7 @@ using WarpRenderer = global::Warp3D.Warp3D; namespace OpenSim.Region.CoreModules.World.Warp3DMap { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "Warp3DImageModule")] public class Warp3DImageModule : IMapImageGenerator, INonSharedRegionModule { private static readonly UUID TEXTURE_METADATA_MAGIC = new UUID("802dc0e0-f080-4931-8b57-d1be8611c4f3"); diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index 8f1a35ded9..46b190e701 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs @@ -30,6 +30,7 @@ using System.Reflection; using log4net; using Nini.Config; using OpenMetaverse; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -38,6 +39,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.World.WorldMap { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MapSearchModule")] public class MapSearchModule : ISharedRegionModule { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index dfba3ffbd2..e2f525cf47 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -40,6 +40,7 @@ using Nini.Config; using OpenMetaverse; using OpenMetaverse.Imaging; using OpenMetaverse.StructuredData; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Framework.Capabilities; using OpenSim.Framework.Monitoring; @@ -55,6 +56,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.World.WorldMap { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WorldMapModule")] public class WorldMapModule : INonSharedRegionModule, IWorldMapModule { private static readonly ILog m_log = From d73aa8c1a6c70bb07d72f8f05d3369965d5ac543 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 12 Nov 2012 21:27:23 -0800 Subject: [PATCH 65/71] Moved the WindModule and its own plugins out of .addin.xml --- .../Region/CoreModules/Resources/CoreModulePlugin.addin.xml | 5 ----- .../CoreModules/World/Wind/Plugins/ConfigurableWind.cs | 2 ++ .../CoreModules/World/Wind/Plugins/SimpleRandomWind.cs | 2 ++ OpenSim/Region/CoreModules/World/Wind/WindModule.cs | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index 31b61b2b02..e39358bb1c 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -24,7 +24,6 @@ - @@ -74,9 +73,5 @@ - - - - diff --git a/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs b/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs index 9d47e19439..6af40507f3 100644 --- a/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs +++ b/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs @@ -31,12 +31,14 @@ using System.Reflection; using log4net; using OpenMetaverse; +using Mono.Addins; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.CoreModules.World.Wind; namespace OpenSim.Region.CoreModules.World.Wind.Plugins { + [Extension(Path = "/OpenSim/WindModule", NodeName = "WindModel", Id = "ConfigurableWind")] class ConfigurableWind : Mono.Addins.TypeExtensionNode, IWindModelPlugin { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs b/OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs index 071e20bb3b..fcb0c10e1b 100644 --- a/OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs +++ b/OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs @@ -29,11 +29,13 @@ using System; using System.Collections.Generic; using OpenMetaverse; +using Mono.Addins; using OpenSim.Region.Framework.Interfaces; namespace OpenSim.Region.CoreModules.World.Wind.Plugins { + [Extension(Path = "/OpenSim/WindModule", NodeName = "WindModel", Id = "SimpleRandomWind")] class SimpleRandomWind : Mono.Addins.TypeExtensionNode, IWindModelPlugin { private Vector2[] m_windSpeeds = new Vector2[16 * 16]; diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index 0186a41d01..fd8e2b4b02 100644 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs @@ -40,6 +40,7 @@ using OpenSim.Region.CoreModules.World.Wind; namespace OpenSim.Region.CoreModules { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WindModule")] public class WindModule : IWindModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); From 608444c9f712cf76fd5560d012b0f90fe2a3986e Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 13 Nov 2012 08:27:51 -0800 Subject: [PATCH 66/71] Another 21 modules' directives moved out of .addin.xml --- .../CoreModules/Agent/IPBan/IPBanModule.cs | 2 ++ .../Agent/TextureSender/J2KDecoderModule.cs | 2 ++ .../CoreModules/Asset/CenomeAssetCache.cs | 2 ++ .../CoreModules/Asset/CoreAssetCache.cs | 2 ++ .../Asset/GlynnTuckerAssetCache.cs | 2 ++ .../CoreModules/Avatar/Chat/ChatModule.cs | 2 ++ .../Avatar/Friends/FriendsModule.cs | 2 ++ .../Avatar/Friends/HGFriendsModule.cs | 1 + .../InstantMessage/InstantMessageModule.cs | 2 ++ .../InstantMessage/MessageTransferModule.cs | 2 ++ .../Avatar/InstantMessage/MuteListModule.cs | 2 ++ .../InstantMessage/OfflineMessageModule.cs | 2 ++ .../Avatar/InstantMessage/PresenceModule.cs | 2 ++ .../Transfer/InventoryTransferModule.cs | 2 ++ .../CoreModules/Avatar/Lure/LureModule.cs | 2 ++ .../Framework/Library/LibraryModule.cs | 2 ++ .../Resources/CoreModulePlugin.addin.xml | 20 ------------------- .../Scripting/LSLHttp/UrlModule.cs | 2 ++ .../CoreModules/World/Cloud/CloudModule.cs | 4 +++- .../Region/CoreModules/World/Sun/SunModule.cs | 2 ++ .../World/Vegetation/VegetationModule.cs | 4 +++- 21 files changed, 41 insertions(+), 22 deletions(-) diff --git a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs index 1749dcfdb4..4b457b1e45 100644 --- a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs +++ b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Text; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; @@ -36,6 +37,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Agent.IPBan { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "IPBanModule")] public class IPBanModule : ISharedRegionModule { #region Implementation of ISharedRegionModule diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index 47c4b59067..37646855ca 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs @@ -32,6 +32,7 @@ using System.Reflection; using System.Text; using System.Threading; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenMetaverse.Imaging; @@ -45,6 +46,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender { public delegate void J2KDecodeDelegate(UUID assetID); + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "J2KDecoderModule")] public class J2KDecoderModule : ISharedRegionModule, IJ2KDecoder { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs index b1b7b27a6c..e40caeca4d 100644 --- a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs @@ -28,6 +28,7 @@ using System; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; @@ -89,6 +90,7 @@ namespace OpenSim.Region.CoreModules.Asset /// ExpirationTime = 60 /// /// + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CenomeMemoryAssetCache")] public class CenomeMemoryAssetCache : IImprovedAssetCache, ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs index 7da5e7ace9..9742a5caa4 100644 --- a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs @@ -30,6 +30,7 @@ using System; using System.IO; using System.Collections.Generic; using System.Reflection; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; @@ -38,6 +39,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Asset { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CoreAssetCache")] public class CoreAssetCache : ISharedRegionModule, IImprovedAssetCache { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs b/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs index 1365e69117..9592ca0019 100644 --- a/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs @@ -31,6 +31,7 @@ using System.IO; using System.Collections.Generic; using System.Reflection; using GlynnTucker.Cache; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; @@ -39,6 +40,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Asset { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GlynnTuckerAssetCache")] public class GlynnTuckerAssetCache : ISharedRegionModule, IImprovedAssetCache { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index ddf92c3e44..6d62ff0f92 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs @@ -30,6 +30,7 @@ using System.Collections.Generic; using System.Reflection; using log4net; using Nini.Config; +using Mono.Addins; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; @@ -37,6 +38,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Avatar.Chat { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ChatModule")] public class ChatModule : ISharedRegionModule { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index f1903c3e27..8056030843 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -35,6 +35,7 @@ using log4net; using Nini.Config; using Nwc.XmlRpc; using OpenMetaverse; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Framework.Servers.HttpServer; using OpenSim.Framework.Communications; @@ -50,6 +51,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.Avatar.Friends { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "FriendsModule")] public class FriendsModule : ISharedRegionModule, IFriendsModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs index 06f27e23df..bf5c0bb46b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs @@ -46,6 +46,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.Avatar.Friends { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HGFriendsModule")] public class HGFriendsModule : FriendsModule, ISharedRegionModule, IFriendsModule, IFriendsSimConnector { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs index 569ef264f7..c33a2960b0 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs @@ -28,6 +28,7 @@ using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -37,6 +38,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Avatar.InstantMessage { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "InstantMessageModule")] public class InstantMessageModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger( diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index 596174b3cd..39833695e6 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs @@ -30,6 +30,7 @@ using System.Collections.Generic; using System.Net; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using Nwc.XmlRpc; using OpenMetaverse; @@ -43,6 +44,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Avatar.InstantMessage { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MessageTransferModule")] public class MessageTransferModule : ISharedRegionModule, IMessageTransferModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs index 24cbaeb9f5..7ce2813139 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs @@ -29,6 +29,7 @@ using System.Collections.Generic; using System.Reflection; using log4net; using Nini.Config; +using Mono.Addins; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Framework.Communications; @@ -39,6 +40,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Avatar.InstantMessage { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MuteListModule")] public class MuteListModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index de25048b45..4aaf1feab1 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs @@ -28,6 +28,7 @@ using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -39,6 +40,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Avatar.InstantMessage { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "OfflineMessageModule")] public class OfflineMessageModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs index dd17f3c26b..4c678c240f 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs @@ -33,6 +33,7 @@ using log4net; using Nini.Config; using Nwc.XmlRpc; using OpenMetaverse; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -42,6 +43,7 @@ using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo; namespace OpenSim.Region.CoreModules.Avatar.InstantMessage { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "PresenceModule")] public class PresenceModule : ISharedRegionModule, IPresenceModule { private static readonly ILog m_log = LogManager.GetLogger( diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 5d4fec10cb..582aac4763 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -38,6 +39,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "InventoryTransferModule")] public class InventoryTransferModule : ISharedRegionModule { private static readonly ILog m_log diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs index 6ce9556e67..e4b0cfa734 100644 --- a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -37,6 +38,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Avatar.Lure { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LureModule")] public class LureModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger( diff --git a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs index 3155ce7cc9..ec22146dbf 100644 --- a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs @@ -41,10 +41,12 @@ using OpenSim.Server.Base; using OpenMetaverse; using log4net; +using Mono.Addins; using Nini.Config; namespace OpenSim.Region.CoreModules.Framework.Library { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LibraryModule")] public class LibraryModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index e39358bb1c..70a9b22ba7 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -8,26 +8,6 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index 53a9679580..a654477a3e 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs @@ -31,6 +31,7 @@ using System.Collections.Generic; using System.Collections; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -94,6 +95,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp /// /// This module provides external URLs for in-world scripts. /// + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "UrlModule")] public class UrlModule : ISharedRegionModule, IUrlModule { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs b/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs index 2ec6ff91c1..d217f36c7d 100644 --- a/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs +++ b/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs @@ -27,14 +27,16 @@ using System; using System.Collections.Generic; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -namespace OpenSim.Region.CoreModules +namespace OpenSim.Region.CoreModules.World { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CloudModule")] public class CloudModule : ICloudModule, INonSharedRegionModule { // private static readonly log4net.ILog m_log diff --git a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs index bdbf273de4..a321c0926e 100644 --- a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs +++ b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -37,6 +38,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SunModule")] public class SunModule : ISunModule { /// diff --git a/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs b/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs index 528da0e3bc..3f5d3757bb 100644 --- a/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs +++ b/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs @@ -28,14 +28,16 @@ using System; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -namespace OpenSim.Region.CoreModules.Avatar.Vegetation +namespace OpenSim.Region.CoreModules.World.Vegetation { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "VegetationModule")] public class VegetationModule : INonSharedRegionModule, IVegetationModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); From 457395d9c15109ffe9275c255c2c92b88a61c494 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 13 Nov 2012 08:36:44 -0800 Subject: [PATCH 67/71] Another 11 modules' directions moved out of .addin.xml --- .../Resources/CoreModulePlugin.addin.xml | 13 ------------- .../Asset/AssetServiceInConnectorModule.cs | 2 ++ .../AuthenticationServiceInConnectorModule.cs | 2 ++ .../Grid/GridInfoServiceInConnectorModule.cs | 2 ++ .../Hypergrid/HypergridServiceInConnectorModule.cs | 2 ++ .../Inventory/InventoryServiceInConnectorModule.cs | 2 ++ .../Land/LandServiceInConnectorModule.cs | 2 ++ .../Login/LLLoginServiceInConnectorModule.cs | 2 ++ .../Neighbour/NeighbourServiceInConnectorModule.cs | 2 ++ .../SimulationServiceInConnectorModule.cs | 3 ++- .../Region/CoreModules/World/Access/AccessModule.cs | 2 ++ .../CoreModules/World/LegacyMap/MapImageModule.cs | 2 ++ 12 files changed, 22 insertions(+), 14 deletions(-) diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index 70a9b22ba7..5a43936d45 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -38,19 +38,6 @@ - - - - - \ - \ - \ - \ - \ - - \ - \ - diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs index 563b1a163b..7b4668aae5 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs @@ -29,6 +29,7 @@ using System; using System.Reflection; using System.Collections.Generic; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Servers; @@ -39,6 +40,7 @@ using OpenSim.Server.Handlers.Base; namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "AssetServiceInConnectorModule")] public class AssetServiceInConnectorModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs index 2c6a0b865e..2cdffe6521 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs @@ -29,6 +29,7 @@ using System; using System.Reflection; using System.Collections.Generic; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Servers; @@ -41,6 +42,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Authentication { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "AuthenticationServiceInConnectorModule")] public class AuthenticationServiceInConnectorModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs index f37b75cc56..22857d061e 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs @@ -29,6 +29,7 @@ using System; using System.Reflection; using System.Collections.Generic; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Servers; @@ -41,6 +42,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GridInfoServiceInConnectorModule")] public class GridInfoServiceInConnectorModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs index f681ef22f1..f74929558d 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs @@ -29,6 +29,7 @@ using System; using System.Reflection; using System.Collections.Generic; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Servers; @@ -42,6 +43,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Hypergrid { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HypergridServiceInConnectorModule")] public class HypergridServiceInConnectorModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs index 87b4119b91..0a4e736fa6 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs @@ -29,6 +29,7 @@ using System; using System.Reflection; using System.Collections.Generic; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Servers; @@ -39,6 +40,7 @@ using OpenSim.Server.Handlers.Base; namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "InventoryServiceInConnectorModule")] public class InventoryServiceInConnectorModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs index dab89ea781..2fd21be8f5 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs @@ -29,6 +29,7 @@ using System; using System.Reflection; using System.Collections.Generic; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Servers; @@ -42,6 +43,7 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LandServiceInConnectorModule")] public class LandServiceInConnectorModule : ISharedRegionModule, ILandService { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs index 0a86fb761f..425febd909 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs @@ -29,6 +29,7 @@ using System; using System.Reflection; using System.Collections.Generic; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Servers; @@ -42,6 +43,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Login { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LLLoginServiceInConnectorModule")] public class LLLoginServiceInConnectorModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs index 1f26ed9236..6bf47cbd46 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs @@ -29,6 +29,7 @@ using System; using System.Reflection; using System.Collections.Generic; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Servers; @@ -41,6 +42,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Neighbour { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "NeighbourServiceInConnectorModule")] public class NeighbourServiceInConnectorModule : ISharedRegionModule, INeighbourService { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs index 4748e1922f..57d113251c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs @@ -29,6 +29,7 @@ using System; using System.Reflection; using System.Collections.Generic; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Servers; @@ -40,7 +41,7 @@ using OpenSim.Server.Handlers.Base; namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Simulation { - // Under construction + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimulationServiceInConnectorModule")] public class SimulationServiceInConnectorModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs index e7b14547f4..1599f1537f 100644 --- a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs +++ b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -39,6 +40,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.World { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "AccessModule")] public class AccessModule : ISharedRegionModule { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs index 6a443d0247..8a422b0303 100644 --- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs @@ -30,6 +30,7 @@ using System.Collections.Generic; using System.Drawing; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenMetaverse.Imaging; @@ -59,6 +60,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap public face[] trns; } + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MapImageModule")] public class MapImageModule : IMapImageGenerator, INonSharedRegionModule { private static readonly ILog m_log = From 922425a205330d860b039be0cbda0788d71577a6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 13 Nov 2012 08:49:52 -0800 Subject: [PATCH 68/71] Last 27 modules' directives (service connectors out). --- .../Resources/CoreModulePlugin.addin.xml | 29 ------------------- .../Asset/HGAssetBroker.cs | 5 ++-- .../Asset/LocalAssetServiceConnector.cs | 2 ++ .../Asset/RemoteAssetServiceConnector.cs | 2 ++ .../LocalAuthenticationServiceConnector.cs | 2 ++ .../RemoteAuthenticationServiceConnector.cs | 2 ++ .../LocalAuthorizationServiceConnector.cs | 2 ++ .../RemoteAuthorizationServiceConnector.cs | 2 ++ .../Avatar/LocalAvatarServiceConnector.cs | 2 ++ .../Avatar/RemoteAvatarServiceConnector.cs | 2 ++ .../Grid/LocalGridServiceConnector.cs | 2 ++ .../Grid/RemoteGridServiceConnector.cs | 2 ++ .../GridUser/LocalGridUserServiceConnector.cs | 2 ++ .../RemoteGridUserServiceConnector.cs | 2 ++ .../Inventory/HGInventoryBroker.cs | 2 ++ .../LocalInventoryServiceConnector.cs | 2 ++ .../RemoteXInventoryServiceConnector.cs | 2 ++ .../Land/LocalLandServiceConnector.cs | 5 ++-- .../Land/RemoteLandServiceConnector.cs | 2 ++ .../LocalNeighbourServiceConnector.cs | 2 ++ .../RemoteNeighourServiceConnector.cs | 2 ++ .../Presence/LocalPresenceServiceConnector.cs | 2 ++ .../RemotePresenceServiceConnector.cs | 2 ++ .../Simulation/LocalSimulationConnector.cs | 2 ++ .../Simulation/RemoteSimulationConnector.cs | 2 ++ .../LocalUserAccountServiceConnector.cs | 2 ++ .../RemoteUserAccountServiceConnector.cs | 2 ++ 27 files changed, 54 insertions(+), 33 deletions(-) diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index 5a43936d45..b7368db5bf 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml @@ -8,35 +8,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs index 1e1c7d00e0..d221d68f0b 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs @@ -26,6 +26,7 @@ */ using log4net; +using Mono.Addins; using Nini.Config; using System; using System.Collections.Generic; @@ -40,8 +41,8 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset { - public class HGAssetBroker : - ISharedRegionModule, IAssetService + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HGAssetBroker")] + public class HGAssetBroker : ISharedRegionModule, IAssetService { private static readonly ILog m_log = LogManager.GetLogger( diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs index 449c1f1108..480cd695c2 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs @@ -26,6 +26,7 @@ */ using log4net; +using Mono.Addins; using Nini.Config; using System; using System.Collections.Generic; @@ -38,6 +39,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalAssetServicesConnector")] public class LocalAssetServicesConnector : ISharedRegionModule, IAssetService { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs index 8a22cfc098..e6eeacfaf6 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs @@ -26,6 +26,7 @@ */ using log4net; +using Mono.Addins; using System; using System.Collections.Generic; using System.Reflection; @@ -38,6 +39,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteAssetServicesConnector")] public class RemoteAssetServicesConnector : AssetServicesConnector, ISharedRegionModule, IAssetService { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs index 9484a5a282..16f42a7031 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -39,6 +40,7 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authentication { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalAuthenticationServicesConnector")] public class LocalAuthenticationServicesConnector : ISharedRegionModule, IAuthenticationService { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/RemoteAuthenticationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/RemoteAuthenticationServiceConnector.cs index a053bc2cf6..7cb8b22134 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/RemoteAuthenticationServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/RemoteAuthenticationServiceConnector.cs @@ -28,6 +28,7 @@ using System; using Nini.Config; using log4net; +using Mono.Addins; using System.Reflection; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -36,6 +37,7 @@ using OpenSim.Services.Connectors; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authentication { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteAuthenticationServicesConnector")] public class RemoteAuthenticationServicesConnector : AuthenticationServicesConnector, ISharedRegionModule, IAuthenticationService { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs index 267fb9ead9..1acb695e72 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs @@ -26,6 +26,7 @@ */ using log4net; +using Mono.Addins; using Nini.Config; using System; using System.Collections.Generic; @@ -39,6 +40,7 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalAuthorizationServicesConnector")] public class LocalAuthorizationServicesConnector : INonSharedRegionModule, IAuthorizationService { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs index 86c0099c68..b8d409d649 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs @@ -26,6 +26,7 @@ */ using log4net; +using Mono.Addins; using System; using System.Collections.Generic; using System.Reflection; @@ -39,6 +40,7 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteAuthorizationServicesConnector")] public class RemoteAuthorizationServicesConnector : AuthorizationServicesConnector, ISharedRegionModule, IAuthorizationService { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs index 9ee19f8f25..c3ef588fbc 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; @@ -40,6 +41,7 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalAvatarServicesConnector")] public class LocalAvatarServicesConnector : ISharedRegionModule, IAvatarService { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs index d665a54a32..a087aeaedd 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs @@ -26,6 +26,7 @@ */ using System; +using Mono.Addins; using Nini.Config; using log4net; using System.Reflection; @@ -36,6 +37,7 @@ using OpenSim.Services.Connectors; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteAvatarServicesConnector")] public class RemoteAvatarServicesConnector : AvatarServicesConnector, ISharedRegionModule, IAvatarService { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs index 3c6e38127f..c0c2ca7497 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs @@ -26,6 +26,7 @@ */ using log4net; +using Mono.Addins; using Nini.Config; using System; using System.Collections.Generic; @@ -41,6 +42,7 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalGridServicesConnector")] public class LocalGridServicesConnector : ISharedRegionModule, IGridService { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs index e6c89d7af6..b2646babcc 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs @@ -26,6 +26,7 @@ */ using log4net; +using Mono.Addins; using System; using System.Collections.Generic; using System.Reflection; @@ -42,6 +43,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteGridServicesConnector")] public class RemoteGridServicesConnector : ISharedRegionModule, IGridService { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs index 90fe69e18c..5734334c38 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -39,6 +40,7 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalGridUserServicesConnector")] public class LocalGridUserServicesConnector : ISharedRegionModule, IGridUserService { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs index 04acf6732f..f7e6eb88dd 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs @@ -36,10 +36,12 @@ using OpenSim.Services.Connectors; using OpenMetaverse; using log4net; +using Mono.Addins; using Nini.Config; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteGridUserServicesConnector")] public class RemoteGridUserServicesConnector : ISharedRegionModule, IGridUserService { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index cf6d2f7905..e474ef6bdb 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs @@ -26,6 +26,7 @@ */ using log4net; +using Mono.Addins; using Nini.Config; using System; using System.Collections.Generic; @@ -42,6 +43,7 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HGInventoryBroker")] public class HGInventoryBroker : ISharedRegionModule, IInventoryService { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index 097ff1aded..ec5751d599 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs @@ -26,6 +26,7 @@ */ using log4net; +using Mono.Addins; using Nini.Config; using System; @@ -41,6 +42,7 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalInventoryServicesConnector")] public class LocalInventoryServicesConnector : ISharedRegionModule, IInventoryService { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs index 11e0150083..2d3ba82e6d 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs @@ -29,6 +29,7 @@ using log4net; using System; using System.Collections.Generic; using System.Reflection; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Monitoring; @@ -40,6 +41,7 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteXInventoryServicesConnector")] public class RemoteXInventoryServicesConnector : ISharedRegionModule, IInventoryService { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs index 86c0b85891..532993316a 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs @@ -26,6 +26,7 @@ */ using log4net; +using Mono.Addins; using Nini.Config; using System; using System.Collections.Generic; @@ -39,8 +40,8 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land { - public class LocalLandServicesConnector : - ISharedRegionModule, ILandService + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalLandServicesConnector")] + public class LocalLandServicesConnector : ISharedRegionModule, ILandService { private static readonly ILog m_log = LogManager.GetLogger( diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs index 766ef81ea1..77dfa4a104 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs @@ -26,6 +26,7 @@ */ using log4net; +using Mono.Addins; using System; using System.Collections.Generic; using System.Reflection; @@ -41,6 +42,7 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteLandServicesConnector")] public class RemoteLandServicesConnector : LandServicesConnector, ISharedRegionModule, ILandService { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs index 7a90686839..fd89428c8c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -39,6 +40,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalNeighbourServicesConnector")] public class LocalNeighbourServicesConnector : ISharedRegionModule, INeighbourService { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs index c6fc2a1475..e6772f3add 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs @@ -26,6 +26,7 @@ */ using log4net; +using Mono.Addins; using System; using System.Collections.Generic; using System.Reflection; @@ -39,6 +40,7 @@ using OpenSim.Server.Base; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteNeighbourServicesConnector")] public class RemoteNeighbourServicesConnector : NeighbourServicesConnector, ISharedRegionModule, INeighbourService { diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs index 49dd633be4..d8bed1b79d 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs @@ -36,10 +36,12 @@ using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo; using OpenMetaverse; using log4net; +using Mono.Addins; using Nini.Config; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalPresenceServicesConnector")] public class LocalPresenceServicesConnector : ISharedRegionModule, IPresenceService { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs index bf4e9abf0d..be73932ce4 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs @@ -37,10 +37,12 @@ using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo; using OpenMetaverse; using log4net; +using Mono.Addins; using Nini.Config; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemotePresenceServicesConnector")] public class RemotePresenceServicesConnector : ISharedRegionModule, IPresenceService { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index 316ecd24ee..3c1807413b 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs @@ -29,6 +29,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -39,6 +40,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalSimulationConnectorModule")] public class LocalSimulationConnectorModule : ISharedRegionModule, ISimulationService { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index bc505a1164..b2a1b23279 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs @@ -32,6 +32,7 @@ using System.Net; using System.Reflection; using System.Text; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenMetaverse.StructuredData; @@ -46,6 +47,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteSimulationConnectorModule")] public class RemoteSimulationConnectorModule : ISharedRegionModule, ISimulationService { private bool initialized = false; diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs index 0a0ce3cf47..529bfd7289 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -39,6 +40,7 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalUserAccountServicesConnector")] public class LocalUserAccountServicesConnector : ISharedRegionModule, IUserAccountService { private static readonly ILog m_log = diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs index 3321b38232..5aa87d37cc 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs @@ -28,6 +28,7 @@ using System; using Nini.Config; using log4net; +using Mono.Addins; using System.Reflection; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -38,6 +39,7 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteUserAccountServicesConnector")] public class RemoteUserAccountServicesConnector : UserAccountServicesConnector, ISharedRegionModule, IUserAccountService { From 89a138885776cf09a2cca90e1733bde8b7d36303 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 13 Nov 2012 09:04:32 -0800 Subject: [PATCH 69/71] Deleted .addin.xml. Added AssemblyInfo.cs --- .../CoreModules/Properties/AssemblyInfo.cs | 38 +++++++++++++++++++ .../Resources/CoreModulePlugin.addin.xml | 15 -------- 2 files changed, 38 insertions(+), 15 deletions(-) create mode 100644 OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs delete mode 100644 OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml diff --git a/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs b/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..5b8898bee6 --- /dev/null +++ b/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs @@ -0,0 +1,38 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Mono.Addins; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OpenSim.Region.CoreModules")] +[assembly: AssemblyDescription("Core modules for OpenSim")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OpenSim.Region.CoreModules.Properties")] +[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("94f62dd1-bcf3-4218-9844-9a3996286e3e")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: Addin("OpenSim.Region.CoreModules", "0.1")] +[assembly: AddinDependency("OpenSim", "0.5")] + diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml deleted file mode 100644 index b7368db5bf..0000000000 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - From 18c5d33f0a6ccd08261e753f7bc9834708a1c777 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 13 Nov 2012 09:48:56 -0800 Subject: [PATCH 70/71] All optional modules' directives moved out of addin.xml --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 2 +- .../Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs | 2 ++ .../OptionalModules/Avatar/Concierge/ConciergeModule.cs | 2 ++ .../Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | 2 ++ .../OptionalModules/Resources/OptionalModules.addin.xml | 7 ------- .../Scripting/RegionReadyModule/RegionReadyModule.cs | 2 ++ .../OptionalModules/World/AutoBackup/AutoBackupModule.cs | 2 ++ .../World/TreePopulator/TreePopulatorModule.cs | 2 ++ .../OptionalModules/World/WorldView/WorldViewModule.cs | 2 ++ 9 files changed, 15 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 5fe594860d..992f38ecb9 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -40,7 +40,7 @@ using OpenSim.Region.ClientStack.LindenUDP; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -namespace OpenSim.Region.CoreModules.UDP.Linden +namespace OpenSim.Region.OptionalModules.UDP.Linden { /// /// A module that just holds commands for inspecting the current state of the Linden UDP stack. diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs index 913d934cf3..2e1d03d530 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs @@ -31,6 +31,7 @@ using System.Collections.Generic; using System.Net; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using Nwc.XmlRpc; using OpenSim.Framework; @@ -40,6 +41,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.OptionalModules.Avatar.Chat { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "IRCBridgeModule")] public class IRCBridgeModule : INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs index 5c3be29e9a..018357adf1 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs @@ -36,6 +36,7 @@ using System.Text; using System.Text.RegularExpressions; using System.Threading; using log4net; +using Mono.Addins; using Nini.Config; using Nwc.XmlRpc; using OpenMetaverse; @@ -47,6 +48,7 @@ using OpenSim.Region.CoreModules.Avatar.Chat; namespace OpenSim.Region.OptionalModules.Avatar.Concierge { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ConciergeModule")] public class ConciergeModule : ChatModule, ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index c5fcef4646..881807abd7 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs @@ -36,6 +36,7 @@ using System.Reflection; using System.Threading; using OpenMetaverse; using log4net; +using Mono.Addins; using Nini.Config; using Nwc.XmlRpc; using OpenSim.Framework; @@ -49,6 +50,7 @@ using Caps = OpenSim.Framework.Capabilities.Caps; namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "VivoxVoiceModule")] public class VivoxVoiceModule : ISharedRegionModule { diff --git a/OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml b/OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml index a372d37781..b97a1eca11 100644 --- a/OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml +++ b/OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml @@ -8,12 +8,5 @@ - - - - - - - diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs index bad75f7819..c550c44243 100644 --- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs @@ -32,6 +32,7 @@ using System.Net; using System.IO; using System.Text; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenMetaverse.StructuredData; @@ -42,6 +43,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.OptionalModules.Scripting.RegionReady { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RegionReadyModule")] public class RegionReadyModule : IRegionReadyModule, INonSharedRegionModule { private static readonly ILog m_log = diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs index ec9f1578e7..1d35c54efc 100644 --- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs +++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs @@ -33,6 +33,7 @@ using System.Reflection; using System.Timers; using System.Text.RegularExpressions; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; @@ -95,6 +96,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup /// Save memory by setting low initial capacities. Minimizes impact in common cases of all regions using same interval, and instances hosting 1 ~ 4 regions. /// Also helps if you don't want AutoBackup at all. /// + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "AutoBackupModule")] public class AutoBackupModule : ISharedRegionModule { private static readonly ILog m_log = diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index 3d0b9fbaff..81448709cf 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs @@ -31,6 +31,7 @@ using System.Reflection; using System.Timers; using OpenMetaverse; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Framework; using OpenSim.Region.CoreModules.Framework.InterfaceCommander; @@ -46,6 +47,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator /// /// Version 2.02 - Still hacky /// + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "TreePopulatorModule")] public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs index 1aee39a5b9..baf55c34af 100644 --- a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs +++ b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewModule.cs @@ -32,6 +32,7 @@ using System.Drawing.Imaging; using System.Reflection; using System.IO; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenMetaverse.Imaging; @@ -45,6 +46,7 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.OptionalModules.World.WorldView { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WorldViewModule")] public class WorldViewModule : INonSharedRegionModule { private static readonly ILog m_log = From 1f9d39c15db86b9d5ff6e589b03c3e9187767a44 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 13 Nov 2012 09:54:52 -0800 Subject: [PATCH 71/71] Deleted OptionalModules.addin.xml. Added AssemblyInfo.cs for that dll. --- .../Example/BareBonesShared/BareBonesSharedModule.cs | 3 --- .../Resources/OptionalModules.addin.xml | 12 ------------ 2 files changed, 15 deletions(-) delete mode 100644 OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml diff --git a/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs b/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs index dddea3e1d8..781fe952d2 100644 --- a/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs +++ b/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs @@ -33,9 +33,6 @@ using Nini.Config; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -[assembly: Addin("BareBonesSharedModule", "0.1")] -[assembly: AddinDependency("OpenSim", "0.5")] - namespace OpenSim.Region.OptionalModules.Example.BareBonesShared { /// diff --git a/OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml b/OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml deleted file mode 100644 index b97a1eca11..0000000000 --- a/OpenSim/Region/OptionalModules/Resources/OptionalModules.addin.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - -