Revert "Updates all IRegionModules to the new style region modules."
This reverts commit ec3c31e61e
.
mysql-performance
parent
ad75a53d60
commit
a87a247f05
|
@ -99,7 +99,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
|||
regionLoader.SetIniConfigSource(m_openSim.ConfigSource.Source);
|
||||
RegionInfo[] regionsToLoad = regionLoader.LoadRegions();
|
||||
|
||||
/*m_log.Info("[LOADREGIONSPLUGIN]: Loading specific shared modules...");
|
||||
m_log.Info("[LOADREGIONSPLUGIN]: Loading specific shared modules...");
|
||||
m_log.Info("[LOADREGIONSPLUGIN]: DynamicTextureModule...");
|
||||
m_openSim.ModuleLoader.LoadDefaultSharedModule(new DynamicTextureModule());
|
||||
m_log.Info("[LOADREGIONSPLUGIN]: InstantMessageModule...");
|
||||
|
@ -111,7 +111,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
|||
m_log.Info("[LOADREGIONSPLUGIN]: AssetTransactionModule...");
|
||||
m_openSim.ModuleLoader.LoadDefaultSharedModule(new AssetTransactionModule());
|
||||
m_log.Info("[LOADREGIONSPLUGIN]: Done.");
|
||||
*/
|
||||
|
||||
if (!CheckRegionsForSanity(regionsToLoad))
|
||||
{
|
||||
m_log.Error("[LOADREGIONS]: Halting startup due to conflicts in region configurations");
|
||||
|
|
|
@ -31,7 +31,6 @@ using System.Reflection;
|
|||
using System.Text;
|
||||
using System.Timers;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using MXP;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
|
@ -45,8 +44,7 @@ namespace OpenSim.Client.MXP
|
|||
/**
|
||||
* MXP Client Module which adds MXP support to client / region communication.
|
||||
*/
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class MXPModule : ISharedRegionModule
|
||||
public class MXPModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -59,23 +57,15 @@ namespace OpenSim.Client.MXP
|
|||
private readonly Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
|
||||
private bool m_shutdown;
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
m_config = source;
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
if (!m_scenes.ContainsKey(scene.RegionInfo.RegionID))
|
||||
m_scenes.Add(scene.RegionInfo.RegionID, scene);
|
||||
|
||||
m_config = source;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (m_config.Configs["MXP"] != null)
|
||||
{
|
||||
|
@ -86,7 +76,7 @@ namespace OpenSim.Client.MXP
|
|||
|
||||
m_port = con.GetInt("Port", m_port);
|
||||
|
||||
m_server = new MXPPacketServer(m_port, m_scenes, m_config.Configs["StandAlone"].GetBoolean("accounts_authenticate", true));
|
||||
m_server = new MXPPacketServer(m_port, m_scenes,m_config.Configs["StandAlone"].GetBoolean("accounts_authenticate",true));
|
||||
|
||||
m_ticker = new Timer(100);
|
||||
m_ticker.AutoReset = false;
|
||||
|
@ -99,14 +89,6 @@ namespace OpenSim.Client.MXP
|
|||
}
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
void ticker_Elapsed(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
try
|
||||
|
@ -139,5 +121,11 @@ namespace OpenSim.Client.MXP
|
|||
{
|
||||
get { return "MXP ClientStack Module"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -36,8 +35,7 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class AssetTransactionModule : ISharedRegionModule, IAgentAssetTransactions
|
||||
public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions
|
||||
{
|
||||
private readonly Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>();
|
||||
private bool m_dumpAssetsToFile = false;
|
||||
|
@ -61,14 +59,9 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
|||
//m_log.Debug("creating AgentAssetTransactionModule");
|
||||
}
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
|
||||
{
|
||||
|
@ -86,23 +79,6 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
|||
m_scene = scene;
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
|
||||
RegisteredScenes.Remove(scene.RegionInfo.RegionID);
|
||||
scene.UnregisterModuleInterface<IAgentAssetTransactions>(this);
|
||||
scene.EventManager.OnNewClient -= NewClient;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
@ -116,6 +92,11 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
|||
get { return "AgentTransactionModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void NewClient(IClientAPI client)
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
|
|||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<ICapabilitiesModule>(this);
|
||||
m_scene.UnregisterModuleInterface<ICapabilitiesModule>(this);
|
||||
}
|
||||
|
||||
public void PostInitialise() {}
|
||||
|
|
|
@ -29,7 +29,6 @@ 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;
|
||||
|
@ -37,27 +36,21 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Agent.IPBan
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class IPBanModule : ISharedRegionModule
|
||||
public class IPBanModule : IRegionModule
|
||||
{
|
||||
#region Implementation of ISharedRegionModule
|
||||
#region Implementation of IRegionModule
|
||||
|
||||
private List<string> m_bans = new List<string>();
|
||||
private Dictionary<Scene, SceneBanner> SceneBanners = new Dictionary<Scene, SceneBanner>();
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
SceneBanners.Add(scene, new SceneBanner(scene, m_bans));
|
||||
new SceneBanner(scene, m_bans);
|
||||
|
||||
lock (m_bans)
|
||||
{
|
||||
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);
|
||||
|
@ -65,12 +58,7 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
|
|||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (File.Exists("bans.txt"))
|
||||
{
|
||||
|
@ -82,18 +70,9 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
|
|||
}
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if(SceneBanners.ContainsKey(scene))
|
||||
SceneBanners.Remove(scene);
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string Name
|
||||
|
@ -101,6 +80,11 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
|
|||
get { return "IPBanModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -30,7 +30,6 @@ using System.Collections.Generic;
|
|||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -42,8 +41,7 @@ using OpenSim.Services.Interfaces;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Agent.TextureDownload
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class TextureDownloadModule : INonSharedRegionModule
|
||||
public class TextureDownloadModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log
|
||||
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
@ -67,14 +65,11 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload
|
|||
{
|
||||
}
|
||||
|
||||
#region INonSharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
|
||||
if (m_scene == null)
|
||||
{
|
||||
//m_log.Debug("Creating Texture download module");
|
||||
|
@ -95,21 +90,8 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload
|
|||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
public void PostInitialise()
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if(m_scenes.Contains(scene))
|
||||
m_scenes.Remove(scene);
|
||||
scene.EventManager.OnNewClient -= NewClient;
|
||||
scene.EventManager.OnRemovePresence -= EventManager_OnRemovePresence;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
@ -121,6 +103,11 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload
|
|||
get { return "TextureDownloadModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -32,7 +32,6 @@ using System.Reflection;
|
|||
using System.Text;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Imaging;
|
||||
|
@ -46,8 +45,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
|||
{
|
||||
public delegate void J2KDecodeDelegate(UUID assetID);
|
||||
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class J2KDecoderModule : ISharedRegionModule, IJ2KDecoder
|
||||
public class J2KDecoderModule : IRegionModule, IJ2KDecoder
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -60,19 +58,16 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
|||
/// <summary>Reference to a scene (doesn't matter which one as long as it can load the cache module)</summary>
|
||||
private Scene m_scene;
|
||||
|
||||
#region ISharedRegionModule
|
||||
#region IRegionModule
|
||||
|
||||
public string Name { get { return "J2KDecoderModule"; } }
|
||||
|
||||
public bool IsSharedModule { get { return true; } }
|
||||
|
||||
public J2KDecoderModule()
|
||||
{
|
||||
}
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
if (m_scene == null)
|
||||
m_scene = scene;
|
||||
|
@ -80,30 +75,16 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
|||
scene.RegisterModuleInterface<IJ2KDecoder>(this);
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
m_cache = m_scene.RequestModuleInterface<IImprovedAssetCache>();
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<IJ2KDecoder>(this);
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
m_cache = m_scene.RequestModuleInterface<IImprovedAssetCache>();
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion IRegionModule
|
||||
|
||||
#region IJ2KDecoder
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -36,8 +35,7 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class XferModule : INonSharedRegionModule, IXfer
|
||||
public class XferModule : IRegionModule, IXfer
|
||||
{
|
||||
private Scene m_scene;
|
||||
private Dictionary<string, XferRequest> Requests = new Dictionary<string, XferRequest>();
|
||||
|
@ -54,13 +52,9 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
|||
public DateTime timeStamp;
|
||||
}
|
||||
|
||||
#region INonSharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_scene.EventManager.OnNewClient += NewClient;
|
||||
|
@ -68,19 +62,8 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
|||
m_scene.RegisterModuleInterface<IXfer>(this);
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
public void PostInitialise()
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.EventManager.OnNewClient -= NewClient;
|
||||
scene.UnregisterModuleInterface<IXfer>(this);
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
@ -92,6 +75,11 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
|||
get { return "XferModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IXfer Members
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -39,8 +38,7 @@ using OpenSim.Services.Interfaces;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class AvatarFactoryModule : IAvatarFactory, ISharedRegionModule
|
||||
public class AvatarFactoryModule : IAvatarFactory, IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private Scene m_scene = null;
|
||||
|
@ -77,16 +75,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
|||
return appearance;
|
||||
}
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
scene.RegisterModuleInterface<IAvatarFactory>(this);
|
||||
scene.EventManager.OnNewClient += NewClient;
|
||||
|
@ -95,18 +84,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
|||
{
|
||||
m_scene = scene;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<IAvatarFactory>(this);
|
||||
scene.EventManager.OnNewClient -= NewClient;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
@ -120,6 +100,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
|||
get { return "Default Avatar Factory"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public void NewClient(IClientAPI client)
|
||||
{
|
||||
client.OnAvatarNowWearing += AvatarIsWearing;
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
@ -35,8 +34,7 @@ using OpenMetaverse;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class CombatModule : ISharedRegionModule
|
||||
public class CombatModule : IRegionModule
|
||||
{
|
||||
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -55,17 +53,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
|
|||
/// </summary>
|
||||
/// <param name="scene"></param>
|
||||
/// <param name="config"></param>
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
lock (m_scenel)
|
||||
{
|
||||
|
@ -83,17 +71,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
|
|||
scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.EventManager.OnAvatarKilled -= KillAvatar;
|
||||
scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel;
|
||||
m_scenel.Remove(scene.RegionInfo.RegionHandle);
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
@ -107,6 +84,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
|
|||
get { return "CombatModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
private void KillAvatar(uint killerObjectLocalID, ScenePresence DeadAvatar)
|
||||
{
|
||||
if (killerObjectLocalID == 0)
|
||||
|
|
|
@ -25,11 +25,9 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -39,46 +37,28 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class DialogModule : ISharedRegionModule, IDialogModule
|
||||
public class DialogModule : IRegionModule, IDialogModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected Scene m_scene;
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_scene.RegisterModuleInterface<IDialogModule>(this);
|
||||
|
||||
|
||||
m_scene.AddCommand(
|
||||
this, "alert", "alert <first> <last> <message>", "Send an alert to a user", HandleAlertConsoleCommand);
|
||||
|
||||
m_scene.AddCommand(
|
||||
this, "alert general", "alert general <message>", "Send an alert to everyone", HandleAlertConsoleCommand);
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<IDialogModule>(this);
|
||||
}
|
||||
|
||||
public void PostInitialise() { }
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,6 @@ using System.Collections.Generic;
|
|||
using System.Net;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using Nwc.XmlRpc;
|
||||
using OpenMetaverse;
|
||||
|
@ -82,8 +81,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
- Terminate Friendship messages (single)
|
||||
*/
|
||||
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class FriendsModule : ISharedRegionModule, IFriendsModule
|
||||
public class FriendsModule : IRegionModule, IFriendsModule
|
||||
{
|
||||
private class Transaction
|
||||
{
|
||||
|
@ -113,23 +111,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
|
||||
private IGridService m_gridServices = null;
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
lock (m_scenes)
|
||||
{
|
||||
|
@ -144,9 +128,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
if (!m_scenes.ContainsKey(scene.RegionInfo.RegionHandle))
|
||||
m_scenes[scene.RegionInfo.RegionHandle] = scene;
|
||||
}
|
||||
|
||||
|
||||
scene.RegisterModuleInterface<IFriendsModule>(this);
|
||||
|
||||
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
|
||||
scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
|
||||
|
@ -154,34 +138,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
scene.EventManager.OnClientClosed += ClientClosed;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (m_scenes.Count > 0)
|
||||
{
|
||||
m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
|
||||
m_gridServices = scene.GridService;
|
||||
m_TransferModule = m_initialScene.RequestModuleInterface<IMessageTransferModule>();
|
||||
m_gridServices = m_initialScene.GridService;
|
||||
}
|
||||
if (m_TransferModule == null)
|
||||
m_log.Error("[FRIENDS]: Unable to find a message transfer module, friendship offers will not work");
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
MainServer.Instance.RemoveXmlRPCHandler("presence_update_bulk");
|
||||
MainServer.Instance.RemoveXmlRPCHandler("terminate_friend");
|
||||
|
||||
if (m_scenes.ContainsKey(scene.RegionInfo.RegionHandle))
|
||||
m_scenes.Remove(scene.RegionInfo.RegionHandle);
|
||||
|
||||
scene.UnregisterModuleInterface<IFriendsModule>(this);
|
||||
|
||||
scene.EventManager.OnNewClient -= OnNewClient;
|
||||
scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
|
||||
scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel;
|
||||
scene.EventManager.OnMakeChildAgent -= MakeChildAgent;
|
||||
scene.EventManager.OnClientClosed -= ClientClosed;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
@ -191,6 +158,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
get { return "FriendsModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IInterregionFriendsComms
|
||||
|
|
|
@ -25,10 +25,8 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -39,41 +37,23 @@ using OpenSim.Services.Interfaces;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.Gestures
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class GesturesModule : INonSharedRegionModule
|
||||
public class GesturesModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected Scene m_scene;
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
m_scene = scene;
|
||||
|
||||
m_scene.EventManager.OnNewClient += OnNewClient;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if(m_scene == scene)
|
||||
m_scene = null;
|
||||
scene.EventManager.OnNewClient -= OnNewClient;
|
||||
}
|
||||
|
||||
public void PostInitialise() {}
|
||||
public void Close() {}
|
||||
public string Name { get { return "Gestures Module"; } }
|
||||
public bool IsSharedModule { get { return false; } }
|
||||
|
||||
private void OnNewClient(IClientAPI client)
|
||||
{
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -36,8 +34,7 @@ using OpenSim.Region.Framework.Interfaces;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.Gods
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class GodsModule : INonSharedRegionModule, IGodsModule
|
||||
public class GodsModule : IRegionModule, IGodsModule
|
||||
{
|
||||
/// <summary>Special UUID for actions that apply to all agents</summary>
|
||||
private static readonly UUID ALL_AGENTS = new UUID("44e87126-e794-4ded-05b3-7c42da3d5cdb");
|
||||
|
@ -45,34 +42,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
|
|||
protected Scene m_scene;
|
||||
protected IDialogModule m_dialogModule;
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>();
|
||||
m_scene.RegisterModuleInterface<IGodsModule>(this);
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<IGodsModule>(this);
|
||||
}
|
||||
|
||||
public void PostInitialise() {}
|
||||
public void Close() {}
|
||||
public string Name { get { return "Gods Module"; } }
|
||||
public bool IsSharedModule { get { return false; } }
|
||||
|
||||
public void RequestGodlikePowers(
|
||||
UUID agentID, UUID sessionID, UUID token, bool godLike, IClientAPI controllingClient)
|
||||
|
|
|
@ -25,11 +25,9 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -38,8 +36,7 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.Groups
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class GroupsModule : ISharedRegionModule
|
||||
public class GroupsModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
@ -58,9 +55,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
|
|||
private static GroupMembershipData osGroup =
|
||||
new GroupMembershipData();
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
IConfig groupsConfig = config.Configs["Groups"];
|
||||
|
||||
|
@ -79,15 +76,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
|
|||
if (groupsConfig.GetString("Module", "Default") != "Default")
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
lock (m_SceneList)
|
||||
{
|
||||
if (!m_SceneList.Contains(scene))
|
||||
|
@ -110,19 +99,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
|
|||
scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (m_SceneList.Contains(scene))
|
||||
m_SceneList.Remove(scene);
|
||||
scene.EventManager.OnNewClient -= OnNewClient;
|
||||
scene.EventManager.OnClientClosed -= OnClientClosed;
|
||||
scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
@ -147,6 +123,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
|
|||
get { return "GroupsModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void OnNewClient(IClientAPI client)
|
||||
|
|
|
@ -24,12 +24,9 @@
|
|||
* (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;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -39,8 +36,7 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class InstantMessageModule : ISharedRegionModule
|
||||
public class InstantMessageModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -51,11 +47,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
|
||||
private readonly List<Scene> m_scenes = new List<Scene>();
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
private IMessageTransferModule m_TransferModule = null;
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
if (config.Configs["Messaging"] != null)
|
||||
{
|
||||
|
@ -66,15 +62,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
}
|
||||
|
||||
m_enabled = true;
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
lock (m_scenes)
|
||||
{
|
||||
if (!m_scenes.Contains(scene))
|
||||
|
@ -86,27 +74,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
}
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
if (!m_enabled)
|
||||
return;
|
||||
|
||||
m_TransferModule =
|
||||
m_scenes[0].RequestModuleInterface<IMessageTransferModule>();
|
||||
|
||||
if (m_TransferModule == null)
|
||||
m_log.Error("[INSTANT MESSAGE]: No message transfer module, " +
|
||||
"IM will not work!");
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (m_scenes.Contains(scene))
|
||||
m_scenes.Remove(scene);
|
||||
scene.EventManager.OnClientConnect -= OnClientConnect;
|
||||
scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
|
||||
}
|
||||
|
||||
void OnClientConnect(IClientCore client)
|
||||
{
|
||||
IClientIM clientIM;
|
||||
|
@ -118,6 +85,15 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (!m_enabled)
|
||||
return;
|
||||
|
||||
m_TransferModule =
|
||||
m_scenes[0].RequestModuleInterface<IMessageTransferModule>();
|
||||
|
||||
if (m_TransferModule == null)
|
||||
m_log.Error("[INSTANT MESSAGE]: No message transfer module, "+
|
||||
"IM will not work!");
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
@ -129,6 +105,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
get { return "InstantMessageModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void OnInstantMessage(IClientAPI client, GridInstantMessage im)
|
||||
|
|
|
@ -30,7 +30,6 @@ using System.Collections.Generic;
|
|||
using System.Net;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using Nwc.XmlRpc;
|
||||
using OpenMetaverse;
|
||||
|
@ -41,8 +40,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class MessageTransferModule : ISharedRegionModule, IMessageTransferModule
|
||||
public class MessageTransferModule : IRegionModule, IMessageTransferModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -52,9 +50,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
protected Dictionary<UUID, ulong> m_UserRegionMap = new Dictionary<UUID, ulong>();
|
||||
|
||||
public event UndeliveredMessage OnUndeliveredMessage;
|
||||
private bool m_enabled = true;
|
||||
|
||||
public virtual void Initialise(IConfigSource config)
|
||||
public virtual void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
IConfig cnf = config.Configs["Messaging"];
|
||||
if (cnf != null && cnf.GetString(
|
||||
|
@ -62,51 +59,29 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
"MessageTransferModule")
|
||||
{
|
||||
m_log.Debug("[MESSAGE TRANSFER]: Disabled by configuration");
|
||||
m_enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
cnf = config.Configs["Startup"];
|
||||
if (cnf != null)
|
||||
m_Gridmode = cnf.GetBoolean("gridmode", false);
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
// m_Enabled = true;
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (m_enabled)
|
||||
lock (m_Scenes)
|
||||
{
|
||||
lock (m_Scenes)
|
||||
if (m_Scenes.Count == 0)
|
||||
{
|
||||
if (m_Scenes.Count == 0)
|
||||
{
|
||||
MainServer.Instance.AddXmlRPCHandler(
|
||||
"grid_instant_message", processXMLRPCGridInstantMessage);
|
||||
}
|
||||
|
||||
m_log.Debug("[MESSAGE TRANSFER]: Message transfer module active");
|
||||
scene.RegisterModuleInterface<IMessageTransferModule>(this);
|
||||
m_Scenes.Add(scene);
|
||||
MainServer.Instance.AddXmlRPCHandler(
|
||||
"grid_instant_message", processXMLRPCGridInstantMessage);
|
||||
}
|
||||
|
||||
m_log.Debug("[MESSAGE TRANSFER]: Message transfer module active");
|
||||
scene.RegisterModuleInterface<IMessageTransferModule>(this);
|
||||
m_Scenes.Add(scene);
|
||||
}
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (m_Scenes.Contains(scene))
|
||||
m_Scenes.Remove(scene);
|
||||
MainServer.Instance.RemoveXmlRPCHandler(
|
||||
"grid_instant_message");
|
||||
scene.UnregisterModuleInterface<IMessageTransferModule>(this);
|
||||
}
|
||||
|
||||
public virtual void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
@ -120,6 +95,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
get { return "MessageTransferModule"; }
|
||||
}
|
||||
|
||||
public virtual bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public virtual void SendInstantMessage(GridInstantMessage im, MessageResultNotification result)
|
||||
{
|
||||
UUID toAgentID = new UUID(im.toAgentID);
|
||||
|
|
|
@ -28,7 +28,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -40,8 +39,7 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.MuteList
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class MuteListModule : ISharedRegionModule
|
||||
public class MuteListModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -49,7 +47,7 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList
|
|||
private List<Scene> m_SceneList = new List<Scene>();
|
||||
private string m_RestURL = String.Empty;
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
if (!enabled)
|
||||
return;
|
||||
|
@ -68,24 +66,19 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList
|
|||
enabled = false;
|
||||
return;
|
||||
}
|
||||
m_RestURL = cnf.GetString("MuteListURL", "");
|
||||
if (m_RestURL == "")
|
||||
{
|
||||
m_log.Error("[MUTE LIST] Module was enabled, but no URL is given, disabling");
|
||||
enabled = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
lock (m_SceneList)
|
||||
{
|
||||
if (m_SceneList.Count == 0)
|
||||
{
|
||||
m_RestURL = cnf.GetString("MuteListURL", "");
|
||||
if (m_RestURL == "")
|
||||
{
|
||||
m_log.Error("[MUTE LIST] Module was enabled, but no URL is given, disabling");
|
||||
enabled = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!m_SceneList.Contains(scene))
|
||||
m_SceneList.Add(scene);
|
||||
|
||||
|
@ -93,18 +86,6 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList
|
|||
}
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (m_SceneList.Contains(scene))
|
||||
m_SceneList.Remove(scene);
|
||||
|
||||
scene.EventManager.OnNewClient -= OnNewClient;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (!enabled)
|
||||
|
@ -121,6 +102,11 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList
|
|||
get { return "MuteListModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -41,8 +40,7 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class OfflineMessageModule : ISharedRegionModule
|
||||
public class OfflineMessageModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -51,7 +49,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
private string m_RestURL = String.Empty;
|
||||
private bool m_ForwardOfflineGroupMessages = true;
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
if (!enabled)
|
||||
return;
|
||||
|
@ -85,23 +83,14 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (!m_SceneList.Contains(scene))
|
||||
m_SceneList.Add(scene);
|
||||
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (!m_SceneList.Contains(scene))
|
||||
m_SceneList.Add(scene);
|
||||
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (!enabled)
|
||||
return;
|
||||
|
@ -131,22 +120,16 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
m_log.Debug("[OFFLINE MESSAGING] Offline messages enabled");
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (m_SceneList.Contains(scene))
|
||||
m_SceneList.Remove(scene);
|
||||
scene.EventManager.OnNewClient -= OnNewClient;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "OfflineMessageModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -24,14 +24,11 @@
|
|||
* (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 log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using Nwc.XmlRpc;
|
||||
using OpenMetaverse;
|
||||
|
@ -42,8 +39,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class PresenceModule : ISharedRegionModule, IPresenceModule
|
||||
public class PresenceModule : IRegionModule, IPresenceModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -63,7 +59,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
public event PresenceChange OnPresenceChange;
|
||||
public event BulkPresenceData OnBulkPresenceData;
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
lock (m_Scenes)
|
||||
{
|
||||
|
@ -82,38 +78,28 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
m_Gridmode = cnf.GetBoolean("gridmode", false);
|
||||
|
||||
m_Enabled = true;
|
||||
|
||||
m_initialScene = scene;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (m_Enabled)
|
||||
{
|
||||
m_initialScene = scene;
|
||||
if (m_Gridmode)
|
||||
NotifyMessageServerOfStartup(scene);
|
||||
|
||||
m_Scenes.Add(scene);
|
||||
|
||||
scene.RegisterModuleInterface<IPresenceModule>(this);
|
||||
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
scene.EventManager.OnSetRootAgentScene += OnSetRootAgentScene;
|
||||
scene.EventManager.OnMakeChildAgent += OnMakeChildAgent;
|
||||
}
|
||||
|
||||
scene.RegisterModuleInterface<IPresenceModule>(this);
|
||||
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
scene.EventManager.OnSetRootAgentScene += OnSetRootAgentScene;
|
||||
scene.EventManager.OnMakeChildAgent += OnMakeChildAgent;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
public void Close()
|
||||
{
|
||||
if (!m_Gridmode || !m_Enabled)
|
||||
return;
|
||||
|
@ -130,23 +116,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
}
|
||||
}
|
||||
|
||||
NotifyMessageServerOfShutdown(scene);
|
||||
if(m_Scenes.Contains(scene))
|
||||
m_Scenes.Remove(scene);
|
||||
|
||||
scene.UnregisterModuleInterface<IPresenceModule>(this);
|
||||
|
||||
scene.EventManager.OnNewClient -= OnNewClient;
|
||||
scene.EventManager.OnSetRootAgentScene -= OnSetRootAgentScene;
|
||||
scene.EventManager.OnMakeChildAgent -= OnMakeChildAgent;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
lock (m_Scenes)
|
||||
{
|
||||
foreach (Scene scene in m_Scenes)
|
||||
NotifyMessageServerOfShutdown(scene);
|
||||
}
|
||||
}
|
||||
|
||||
public string Name
|
||||
|
@ -154,6 +128,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
get { return "PresenceModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public void RequestBulkPresenceData(UUID[] users)
|
||||
{
|
||||
if (OnBulkPresenceData != null)
|
||||
|
|
|
@ -30,7 +30,6 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -42,11 +41,10 @@ using OpenSim.Services.Interfaces;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
/// <summary>
|
||||
/// This module loads and saves OpenSimulator inventory archives
|
||||
/// </summary>
|
||||
public class InventoryArchiverModule : ISharedRegionModule, IInventoryArchiverModule
|
||||
public class InventoryArchiverModule : IRegionModule, IInventoryArchiverModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -84,28 +82,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
|||
DisablePresenceChecks = disablePresenceChecks;
|
||||
}
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
if (m_scenes.Count == 0)
|
||||
{
|
||||
scene.RegisterModuleInterface<IInventoryArchiverModule>(this);
|
||||
OnInventoryArchiveSaved += SaveInvConsoleCommandCompleted;
|
||||
|
||||
|
||||
scene.AddCommand(
|
||||
this, "load iar",
|
||||
"load iar <first> <last> <inventory path> <password> [<archive path>]",
|
||||
"Load user inventory archive.", HandleLoadInvConsoleCommand);
|
||||
|
||||
"Load user inventory archive.", HandleLoadInvConsoleCommand);
|
||||
|
||||
scene.AddCommand(
|
||||
this, "save iar",
|
||||
"save iar <first> <last> <inventory path> <password> [<archive path>]",
|
||||
|
@ -113,21 +101,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
|||
|
||||
m_aScene = scene;
|
||||
}
|
||||
|
||||
|
||||
m_scenes[scene.RegionInfo.RegionID] = scene;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<IInventoryArchiverModule>(this);
|
||||
if(m_scenes.ContainsKey(scene.RegionInfo.RegionID))
|
||||
m_scenes.Remove(scene.RegionInfo.RegionID);
|
||||
}
|
||||
|
||||
public void PostInitialise() {}
|
||||
|
||||
public void Close() {}
|
||||
|
|
|
@ -29,7 +29,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -40,8 +39,7 @@ using OpenSim.Services.Interfaces;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class InventoryTransferModule : IInventoryTransferModule, ISharedRegionModule
|
||||
public class InventoryTransferModule : IInventoryTransferModule, IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log
|
||||
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
@ -52,11 +50,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
|||
new Dictionary<UUID, Scene>();
|
||||
|
||||
private IMessageTransferModule m_TransferModule = null;
|
||||
private bool m_enabled = true;
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
if (config.Configs["Messaging"] != null)
|
||||
{
|
||||
|
@ -65,59 +62,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
|||
if (config.Configs["Messaging"].GetString(
|
||||
"InventoryTransferModule", "InventoryTransferModule") !=
|
||||
"InventoryTransferModule")
|
||||
m_enabled = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (m_enabled)
|
||||
if (!m_Scenelist.Contains(scene))
|
||||
{
|
||||
if (!m_Scenelist.Contains(scene))
|
||||
{
|
||||
m_Scenelist.Add(scene);
|
||||
m_Scenelist.Add(scene);
|
||||
|
||||
scene.RegisterModuleInterface<IInventoryTransferModule>(this);
|
||||
scene.RegisterModuleInterface<IInventoryTransferModule>(this);
|
||||
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
scene.EventManager.OnClientClosed += ClientLoggedOut;
|
||||
scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
|
||||
}
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
scene.EventManager.OnClientClosed += ClientLoggedOut;
|
||||
scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
|
||||
}
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
if (m_enabled)
|
||||
{
|
||||
if (m_Scenelist.Count > 0)
|
||||
{
|
||||
m_TransferModule = m_Scenelist[0].RequestModuleInterface<IMessageTransferModule>();
|
||||
if (m_TransferModule == null)
|
||||
m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (m_Scenelist.Contains(scene))
|
||||
m_Scenelist.Remove(scene);
|
||||
|
||||
scene.UnregisterModuleInterface<IInventoryTransferModule>(this);
|
||||
|
||||
scene.EventManager.OnNewClient -= OnNewClient;
|
||||
scene.EventManager.OnClientClosed -= ClientLoggedOut;
|
||||
scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (m_Scenelist.Count > 0)
|
||||
{
|
||||
m_TransferModule = m_Scenelist[0].RequestModuleInterface<IMessageTransferModule>();
|
||||
if (m_TransferModule == null)
|
||||
m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only");
|
||||
}
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
|
|
@ -29,7 +29,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -38,72 +37,36 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.Lure
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class LureModule : ISharedRegionModule
|
||||
public class LureModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private readonly List<Scene> m_scenes = new List<Scene>();
|
||||
|
||||
private bool m_enabled = true;
|
||||
|
||||
private IMessageTransferModule m_TransferModule = null;
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
if (config.Configs["Messaging"] != null)
|
||||
{
|
||||
if (config.Configs["Messaging"].GetString(
|
||||
"LureModule", "LureModule") !=
|
||||
"LureModule")
|
||||
m_enabled = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (m_enabled)
|
||||
lock (m_scenes)
|
||||
{
|
||||
lock (m_scenes)
|
||||
if (!m_scenes.Contains(scene))
|
||||
{
|
||||
if (!m_scenes.Contains(scene))
|
||||
{
|
||||
m_scenes.Add(scene);
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
scene.EventManager.OnIncomingInstantMessage +=
|
||||
OnGridInstantMessage;
|
||||
}
|
||||
m_scenes.Add(scene);
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
scene.EventManager.OnIncomingInstantMessage +=
|
||||
OnGridInstantMessage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
if (m_enabled)
|
||||
{
|
||||
m_TransferModule =
|
||||
m_scenes[0].RequestModuleInterface<IMessageTransferModule>();
|
||||
|
||||
if (m_TransferModule == null)
|
||||
m_log.Error("[INSTANT MESSAGE]: No message transfer module, " +
|
||||
"lures will not work!");
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (m_scenes.Contains(scene))
|
||||
m_scenes.Remove(scene);
|
||||
scene.EventManager.OnNewClient -= OnNewClient;
|
||||
scene.EventManager.OnIncomingInstantMessage -=
|
||||
OnGridInstantMessage;
|
||||
}
|
||||
|
||||
void OnNewClient(IClientAPI client)
|
||||
{
|
||||
client.OnInstantMessage += OnInstantMessage;
|
||||
|
@ -113,6 +76,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
|
|||
|
||||
public void PostInitialise()
|
||||
{
|
||||
m_TransferModule =
|
||||
m_scenes[0].RequestModuleInterface<IMessageTransferModule>();
|
||||
|
||||
if (m_TransferModule == null)
|
||||
m_log.Error("[INSTANT MESSAGE]: No message transfer module, "+
|
||||
"lures will not work!");
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
|
|
@ -29,7 +29,6 @@ using System;
|
|||
using System.Collections;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
|
@ -42,54 +41,24 @@ using Caps=OpenSim.Framework.Capabilities.Caps;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class ObjectAdd : ISharedRegionModule
|
||||
public class ObjectAdd : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private Scene m_scene;
|
||||
#region ISharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource pSource)
|
||||
public void Initialise(Scene pScene, IConfigSource pSource)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_scene = pScene;
|
||||
m_scene.EventManager.OnRegisterCaps += RegisterCaps;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.EventManager.OnRegisterCaps -= RegisterCaps;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "ObjectAddModule"; }
|
||||
}
|
||||
|
||||
public void RegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
UUID capuuid = UUID.Random();
|
||||
|
@ -379,6 +348,22 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
|||
Array.Reverse(resultbytes);
|
||||
return String.Format("<binary encoding=\"base64\">{0}</binary>",Convert.ToBase64String(resultbytes));
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "ObjectAddModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ using System.Collections;
|
|||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -39,17 +38,20 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.Profiles
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class AvatarProfilesModule : INonSharedRegionModule
|
||||
public class AvatarProfilesModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private Scene m_scene;
|
||||
private IProfileModule m_profileModule = null;
|
||||
private bool m_enabled = true;
|
||||
|
||||
#region INonSharedRegionModule Members
|
||||
public AvatarProfilesModule()
|
||||
{
|
||||
}
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
IConfig profileConfig = config.Configs["Profile"];
|
||||
if (profileConfig != null)
|
||||
|
@ -60,31 +62,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
|
|||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_scene.EventManager.OnNewClient += NewClient;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (!m_enabled)
|
||||
return;
|
||||
m_profileModule = m_scene.RequestModuleInterface<IProfileModule>();
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.EventManager.OnNewClient -= NewClient;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
@ -94,6 +83,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
|
|||
get { return "AvatarProfilesModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void NewClient(IClientAPI client)
|
||||
|
|
|
@ -32,7 +32,6 @@ using System.Net;
|
|||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Packets;
|
||||
|
@ -53,13 +52,11 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
|||
public OSDMap body;
|
||||
}
|
||||
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class EventQueueGetModule : IEventQueue, INonSharedRegionModule
|
||||
public class EventQueueGetModule : IEventQueue, IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
protected Scene m_scene = null;
|
||||
private IConfigSource m_gConfig;
|
||||
private IConfig m_startupConfig;
|
||||
bool enabledYN = false;
|
||||
|
||||
private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
|
||||
|
@ -68,31 +65,23 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
|||
private Dictionary<UUID, UUID> m_QueueUUIDAvatarMapping = new Dictionary<UUID, UUID>();
|
||||
private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>();
|
||||
|
||||
#region INonSharedRegionModule methods
|
||||
public virtual void Initialise(IConfigSource config)
|
||||
#region IRegionModule methods
|
||||
public virtual void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
m_gConfig = config;
|
||||
|
||||
m_startupConfig = m_gConfig.Configs["Startup"];
|
||||
}
|
||||
IConfig startupConfig = m_gConfig.Configs["Startup"];
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
ReadConfigAndPopulate(scene, m_startupConfig, "Startup");
|
||||
ReadConfigAndPopulate(scene, startupConfig, "Startup");
|
||||
|
||||
if (enabledYN)
|
||||
{
|
||||
m_scene = scene;
|
||||
scene.RegisterModuleInterface<IEventQueue>(this);
|
||||
|
||||
|
||||
// Register fallback handler
|
||||
// Why does EQG Fail on region crossings!
|
||||
|
||||
|
||||
//scene.CommsManager.HttpServer.AddLLSDHandler("/CAPS/EQG/", EventQueueFallBack);
|
||||
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
|
@ -110,14 +99,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
|||
{
|
||||
m_gConfig = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p)
|
||||
|
@ -125,6 +107,10 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
|||
enabledYN = startupConfig.GetBoolean("EventQueue", true);
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Close()
|
||||
{
|
||||
}
|
||||
|
@ -134,6 +120,10 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
|||
get { return "EventQueueGetModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -25,12 +25,10 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -41,8 +39,7 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Framework.Monitoring
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class MonitorModule : INonSharedRegionModule
|
||||
public class MonitorModule : IRegionModule
|
||||
{
|
||||
private Scene m_scene;
|
||||
private readonly List<IMonitor> m_monitors = new List<IMonitor>();
|
||||
|
@ -65,19 +62,9 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
|
|||
}
|
||||
}
|
||||
|
||||
#region Implementation of INonSharedRegionModule
|
||||
#region Implementation of IRegionModule
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
m_scene = scene;
|
||||
|
||||
|
@ -90,51 +77,6 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
|
|||
MainServer.Instance.AddHTTPHandler("/monitorstats/" + m_scene.RegionInfo.RegionID + "/", StatsPage);
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
m_monitors.Add(new AgentCountMonitor(m_scene));
|
||||
m_monitors.Add(new ChildAgentCountMonitor(m_scene));
|
||||
m_monitors.Add(new GCMemoryMonitor());
|
||||
m_monitors.Add(new ObjectCountMonitor(m_scene));
|
||||
m_monitors.Add(new PhysicsFrameMonitor(m_scene));
|
||||
m_monitors.Add(new PhysicsUpdateFrameMonitor(m_scene));
|
||||
m_monitors.Add(new PWSMemoryMonitor());
|
||||
m_monitors.Add(new ThreadCountMonitor());
|
||||
m_monitors.Add(new TotalFrameMonitor(m_scene));
|
||||
m_monitors.Add(new EventFrameMonitor(m_scene));
|
||||
m_monitors.Add(new LandFrameMonitor(m_scene));
|
||||
m_monitors.Add(new LastFrameTimeMonitor(m_scene));
|
||||
|
||||
m_alerts.Add(new DeadlockAlert(m_monitors.Find(x => x is LastFrameTimeMonitor) as LastFrameTimeMonitor));
|
||||
|
||||
foreach (IAlert alert in m_alerts)
|
||||
{
|
||||
alert.OnTriggerAlert += OnTriggerAlert;
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
MainServer.Instance.RemoveHTTPHandler("", "/monitorstats/" + m_scene.RegionInfo.RegionID + "/");
|
||||
m_monitors.Clear();
|
||||
|
||||
foreach (IAlert alert in m_alerts)
|
||||
{
|
||||
alert.OnTriggerAlert -= OnTriggerAlert;
|
||||
}
|
||||
m_alerts.Clear();
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "Region Health Monitoring Module"; }
|
||||
}
|
||||
|
||||
public Hashtable StatsPage(Hashtable request)
|
||||
{
|
||||
// If request was for a specific monitor
|
||||
|
@ -190,10 +132,49 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
|
|||
return ereply;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
m_monitors.Add(new AgentCountMonitor(m_scene));
|
||||
m_monitors.Add(new ChildAgentCountMonitor(m_scene));
|
||||
m_monitors.Add(new GCMemoryMonitor());
|
||||
m_monitors.Add(new ObjectCountMonitor(m_scene));
|
||||
m_monitors.Add(new PhysicsFrameMonitor(m_scene));
|
||||
m_monitors.Add(new PhysicsUpdateFrameMonitor(m_scene));
|
||||
m_monitors.Add(new PWSMemoryMonitor());
|
||||
m_monitors.Add(new ThreadCountMonitor());
|
||||
m_monitors.Add(new TotalFrameMonitor(m_scene));
|
||||
m_monitors.Add(new EventFrameMonitor(m_scene));
|
||||
m_monitors.Add(new LandFrameMonitor(m_scene));
|
||||
m_monitors.Add(new LastFrameTimeMonitor(m_scene));
|
||||
|
||||
m_alerts.Add(new DeadlockAlert(m_monitors.Find(x => x is LastFrameTimeMonitor) as LastFrameTimeMonitor));
|
||||
|
||||
foreach (IAlert alert in m_alerts)
|
||||
{
|
||||
alert.OnTriggerAlert += OnTriggerAlert;
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
|
@ -32,7 +32,6 @@ using System.Net;
|
|||
using System.Reflection;
|
||||
using System.Text.RegularExpressions;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using Nwc.XmlRpc;
|
||||
|
@ -47,8 +46,7 @@ using OpenSim.Region.Framework.Interfaces;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Hypergrid
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class HGStandaloneLoginModule : ISharedRegionModule, ILoginServiceToRegionsConnector
|
||||
public class HGStandaloneLoginModule : IRegionModule, ILoginServiceToRegionsConnector
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -58,58 +56,47 @@ namespace OpenSim.Region.CoreModules.Hypergrid
|
|||
protected bool m_enabled = false; // Module is only enabled if running in standalone mode
|
||||
|
||||
protected HGLoginAuthService m_loginService;
|
||||
private bool authenticate = true;
|
||||
private string welcomeMessage = "Welcome to OpenSim";
|
||||
private IConfig startupConfig;
|
||||
private IConfig standaloneConfig;
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
startupConfig = source.Configs["Startup"];
|
||||
standaloneConfig = source.Configs["StandAlone"];
|
||||
if (standaloneConfig != null)
|
||||
{
|
||||
authenticate = standaloneConfig.GetBoolean("accounts_authenticate", true);
|
||||
welcomeMessage = standaloneConfig.GetString("welcome_message");
|
||||
}
|
||||
m_enabled = !startupConfig.GetBoolean("gridmode", false);
|
||||
}
|
||||
#region IRegionModule Members
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
if (m_firstScene == null)
|
||||
{
|
||||
m_firstScene = scene;
|
||||
|
||||
IConfig startupConfig = source.Configs["Startup"];
|
||||
if (startupConfig != null)
|
||||
{
|
||||
m_enabled = !startupConfig.GetBoolean("gridmode", false);
|
||||
}
|
||||
|
||||
if (m_enabled)
|
||||
{
|
||||
m_log.Debug("[HGLogin]: HGlogin module enabled");
|
||||
bool authenticate = true;
|
||||
string welcomeMessage = "Welcome to OpenSim";
|
||||
IConfig standaloneConfig = source.Configs["StandAlone"];
|
||||
if (standaloneConfig != null)
|
||||
{
|
||||
authenticate = standaloneConfig.GetBoolean("accounts_authenticate", true);
|
||||
welcomeMessage = standaloneConfig.GetString("welcome_message");
|
||||
}
|
||||
|
||||
//TODO: fix casting.
|
||||
LibraryRootFolder rootFolder = m_firstScene.CommsManager.UserProfileCacheService.LibraryRoot as LibraryRootFolder;
|
||||
|
||||
|
||||
IHttpServer httpServer = MainServer.Instance;
|
||||
|
||||
//TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference
|
||||
m_loginService
|
||||
m_loginService
|
||||
= new HGLoginAuthService(
|
||||
(UserManagerBase)m_firstScene.CommsManager.UserAdminService,
|
||||
welcomeMessage,
|
||||
m_firstScene.CommsManager.InterServiceInventoryService,
|
||||
m_firstScene.CommsManager.NetworkServersInfo,
|
||||
authenticate,
|
||||
rootFolder,
|
||||
(UserManagerBase)m_firstScene.CommsManager.UserAdminService,
|
||||
welcomeMessage,
|
||||
m_firstScene.CommsManager.InterServiceInventoryService,
|
||||
m_firstScene.CommsManager.NetworkServersInfo,
|
||||
authenticate,
|
||||
rootFolder,
|
||||
this);
|
||||
|
||||
httpServer.AddXmlRPCHandler("hg_login", m_loginService.XmlRpcLoginMethod);
|
||||
|
@ -126,19 +113,6 @@ namespace OpenSim.Region.CoreModules.Hypergrid
|
|||
}
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (scene == m_firstScene)
|
||||
{
|
||||
IHttpServer httpServer = MainServer.Instance;
|
||||
httpServer.RemoveXmlRPCHandler("hg_login");
|
||||
httpServer.RemoveXmlRPCHandler("check_auth_session");
|
||||
httpServer.RemoveXmlRPCHandler("get_avatar_appearance");
|
||||
httpServer.RemoveXmlRPCHandler("update_avatar_appearance");
|
||||
}
|
||||
m_scenes.Remove(scene);
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
|
||||
|
@ -154,6 +128,11 @@ namespace OpenSim.Region.CoreModules.Hypergrid
|
|||
get { return "HGStandaloneLoginModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void AddScene(Scene scene)
|
||||
|
|
|
@ -32,7 +32,6 @@ using System.Net;
|
|||
using System.Reflection;
|
||||
using System.Text;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using Nwc.XmlRpc;
|
||||
using OpenMetaverse;
|
||||
|
@ -43,8 +42,7 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.InterGrid
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class OGSRadmin : ISharedRegionModule
|
||||
public class OGSRadmin : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private readonly List<Scene> m_scenes = new List<Scene>();
|
||||
|
@ -58,6 +56,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
|||
get { return "OGS Supporting RAdmin"; }
|
||||
}
|
||||
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
m_settings = source;
|
||||
|
@ -68,11 +67,6 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
|||
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
lock (m_scenes)
|
||||
|
@ -83,10 +77,14 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
|||
{
|
||||
lock (m_scenes)
|
||||
m_scenes.Remove(scene);
|
||||
MainServer.Instance.RemoveXmlRPCHandler("grid_message");
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (m_settings.Configs["Startup"].GetBoolean("gridmode", false))
|
||||
{
|
||||
|
@ -95,8 +93,21 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
|||
}
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
#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
|
||||
|
|
|
@ -35,7 +35,6 @@ using System.Security.Cryptography.X509Certificates;
|
|||
using System.Threading;
|
||||
using System.Web;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
|
@ -76,9 +75,8 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
|||
public bool visible_to_parent;
|
||||
public string teleported_into_region;
|
||||
}
|
||||
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class OpenGridProtocolModule : ISharedRegionModule
|
||||
|
||||
public class OpenGridProtocolModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private List<Scene> m_scene = new List<Scene>();
|
||||
|
@ -94,22 +92,21 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
|||
private bool httpSSL = false;
|
||||
private uint httpsslport = 0;
|
||||
private bool GridMode = false;
|
||||
private bool m_enabled = false;
|
||||
private IConfig cfg = null;
|
||||
private IConfig httpcfg = null;
|
||||
private IConfig startupcfg = null;
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
#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)
|
||||
} catch (NullReferenceException)
|
||||
{
|
||||
m_enabled = false;
|
||||
enabled = false;
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -131,15 +128,15 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
|||
|
||||
if (startupcfg != null)
|
||||
{
|
||||
GridMode = m_enabled = startupcfg.GetBoolean("gridmode", false);
|
||||
GridMode = enabled = startupcfg.GetBoolean("gridmode", false);
|
||||
}
|
||||
|
||||
if (cfg != null)
|
||||
{
|
||||
m_enabled = cfg.GetBoolean("ogp_enabled", false);
|
||||
enabled = cfg.GetBoolean("ogp_enabled", false);
|
||||
LastNameSuffix = cfg.GetString("ogp_lastname_suffix", "_EXTERNAL");
|
||||
FirstNamePrefix = cfg.GetString("ogp_firstname_prefix", "");
|
||||
if (m_enabled)
|
||||
if (enabled)
|
||||
{
|
||||
m_log.Warn("[OGP]: Open Grid Protocol is on, Listening for Clients on /agent/");
|
||||
lock (m_scene)
|
||||
|
@ -168,60 +165,34 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (m_enabled)
|
||||
{
|
||||
lock (m_scene)
|
||||
{
|
||||
if (m_scene.Count == 1)
|
||||
{
|
||||
if (httpcfg != null)
|
||||
// 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)
|
||||
{
|
||||
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));
|
||||
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));
|
||||
}
|
||||
}
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
MainServer.Instance.RemoveLLSDHandler(
|
||||
"/" + HttpUtility.UrlPathEncode(scene.RegionInfo.RegionName.ToLower()),
|
||||
ProcessRegionDomainSeed);
|
||||
|
||||
if (m_scene.Contains(scene))
|
||||
m_scene.Remove(scene);
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
|
@ -238,6 +209,11 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
|||
get { return "OpenGridProtocolModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public OSD ProcessRegionDomainSeed(string path, OSD request, string endpoint)
|
||||
|
|
|
@ -29,7 +29,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Imaging;
|
||||
|
@ -41,8 +40,7 @@ using System.Reflection;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class DynamicTextureModule : ISharedRegionModule, IDynamicTextureManager
|
||||
public class DynamicTextureModule : IRegionModule, IDynamicTextureManager
|
||||
{
|
||||
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -212,14 +210,9 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
|||
|
||||
#endregion
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
|
||||
{
|
||||
|
@ -228,24 +221,6 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
|||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
|
||||
{
|
||||
RegisteredScenes.Remove(scene.RegionInfo.RegionID);
|
||||
scene.UnregisterModuleInterface<IDynamicTextureManager>(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
@ -259,6 +234,11 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
|||
get { return "DynamicTextureModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nested type: DynamicTextureUpdater
|
||||
|
@ -378,18 +358,18 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
|||
// tmptex.DefaultTexture.Fullbright = true;
|
||||
|
||||
part.UpdateTexture(tmptex);
|
||||
}
|
||||
|
||||
if (oldID != UUID.Zero && ((Disp & DISP_EXPIRE) != 0))
|
||||
{
|
||||
if (oldAsset == null) oldAsset = scene.AssetService.Get(oldID.ToString());
|
||||
if (oldAsset != null)
|
||||
{
|
||||
if (oldAsset.Temporary == true)
|
||||
{
|
||||
scene.AssetService.Delete(oldID.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (oldID != UUID.Zero && ((Disp & DISP_EXPIRE) != 0))
|
||||
{
|
||||
if (oldAsset == null) oldAsset = scene.AssetService.Get(oldID.ToString());
|
||||
if (oldAsset != null)
|
||||
{
|
||||
if (oldAsset.Temporary == true)
|
||||
{
|
||||
scene.AssetService.Delete(oldID.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ using System.Text.RegularExpressions;
|
|||
using DotNetOpenMail;
|
||||
using DotNetOpenMail.SmtpAuth;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -41,7 +40,6 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class EmailModule : IEmailModule
|
||||
{
|
||||
//
|
||||
|
@ -96,7 +94,7 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
|||
}
|
||||
}
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
m_Config = config;
|
||||
IConfig SMTPConfig;
|
||||
|
@ -138,16 +136,7 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
|||
m_Enabled = false;
|
||||
return;
|
||||
}
|
||||
m_log.Info("[EMAIL] Activated DefaultEmailModule");
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
// It's a go!
|
||||
if (m_Enabled)
|
||||
{
|
||||
|
@ -166,20 +155,8 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
|||
m_Scenes.Add(scene.RegionInfo.RegionHandle, scene);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<IEmailModule>(this);
|
||||
|
||||
if (m_Scenes.ContainsKey(scene.RegionInfo.RegionHandle))
|
||||
{
|
||||
m_Scenes.Remove(scene.RegionInfo.RegionHandle);
|
||||
m_log.Info("[EMAIL] Activated DefaultEmailModule");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -196,6 +173,11 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
|||
get { return "DefaultEmailModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delay function using thread in seconds
|
||||
/// </summary>
|
||||
|
|
|
@ -31,7 +31,6 @@ using System.IO;
|
|||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -85,8 +84,7 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class HttpRequestModule : ISharedRegionModule, IHttpRequestModule
|
||||
public class HttpRequestModule : IRegionModule, IHttpRequestModule
|
||||
{
|
||||
private object HttpListLock = new object();
|
||||
private int httpTimeout = 30000;
|
||||
|
@ -231,35 +229,18 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
|||
|
||||
#endregion
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
||||
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
||||
|
||||
m_pendingRequests = new Dictionary<UUID, HttpRequestClass>();
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
m_scene = scene;
|
||||
|
||||
m_scene.RegisterModuleInterface<IHttpRequestModule>(this);
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
||||
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<IHttpRequestModule>(this);
|
||||
m_pendingRequests = new Dictionary<UUID, HttpRequestClass>();
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
|
@ -275,6 +256,11 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
|||
get { return m_name; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
|
|
@ -126,8 +126,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
|||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<IUrlModule>(this);
|
||||
scene.EventManager.OnScriptReset -= OnScriptReset;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
|
|
@ -29,7 +29,6 @@ using System;
|
|||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Imaging;
|
||||
|
@ -40,8 +39,7 @@ using System.Reflection;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class LoadImageURLModule : ISharedRegionModule, IDynamicTextureRender
|
||||
public class LoadImageURLModule : IRegionModule, IDynamicTextureRender
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -99,28 +97,20 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
|||
|
||||
#endregion
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
||||
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
if (m_scene == null)
|
||||
{
|
||||
m_scene = scene;
|
||||
}
|
||||
|
||||
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
||||
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
m_textureManager = m_scene.RequestModuleInterface<IDynamicTextureManager>();
|
||||
if (m_textureManager != null)
|
||||
|
@ -129,14 +119,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
|||
}
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
@ -146,6 +128,11 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
|||
get { return m_name; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void MakeHttpRequest(string url, UUID requestID)
|
||||
|
|
|
@ -31,7 +31,6 @@ using System.Drawing.Imaging;
|
|||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Imaging;
|
||||
|
@ -44,8 +43,7 @@ using System.Reflection;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class VectorRenderModule : ISharedRegionModule, IDynamicTextureRender
|
||||
public class VectorRenderModule : IRegionModule, IDynamicTextureRender
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -112,10 +110,15 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
|||
|
||||
#endregion
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
if (m_scene == null)
|
||||
{
|
||||
m_scene = scene;
|
||||
}
|
||||
|
||||
if (m_graph == null)
|
||||
{
|
||||
Bitmap bitmap = new Bitmap(1024, 1024, PixelFormat.Format32bppArgb);
|
||||
|
@ -130,20 +133,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
|||
m_log.DebugFormat("[VECTORRENDERMODULE]: using font \"{0}\" for text rendering.", m_fontName);
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (m_scene == null)
|
||||
{
|
||||
m_scene = scene;
|
||||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
m_textureManager = m_scene.RequestModuleInterface<IDynamicTextureManager>();
|
||||
if (m_textureManager != null)
|
||||
|
@ -152,14 +142,6 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
|||
}
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
@ -169,6 +151,11 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
|||
get { return m_name; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void Draw(string data, UUID id, string extraParams)
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -86,8 +85,7 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class WorldCommModule : ISharedRegionModule, IWorldComm
|
||||
public class WorldCommModule : IRegionModule, IWorldComm
|
||||
{
|
||||
// private static readonly ILog m_log =
|
||||
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
@ -100,9 +98,9 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
|||
private int m_saydistance = 30;
|
||||
private int m_shoutdistance = 100;
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
// wrap this in a try block so that defaults will work if
|
||||
// the config file doesn't specify otherwise.
|
||||
|
@ -122,6 +120,7 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
|||
if (maxlisteners < 1) maxlisteners = int.MaxValue;
|
||||
if (maxhandles < 1) maxhandles = int.MaxValue;
|
||||
|
||||
<<<<<<< HEAD:OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
|
||||
m_listenerManager = new ListenerManager(maxlisteners, maxhandles);
|
||||
m_pendingQ = new Queue();
|
||||
m_pending = Queue.Synchronized(m_pendingQ);
|
||||
|
@ -133,26 +132,19 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
|||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
=======
|
||||
>>>>>>> ec3c31e... Updates all IRegionModules to the new style region modules.:OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
|
||||
m_scene = scene;
|
||||
m_scene.RegisterModuleInterface<IWorldComm>(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);
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
public void PostInitialise()
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<IWorldComm>(this);
|
||||
scene.EventManager.OnChatFromClient -= DeliverClientMessage;
|
||||
scene.EventManager.OnChatBroadcast -= DeliverClientMessage;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
@ -164,6 +156,11 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
|||
get { return "WorldCommModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IWorldComm Members
|
||||
|
|
|
@ -32,7 +32,6 @@ using System.Net;
|
|||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using Nwc.XmlRpc;
|
||||
using OpenMetaverse;
|
||||
|
@ -77,8 +76,7 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class XMLRPCModule : ISharedRegionModule, IXMLRPC
|
||||
public class XMLRPCModule : IRegionModule, IXMLRPC
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -96,9 +94,9 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
|||
private int RemoteReplyScriptWait = 300;
|
||||
private object XMLRPCListLock = new object();
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, 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
|
||||
|
@ -118,14 +116,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
|||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (!m_scenes.Contains(scene))
|
||||
{
|
||||
m_scenes.Add(scene);
|
||||
|
@ -134,12 +125,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
|||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
private Dictionary<Scene, BaseHttpServer> m_HttpServers = new Dictionary<Scene, BaseHttpServer>();
|
||||
public void RegionLoaded(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (IsEnabled())
|
||||
{
|
||||
|
@ -147,31 +133,9 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
|||
// Attach xmlrpc handlers
|
||||
m_log.Info("[REMOTE_DATA]: " +
|
||||
"Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands.");
|
||||
BaseHttpServer httpServer = new BaseHttpServer((uint)m_remoteDataPort);
|
||||
BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort);
|
||||
httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData);
|
||||
httpServer.Start();
|
||||
m_HttpServers.Add(scene, httpServer);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (m_scenes.Contains(scene))
|
||||
m_scenes.Remove(scene);
|
||||
scene.UnregisterModuleInterface<IXMLRPC>(this);
|
||||
if (IsEnabled())
|
||||
{
|
||||
// Start http server
|
||||
// Attach xmlrpc handlers
|
||||
if (m_HttpServers.ContainsKey(scene))
|
||||
{
|
||||
BaseHttpServer httpServer;
|
||||
m_HttpServers.TryGetValue(scene, out httpServer);
|
||||
m_log.Info("[REMOTE_DATA]: " +
|
||||
"Stopping XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands.");
|
||||
httpServer.RemoveXmlRPCHandler("llRemoteData");
|
||||
httpServer.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -184,6 +148,11 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
|||
get { return m_name; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public int Port
|
||||
{
|
||||
get { return m_remoteDataPort; }
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset
|
|||
private IConfigSource m_Config;
|
||||
bool m_Registered = false;
|
||||
|
||||
#region ISharedRegionModule interface
|
||||
#region IRegionModule interface
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid
|
|||
bool m_Registered = false;
|
||||
HypergridServiceInConnector m_HypergridHandler;
|
||||
|
||||
#region ISharedRegionModule interface
|
||||
#region IRegionModule interface
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory
|
|||
private IConfigSource m_Config;
|
||||
bool m_Registered = false;
|
||||
|
||||
#region ISharedRegionModule interface
|
||||
#region IRegionModule interface
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land
|
|||
private IConfigSource m_Config;
|
||||
private List<Scene> m_Scenes = new List<Scene>();
|
||||
|
||||
#region ISharedRegionModule interface
|
||||
#region IRegionModule interface
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Neighbour
|
|||
private IConfigSource m_Config;
|
||||
private List<Scene> m_Scenes = new List<Scene>();
|
||||
|
||||
#region ISharedRegionModule interface
|
||||
#region IRegionModule interface
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Simulation
|
|||
private IConfigSource m_Config;
|
||||
bool m_Registered = false;
|
||||
|
||||
#region ISharedRegionModule interface
|
||||
#region IRegionModule interface
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
|
|||
|
||||
#endregion /* Events */
|
||||
|
||||
#region ISharedRegionModule
|
||||
#region IRegionModule
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
|
@ -136,7 +136,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion /* IRegionModule */
|
||||
|
||||
#region IInterregionComms
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
|
|||
protected bool m_safemode;
|
||||
protected IPAddress m_thisIP;
|
||||
|
||||
#region ISharedRegionModule
|
||||
#region IRegionModule
|
||||
|
||||
public virtual void Initialise(IConfigSource config)
|
||||
{
|
||||
|
@ -149,7 +149,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
|
|||
MainServer.Instance.AddHTTPHandler("/object/", ObjectHandler);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion /* IRegionModule */
|
||||
|
||||
#region IInterregionComms
|
||||
|
||||
|
@ -436,12 +436,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
|
|||
}
|
||||
|
||||
OSDMap resp = new OSDMap(2);
|
||||
string reason = String.Empty;
|
||||
uint teleportFlags = 0;
|
||||
if (args.ContainsKey("teleport_flags"))
|
||||
{
|
||||
teleportFlags = args["teleport_flags"].AsUInteger();
|
||||
}
|
||||
string reason = String.Empty;
|
||||
uint teleportFlags = 0;
|
||||
if (args.ContainsKey("teleport_flags"))
|
||||
{
|
||||
teleportFlags = args["teleport_flags"].AsUInteger();
|
||||
}
|
||||
|
||||
// This is the meaning of POST agent
|
||||
m_regionClient.AdjustUserInformation(aCircuit);
|
||||
|
|
|
@ -81,7 +81,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<IRegionArchiverModule>(this);
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -36,7 +35,6 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class CloudModule : ICloudModule
|
||||
{
|
||||
// private static readonly log4net.ILog m_log
|
||||
|
@ -50,7 +48,7 @@ namespace OpenSim.Region.CoreModules
|
|||
private float m_cloudDensity = 1.0F;
|
||||
private float[] cloudCover = new float[16 * 16];
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
IConfig cloudConfig = config.Configs["Cloud"];
|
||||
|
||||
|
@ -60,17 +58,10 @@ namespace OpenSim.Region.CoreModules
|
|||
m_cloudDensity = cloudConfig.GetFloat("density", 0.5F);
|
||||
m_frameUpdateRate = cloudConfig.GetInt("cloud_update_rate", 1000);
|
||||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (m_enabled)
|
||||
{
|
||||
|
||||
m_scene = scene;
|
||||
|
||||
scene.EventManager.OnNewClient += CloudsToClient;
|
||||
|
@ -80,18 +71,9 @@ namespace OpenSim.Region.CoreModules
|
|||
GenerateCloudCover();
|
||||
|
||||
m_ready = true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.EventManager.OnNewClient -= CloudsToClient;
|
||||
scene.UnregisterModuleInterface<ICloudModule>(this);
|
||||
scene.EventManager.OnFrame -= CloudUpdate;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
|
@ -114,6 +96,12 @@ namespace OpenSim.Region.CoreModules
|
|||
get { return "CloudModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
|
||||
public float CloudCover(int x, int y, int z)
|
||||
{
|
||||
float cover = 0f;
|
||||
|
|
|
@ -30,7 +30,6 @@ using System.IO;
|
|||
using System.Reflection;
|
||||
using System.Security;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -39,7 +38,6 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.World.Estate
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class EstateManagementModule : IEstateModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
@ -900,16 +898,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_scene.RegisterModuleInterface<IEstateModule>(this);
|
||||
|
@ -931,29 +920,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
consoleSetTerrainHeights);
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
// Sets up the sun module based on the saved Estate and Region Settings
|
||||
// DO NOT REMOVE or the sun will stop working
|
||||
TriggerEstateToolsSunUpdate();
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<IEstateModule>(this);
|
||||
scene.EventManager.OnNewClient -= EventManager_OnNewClient;
|
||||
scene.EventManager.OnRequestChangeWaterHeight -= changeWaterHeight;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "EstateManagementModule"; }
|
||||
}
|
||||
|
||||
#region Console Commands
|
||||
|
||||
public void consoleSetTerrainTexture(string module, string[] args)
|
||||
|
@ -1040,6 +1006,28 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
// Sets up the sun module based no the saved Estate and Region Settings
|
||||
// DO NOT REMOVE or the sun will stop working
|
||||
TriggerEstateToolsSunUpdate();
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "EstateManagementModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Other Functions
|
||||
|
|
|
@ -29,7 +29,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -90,8 +89,7 @@ enum GroupPowers : long
|
|||
|
||||
namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class PermissionsModule : INonSharedRegionModule
|
||||
public class PermissionsModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -151,10 +149,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
|
||||
#endregion
|
||||
|
||||
#region INonSharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
m_scene = scene;
|
||||
|
||||
IConfig myConfig = config.Configs["Startup"];
|
||||
|
||||
string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule");
|
||||
|
@ -179,7 +179,74 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
if (m_bypassPermissions)
|
||||
m_log.Info("[PERMISSIONS]: serviceside_object_permissions = false in ini file so disabling all region service permission checks");
|
||||
else
|
||||
m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks");
|
||||
m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks");
|
||||
|
||||
//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.OnDuplicateObject += CanDuplicateObject;
|
||||
m_scene.Permissions.OnDeleteObject += CanDeleteObject; //MAYBE FULLY IMPLEMENTED
|
||||
m_scene.Permissions.OnEditObject += CanEditObject; //MAYBE FULLY IMPLEMENTED
|
||||
m_scene.Permissions.OnEditParcel += CanEditParcel; //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.OnReturnObject += CanReturnObject; //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; //NOT IMPLEMENTED HERE
|
||||
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.OnUseObjectReturn += CanUseObjectReturn; //NOT YET IMPLEMENTED
|
||||
|
||||
m_scene.AddCommand(this, "bypass permissions",
|
||||
"bypass permissions <true / false>",
|
||||
"Bypass permission checks",
|
||||
HandleBypassPermissions);
|
||||
|
||||
m_scene.AddCommand(this, "force permissions",
|
||||
"force permissions <true / false>",
|
||||
"Force permissions on or off",
|
||||
HandleForcePermissions);
|
||||
|
||||
m_scene.AddCommand(this, "debug permissions",
|
||||
"debug permissions <true / false>",
|
||||
"Enable permissions debugging",
|
||||
HandleDebugPermissions);
|
||||
|
||||
|
||||
string grant = myConfig.GetString("GrantLSL","");
|
||||
if (grant.Length > 0) {
|
||||
|
@ -227,158 +294,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
m_scene = scene;
|
||||
|
||||
//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.OnDuplicateObject += CanDuplicateObject;
|
||||
m_scene.Permissions.OnDeleteObject += CanDeleteObject; //MAYBE FULLY IMPLEMENTED
|
||||
m_scene.Permissions.OnEditObject += CanEditObject; //MAYBE FULLY IMPLEMENTED
|
||||
m_scene.Permissions.OnEditParcel += CanEditParcel; //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.OnReturnObject += CanReturnObject; //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; //NOT IMPLEMENTED HERE
|
||||
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.OnUseObjectReturn += CanUseObjectReturn; //NOT YET IMPLEMENTED
|
||||
|
||||
m_scene.AddCommand(this, "bypass permissions",
|
||||
"bypass permissions <true / false>",
|
||||
"Bypass permission checks",
|
||||
HandleBypassPermissions);
|
||||
|
||||
m_scene.AddCommand(this, "force permissions",
|
||||
"force permissions <true / false>",
|
||||
"Force permissions on or off",
|
||||
HandleForcePermissions);
|
||||
|
||||
m_scene.AddCommand(this, "debug permissions",
|
||||
"debug permissions <true / false>",
|
||||
"Enable permissions debugging",
|
||||
HandleDebugPermissions);
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
m_friendsModule = m_scene.RequestModuleInterface<IFriendsModule>();
|
||||
|
||||
if (m_friendsModule == null)
|
||||
m_log.Error("[PERMISSIONS]: Friends module not found, friend permissions will not work");
|
||||
else
|
||||
m_log.Info("[PERMISSIONS]: Friends module found, friend permissions enabled");
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.Permissions.OnBypassPermissions -= BypassPermissions;
|
||||
scene.Permissions.OnSetBypassPermissions -= SetBypassPermissions;
|
||||
scene.Permissions.OnPropagatePermissions -= PropagatePermissions;
|
||||
scene.Permissions.OnGenerateClientFlags -= GenerateClientFlags;
|
||||
scene.Permissions.OnAbandonParcel -= CanAbandonParcel;
|
||||
scene.Permissions.OnReclaimParcel -= CanReclaimParcel;
|
||||
scene.Permissions.OnDeedParcel -= CanDeedParcel;
|
||||
scene.Permissions.OnDeedObject -= CanDeedObject;
|
||||
scene.Permissions.OnIsGod -= IsGod;
|
||||
scene.Permissions.OnDuplicateObject -= CanDuplicateObject;
|
||||
scene.Permissions.OnDeleteObject -= CanDeleteObject; //MAYBE FULLY IMPLEMENTED
|
||||
scene.Permissions.OnEditObject -= CanEditObject; //MAYBE FULLY IMPLEMENTED
|
||||
scene.Permissions.OnEditParcel -= CanEditParcel; //MAYBE FULLY IMPLEMENTED
|
||||
scene.Permissions.OnInstantMessage -= CanInstantMessage;
|
||||
scene.Permissions.OnInventoryTransfer -= CanInventoryTransfer; //NOT YET IMPLEMENTED
|
||||
scene.Permissions.OnIssueEstateCommand -= CanIssueEstateCommand; //FULLY IMPLEMENTED
|
||||
scene.Permissions.OnMoveObject -= CanMoveObject; //MAYBE FULLY IMPLEMENTED
|
||||
scene.Permissions.OnObjectEntry -= CanObjectEntry;
|
||||
scene.Permissions.OnReturnObject -= CanReturnObject; //NOT YET IMPLEMENTED
|
||||
scene.Permissions.OnRezObject -= CanRezObject; //MAYBE FULLY IMPLEMENTED
|
||||
scene.Permissions.OnRunConsoleCommand -= CanRunConsoleCommand;
|
||||
scene.Permissions.OnRunScript -= CanRunScript; //NOT YET IMPLEMENTED
|
||||
scene.Permissions.OnCompileScript -= CanCompileScript;
|
||||
scene.Permissions.OnSellParcel -= CanSellParcel;
|
||||
scene.Permissions.OnTakeObject -= CanTakeObject;
|
||||
scene.Permissions.OnTakeCopyObject -= CanTakeCopyObject;
|
||||
scene.Permissions.OnTerraformLand -= CanTerraformLand;
|
||||
scene.Permissions.OnLinkObject -= CanLinkObject; //NOT YET IMPLEMENTED
|
||||
scene.Permissions.OnDelinkObject -= CanDelinkObject; //NOT YET IMPLEMENTED
|
||||
scene.Permissions.OnBuyLand -= CanBuyLand; //NOT YET IMPLEMENTED
|
||||
|
||||
scene.Permissions.OnViewNotecard -= CanViewNotecard; //NOT YET IMPLEMENTED
|
||||
scene.Permissions.OnViewScript -= CanViewScript; //NOT YET IMPLEMENTED
|
||||
scene.Permissions.OnEditNotecard -= CanEditNotecard; //NOT YET IMPLEMENTED
|
||||
scene.Permissions.OnEditScript -= CanEditScript; //NOT YET IMPLEMENTED
|
||||
|
||||
scene.Permissions.OnCreateObjectInventory -= CanCreateObjectInventory; //NOT IMPLEMENTED HERE
|
||||
scene.Permissions.OnEditObjectInventory -= CanEditObjectInventory;//MAYBE FULLY IMPLEMENTED
|
||||
scene.Permissions.OnCopyObjectInventory -= CanCopyObjectInventory; //NOT YET IMPLEMENTED
|
||||
scene.Permissions.OnDeleteObjectInventory -= CanDeleteObjectInventory; //NOT YET IMPLEMENTED
|
||||
scene.Permissions.OnResetScript -= CanResetScript;
|
||||
|
||||
scene.Permissions.OnCreateUserInventory -= CanCreateUserInventory; //NOT YET IMPLEMENTED
|
||||
scene.Permissions.OnCopyUserInventory -= CanCopyUserInventory; //NOT YET IMPLEMENTED
|
||||
scene.Permissions.OnEditUserInventory -= CanEditUserInventory; //NOT YET IMPLEMENTED
|
||||
scene.Permissions.OnDeleteUserInventory -= CanDeleteUserInventory; //NOT YET IMPLEMENTED
|
||||
|
||||
scene.Permissions.OnTeleport -= CanTeleport; //NOT YET IMPLEMENTED
|
||||
scene.Permissions.OnUseObjectReturn -= CanUseObjectReturn; //NOT YET IMPLEMENTED
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "PermissionsModule"; }
|
||||
}
|
||||
|
||||
public void HandleBypassPermissions(string module, string[] args)
|
||||
{
|
||||
if (m_scene.ConsoleScene() != null &&
|
||||
|
@ -449,6 +364,31 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
m_log.InfoFormat("[PERMISSIONS] Set permissions debugging to {0} in {1}", m_debugPermissions, m_scene.RegionInfo.RegionName);
|
||||
}
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
m_friendsModule = m_scene.RequestModuleInterface<IFriendsModule>();
|
||||
|
||||
if (m_friendsModule == null)
|
||||
m_log.Error("[PERMISSIONS]: Friends module not found, friend permissions will not work");
|
||||
else
|
||||
m_log.Info("[PERMISSIONS]: Friends module found, friend permissions enabled");
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "PermissionsModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Helper Functions
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
*/
|
||||
|
||||
using System;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -35,44 +34,26 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.World.Sound
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class SoundModule : INonSharedRegionModule, ISoundModule
|
||||
public class SoundModule : IRegionModule, ISoundModule
|
||||
{
|
||||
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected Scene m_scene;
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
m_scene = scene;
|
||||
|
||||
|
||||
m_scene.EventManager.OnNewClient += OnNewClient;
|
||||
|
||||
|
||||
m_scene.RegisterModuleInterface<ISoundModule>(this);
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.EventManager.OnNewClient -= OnNewClient;
|
||||
scene.UnregisterModuleInterface<ISoundModule>(this);
|
||||
}
|
||||
|
||||
public void PostInitialise() {}
|
||||
public void Close() {}
|
||||
public string Name { get { return "Sound Module"; } }
|
||||
|
||||
public bool IsSharedModule { get { return false; } }
|
||||
|
||||
private void OnNewClient(IClientAPI client)
|
||||
{
|
||||
client.OnSoundTrigger += TriggerSound;
|
||||
|
|
|
@ -29,7 +29,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -38,7 +37,6 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class SunModule : ISunModule
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -280,12 +278,27 @@ namespace OpenSim.Region.CoreModules
|
|||
return GetCurrentSunHour() + 6.0f;
|
||||
}
|
||||
|
||||
#region INonSharedRegionModule Methods
|
||||
#region IRegion Methods
|
||||
|
||||
// Called immediately after the module is loaded for a given region
|
||||
// i.e. Immediately after instance creation.
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_frame = 0;
|
||||
|
||||
// This one puts an entry in the main help screen
|
||||
m_scene.AddCommand(this, String.Empty, "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(this, "sun", "", "", HandleSunConsoleCommand);
|
||||
foreach (KeyValuePair<string, string> kvp in GetParamList())
|
||||
{
|
||||
m_scene.AddCommand(this, String.Format("sun {0}", kvp.Key), String.Format("{0} - {1}", kvp.Key, kvp.Value), "", HandleSunConsoleCommand);
|
||||
}
|
||||
|
||||
|
||||
|
||||
TimeZone local = TimeZone.CurrentTimeZone;
|
||||
TicksUTCOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks;
|
||||
m_log.Debug("[SUN]: localtime offset is " + TicksUTCOffset);
|
||||
|
@ -333,6 +346,57 @@ namespace OpenSim.Region.CoreModules
|
|||
// m_latitude = d_latitude;
|
||||
// m_longitude = d_longitude;
|
||||
}
|
||||
|
||||
switch (m_RegionMode)
|
||||
{
|
||||
case "T1":
|
||||
default:
|
||||
case "SL":
|
||||
// Time taken to complete a cycle (day and season)
|
||||
|
||||
SecondsPerSunCycle = (uint) (m_DayLengthHours * 60 * 60);
|
||||
SecondsPerYear = (uint) (SecondsPerSunCycle*m_YearLengthDays);
|
||||
|
||||
// Ration of real-to-virtual time
|
||||
|
||||
// VWTimeRatio = 24/m_day_length;
|
||||
|
||||
// Speed of rotation needed to complete a cycle in the
|
||||
// designated period (day and season)
|
||||
|
||||
SunSpeed = m_SunCycle/SecondsPerSunCycle;
|
||||
SeasonSpeed = m_SeasonalCycle/SecondsPerYear;
|
||||
|
||||
// Horizon translation
|
||||
|
||||
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);
|
||||
m_log.Debug("[SUN]: Percentage of time for daylight " + m_DayTimeSunHourScale);
|
||||
m_log.Debug("[SUN]: Positional data updated every " + m_UpdateInterval + " frames");
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
scene.RegisterModuleInterface<ISunModule>(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
@ -351,84 +415,10 @@ namespace OpenSim.Region.CoreModules
|
|||
get { return "SunModule"; }
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return null; }
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_frame = 0;
|
||||
|
||||
// This one puts an entry in the main help screen
|
||||
m_scene.AddCommand(this, String.Empty, "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(this, "sun", "", "", HandleSunConsoleCommand);
|
||||
foreach (KeyValuePair<string, string> kvp in GetParamList())
|
||||
{
|
||||
m_scene.AddCommand(this, String.Format("sun {0}", kvp.Key), String.Format("{0} - {1}", kvp.Key, kvp.Value), "", HandleSunConsoleCommand);
|
||||
}
|
||||
switch (m_RegionMode)
|
||||
{
|
||||
case "T1":
|
||||
default:
|
||||
case "SL":
|
||||
// Time taken to complete a cycle (day and season)
|
||||
|
||||
SecondsPerSunCycle = (uint)(m_DayLengthHours * 60 * 60);
|
||||
SecondsPerYear = (uint)(SecondsPerSunCycle * m_YearLengthDays);
|
||||
|
||||
// Ration of real-to-virtual time
|
||||
|
||||
// VWTimeRatio = 24/m_day_length;
|
||||
|
||||
// Speed of rotation needed to complete a cycle in the
|
||||
// designated period (day and season)
|
||||
|
||||
SunSpeed = m_SunCycle / SecondsPerSunCycle;
|
||||
SeasonSpeed = m_SeasonalCycle / SecondsPerYear;
|
||||
|
||||
// Horizon translation
|
||||
|
||||
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);
|
||||
m_log.Debug("[SUN]: Percentage of time for daylight " + m_DayTimeSunHourScale);
|
||||
m_log.Debug("[SUN]: Positional data updated every " + m_UpdateInterval + " frames");
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
scene.RegisterModuleInterface<ISunModule>(this);
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.RegisterModuleInterface<ISunModule>(this);
|
||||
scene.EventManager.OnFrame -= SunUpdate;
|
||||
scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel;
|
||||
scene.EventManager.OnEstateToolsSunUpdate -= EstateToolsSunUpdate;
|
||||
scene.EventManager.OnGetCurrentTimeAsLindenSunHour -= GetCurrentTimeAsLindenSunHour;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EventManager Events
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -37,8 +36,7 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.Vegetation
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class VegetationModule : INonSharedRegionModule, IVegetationModule
|
||||
public class VegetationModule : IRegionModule, IVegetationModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -47,34 +45,17 @@ 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(IConfigSource source)
|
||||
{
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_scene.RegisterModuleInterface<IVegetationModule>(this);
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<IVegetationModule>(this);
|
||||
}
|
||||
|
||||
public void PostInitialise() {}
|
||||
public void Close() {}
|
||||
public string Name { get { return "Vegetation Module"; } }
|
||||
|
||||
public bool IsSharedModule { get { return false; } }
|
||||
|
||||
public SceneObjectGroup AddTree(
|
||||
UUID uuid, UUID groupID, Vector3 scale, Quaternion rotation, Vector3 position, Tree treeType, bool newTree)
|
||||
{
|
||||
|
|
|
@ -55,19 +55,17 @@ namespace OpenSim.Region.CoreModules
|
|||
|
||||
private IWindModelPlugin m_activeWindPlugin = null;
|
||||
private const string m_dWindPluginName = "SimpleRandomWind";
|
||||
private string m_desiredWindPlugin = "SimpleRandomWind";
|
||||
private Dictionary<string, IWindModelPlugin> m_availableWindPlugins = new Dictionary<string, IWindModelPlugin>();
|
||||
|
||||
// Simplified windSpeeds based on the fact that the client protocal tracks at a resolution of 16m
|
||||
private Vector2[] windSpeeds = new Vector2[16 * 16];
|
||||
private IConfig windConfig;
|
||||
|
||||
#region IRegion Methods
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
windConfig = config.Configs["Wind"];
|
||||
m_desiredWindPlugin = m_dWindPluginName;
|
||||
IConfig windConfig = config.Configs["Wind"];
|
||||
string desiredWindPlugin = m_dWindPluginName;
|
||||
|
||||
if (windConfig != null)
|
||||
{
|
||||
|
@ -78,18 +76,10 @@ namespace OpenSim.Region.CoreModules
|
|||
// Determine which wind model plugin is desired
|
||||
if (windConfig.Contains("wind_plugin"))
|
||||
{
|
||||
m_desiredWindPlugin = windConfig.GetString("wind_plugin");
|
||||
desiredWindPlugin = windConfig.GetString("wind_plugin");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (m_enabled)
|
||||
{
|
||||
m_log.InfoFormat("[WIND] Enabled with an update rate of {0} frames.", m_frameUpdateRate);
|
||||
|
@ -105,30 +95,30 @@ namespace OpenSim.Region.CoreModules
|
|||
}
|
||||
|
||||
// Check for desired plugin
|
||||
if (m_availableWindPlugins.ContainsKey(m_desiredWindPlugin))
|
||||
if (m_availableWindPlugins.ContainsKey(desiredWindPlugin))
|
||||
{
|
||||
m_activeWindPlugin = m_availableWindPlugins[m_desiredWindPlugin];
|
||||
m_activeWindPlugin = m_availableWindPlugins[desiredWindPlugin];
|
||||
|
||||
m_log.InfoFormat("[WIND] {0} plugin found, initializing.", m_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}", m_desiredWindPlugin);
|
||||
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(this, String.Empty, "wind", "Usage: wind <plugin> <param> [value] - Get or Update Wind paramaters", null);
|
||||
|
||||
|
||||
// This one enables the ability to type just the base command without any parameters
|
||||
m_scene.AddCommand(this, "wind", "", "", HandleConsoleCommand);
|
||||
|
||||
|
@ -137,7 +127,7 @@ namespace OpenSim.Region.CoreModules
|
|||
{
|
||||
m_scene.AddCommand(this, String.Format("wind base wind_plugin {0}", windPlugin.Name), String.Format("{0} - {1}", windPlugin.Name, windPlugin.Description), "", HandleConsoleBaseCommand);
|
||||
m_scene.AddCommand(this, String.Format("wind base wind_update_rate"), "Change the wind update rate.", "", HandleConsoleBaseCommand);
|
||||
|
||||
|
||||
foreach (KeyValuePair<string, string> kvp in windPlugin.WindParams())
|
||||
{
|
||||
m_scene.AddCommand(this, String.Format("wind {0} {1}", windPlugin.Name, kvp.Key), String.Format("{0} : {1} - {2}", windPlugin.Name, kvp.Key, kvp.Value), "", HandleConsoleParamCommand);
|
||||
|
@ -159,19 +149,13 @@ namespace OpenSim.Region.CoreModules
|
|||
m_ready = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.EventManager.OnFrame -= WindUpdate;
|
||||
scene.EventManager.OnMakeRootAgent -= OnAgentEnteredRegion;
|
||||
scene.UnregisterModuleInterface<IWindModule>(this);
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
if (m_enabled)
|
||||
|
@ -198,6 +182,11 @@ namespace OpenSim.Region.CoreModules
|
|||
get { return "WindModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ using System.Collections.Generic;
|
|||
using System.Drawing;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Imaging;
|
||||
|
@ -60,8 +59,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
public face[] trns;
|
||||
}
|
||||
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class MapImageModule : IMapImageGenerator, INonSharedRegionModule
|
||||
public class MapImageModule : IMapImageGenerator, IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
@ -130,36 +128,23 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
|
||||
#endregion
|
||||
|
||||
#region INonSharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_config = source;
|
||||
|
||||
IConfig startupConfig = m_config.Configs["Startup"];
|
||||
if (startupConfig.GetString("MapImageModule", "MapImageModule") !=
|
||||
"MapImageModule")
|
||||
return;
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_scene.RegisterModuleInterface<IMapImageGenerator>(this);
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
public void PostInitialise()
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<IMapImageGenerator>(this);
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
@ -171,6 +156,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
get { return "MapImageModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// TODO: unused:
|
||||
|
|
|
@ -24,12 +24,9 @@
|
|||
* (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;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -41,8 +38,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
|||
|
||||
namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class MapSearchModule : ISharedRegionModule
|
||||
public class MapSearchModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
@ -50,12 +46,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
Scene m_scene = null; // only need one for communication with GridService
|
||||
List<Scene> m_scenes = new List<Scene>();
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
#region IRegionModule Members
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
if (m_scene == null)
|
||||
{
|
||||
|
@ -66,22 +58,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if(m_scenes.Contains(scene))
|
||||
m_scenes.Remove(scene);
|
||||
scene.EventManager.OnNewClient -= OnNewClient;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
@ -97,6 +73,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
get { return "MapSearchModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void OnNewClient(IClientAPI client)
|
||||
|
|
|
@ -33,7 +33,6 @@ using System.Net;
|
|||
using System.Reflection;
|
||||
using System.Xml;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -44,8 +43,7 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.DataSnapshot
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class DataSnapshotManager : ISharedRegionModule, IDataSnapshot
|
||||
public class DataSnapshotManager : IRegionModule, IDataSnapshot
|
||||
{
|
||||
#region Class members
|
||||
//Information from config
|
||||
|
@ -91,7 +89,7 @@ namespace OpenSim.Region.DataSnapshot
|
|||
|
||||
#region IRegionModule
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
if (!m_configLoaded)
|
||||
{
|
||||
|
@ -142,29 +140,24 @@ namespace OpenSim.Region.DataSnapshot
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
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");
|
||||
|
||||
m_log.Info("[DATASNAPSHOT]: Scene added to module.");
|
||||
|
||||
m_snapStore.AddScene(scene);
|
||||
|
@ -198,27 +191,22 @@ namespace OpenSim.Region.DataSnapshot
|
|||
}
|
||||
else
|
||||
{
|
||||
m_log.Info("[DATASNAPSHOT]: Data snapshot disabled, not adding scene to module (or anything else).");
|
||||
m_log.Warn("[DATASNAPSHOT]: Data snapshot disabled, not adding scene to module (or anything else).");
|
||||
}
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (m_scenes.Contains(scene))
|
||||
m_scenes.Remove(scene);
|
||||
m_snapStore.RemoveScene(scene);
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
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"; }
|
||||
|
@ -226,6 +214,7 @@ namespace OpenSim.Region.DataSnapshot
|
|||
|
||||
public void PostInitialise()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
namespace OpenSim.Region.Framework.Interfaces
|
||||
{
|
||||
public interface ICloudModule : INonSharedRegionModule
|
||||
public interface ICloudModule : IRegionModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Retrieves the cloud density at the given region coordinates
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
public int numLeft;
|
||||
}
|
||||
|
||||
public interface IEmailModule : ISharedRegionModule
|
||||
public interface IEmailModule : IRegionModule
|
||||
{
|
||||
void SendEmail(UUID objectID, string address, string subject, string body);
|
||||
Email GetNextEmail(UUID objectID, string sender, string subject);
|
||||
|
|
|
@ -29,7 +29,7 @@ using OpenMetaverse;
|
|||
|
||||
namespace OpenSim.Region.Framework.Interfaces
|
||||
{
|
||||
public interface IEstateModule : INonSharedRegionModule
|
||||
public interface IEstateModule : IRegionModule
|
||||
{
|
||||
uint GetRegionFlags();
|
||||
bool IsManager(UUID avatarID);
|
||||
|
|
|
@ -29,7 +29,7 @@ using OpenMetaverse;
|
|||
|
||||
namespace OpenSim.Region.Framework.Interfaces
|
||||
{
|
||||
public interface ISunModule : INonSharedRegionModule
|
||||
public interface ISunModule : IRegionModule
|
||||
{
|
||||
double GetSunParameter(string param);
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ using OpenMetaverse;
|
|||
|
||||
namespace OpenSim.Region.Framework.Interfaces
|
||||
{
|
||||
public interface IWindModule : INonSharedRegionModule
|
||||
public interface IWindModule : IRegionModule
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -25,11 +25,9 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
@ -37,23 +35,24 @@ using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server;
|
|||
|
||||
namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class IRCStackModule : INonSharedRegionModule
|
||||
public class IRCStackModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IRCServer m_server;
|
||||
// private Scene m_scene;
|
||||
private int portNo;
|
||||
|
||||
#region Implementation of ISharedRegionModule
|
||||
#region Implementation of IRegionModule
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
if (null != source.Configs["IRCd"] &&
|
||||
source.Configs["IRCd"].GetBoolean("Enabled",false))
|
||||
{
|
||||
portNo = source.Configs["IRCd"].GetInt("Port",6666);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,20 +68,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
|
|||
m_log.Info("[IRCd] Added user to Scene");
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (portNo != null)
|
||||
{
|
||||
m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), portNo, scene);
|
||||
m_server.OnNewIRCClient += m_server_OnNewIRCClient;
|
||||
}
|
||||
}
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
@ -95,9 +83,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
|
|||
get { return "IRCClientStackModule"; }
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return null; }
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -38,7 +38,6 @@ using System.Collections.Generic;
|
|||
using System.Reflection;
|
||||
using OpenMetaverse;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using Nwc.XmlRpc;
|
||||
using OpenSim.Framework;
|
||||
|
@ -54,8 +53,7 @@ using System.Text.RegularExpressions;
|
|||
|
||||
namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class FreeSwitchVoiceModule : ISharedRegionModule, IVoiceModule
|
||||
public class FreeSwitchVoiceModule : IRegionModule, IVoiceModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -110,8 +108,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
|
||||
private IConfig m_config;
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_config = config.Configs["FreeSwitchVoice"];
|
||||
|
||||
if (null == m_config)
|
||||
|
@ -225,21 +224,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
m_scene = scene;
|
||||
if (m_pluginEnabled)
|
||||
if (m_pluginEnabled)
|
||||
{
|
||||
// we need to capture scene in an anonymous method
|
||||
// here as we need it later in the callbacks
|
||||
scene.EventManager.OnRegisterCaps += delegate(UUID agentID, Caps caps)
|
||||
{
|
||||
OnRegisterCaps(scene, agentID, caps);
|
||||
};
|
||||
|
||||
|
||||
{
|
||||
OnRegisterCaps(scene, agentID, caps);
|
||||
};
|
||||
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -259,53 +254,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
m_log.Error("[FreeSwitchVoice]: Certificate validation handler change not supported. You may get ssl certificate validation errors teleporting from your region to some SSL regions.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (m_pluginEnabled)
|
||||
{
|
||||
m_log.Info("[FreeSwitchVoice] registering IVoiceModule with the scene");
|
||||
|
||||
|
||||
// register the voice interface for this module, so the script engine can call us
|
||||
m_scene.RegisterModuleInterface<IVoiceModule>(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (UseProxy)
|
||||
{
|
||||
MainServer.Instance.RemoveHTTPHandler("", String.Format("{0}/", m_freeSwitchAPIPrefix));
|
||||
}
|
||||
else
|
||||
{
|
||||
MainServer.Instance.RemoveHTTPHandler("", String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix));
|
||||
|
||||
MainServer.Instance.RemoveHTTPHandler("", String.Format("{0}/viv_signin.php", m_freeSwitchAPIPrefix));
|
||||
|
||||
MainServer.Instance.RemoveHTTPHandler("", String.Format("{0}/freeswitch-config", m_freeSwitchAPIPrefix));
|
||||
|
||||
MainServer.Instance.RemoveHTTPHandler("", String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix));
|
||||
}
|
||||
scene.EventManager.OnRegisterCaps -= delegate(UUID agentID, Caps caps)
|
||||
{
|
||||
OnRegisterCaps(scene, agentID, caps);
|
||||
};
|
||||
scene.UnregisterModuleInterface<IVoiceModule>(this);
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
@ -314,6 +277,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
|||
{
|
||||
get { return "FreeSwitchVoiceModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
// <summary>
|
||||
// implementation of IVoiceModule, called by osSetParcelSIPAddress script function
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
|
@ -38,7 +38,6 @@ using System.Threading;
|
|||
|
||||
using OpenMetaverse;
|
||||
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
|
||||
using OpenSim;
|
||||
|
@ -51,8 +50,7 @@ using log4net;
|
|||
|
||||
namespace OpenSim.Region.OptionalModules.ContentManagement
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class ContentManagementModule : ISharedRegionModule
|
||||
public class ContentManagementModule : IRegionModule
|
||||
{
|
||||
#region Static Fields
|
||||
|
||||
|
@ -62,20 +60,22 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
|
|||
|
||||
#region Fields
|
||||
|
||||
private bool initialised = false;
|
||||
private CMController m_control = null;
|
||||
private bool m_enabled = false;
|
||||
private CMModel m_model = null;
|
||||
private bool m_posted = false;
|
||||
private CMView m_view = null;
|
||||
private string databaseDir = "./";
|
||||
private string database = "FileSystemDatabase";
|
||||
private int channel = 345;
|
||||
bool initialised = false;
|
||||
CMController m_control = null;
|
||||
bool m_enabled = false;
|
||||
CMModel m_model = null;
|
||||
bool m_posted = false;
|
||||
CMView m_view = null;
|
||||
|
||||
#endregion Fields
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "ContentManagementModule"; }
|
||||
|
@ -89,8 +89,11 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
|
|||
{
|
||||
}
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
string databaseDir = "./";
|
||||
string database = "FileSystemDatabase";
|
||||
int channel = 345;
|
||||
try
|
||||
{
|
||||
if (source.Configs["CMS"] == null)
|
||||
|
@ -112,15 +115,13 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
|
|||
m_log.ErrorFormat("[Content Management]: Exception thrown while reading parameters from configuration file. Message: " + e);
|
||||
m_enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (!m_enabled)
|
||||
{
|
||||
m_log.Info("[Content Management]: Content Management System is not Enabled.");
|
||||
return;
|
||||
}
|
||||
|
||||
lock (this)
|
||||
{
|
||||
if (!initialised) //only init once
|
||||
|
@ -141,18 +142,6 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
|
|||
}
|
||||
}
|
||||
}
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
|
|
|
@ -38,7 +38,6 @@ using System.Security.Policy;
|
|||
using System.Text;
|
||||
using log4net;
|
||||
using Microsoft.CSharp;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
@ -47,8 +46,7 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class MRMModule : INonSharedRegionModule, IMRMModule
|
||||
public class MRMModule : IRegionModule, IMRMModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private Scene m_scene;
|
||||
|
@ -64,14 +62,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
|||
|
||||
private IConfig m_config;
|
||||
|
||||
private bool m_hidden = true;
|
||||
|
||||
public void RegisterExtension<T>(T instance)
|
||||
{
|
||||
m_extensions[typeof (T)] = instance;
|
||||
}
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
if (source.Configs["MRM"] != null)
|
||||
{
|
||||
|
@ -80,10 +76,19 @@ 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
|
||||
m_hidden = source.Configs["MRM"].GetBoolean("Hidden", false);
|
||||
if (!source.Configs["MRM"].GetBoolean("Hidden", false))
|
||||
{
|
||||
scene.EventManager.OnRezScript += EventManager_OnRezScript;
|
||||
scene.EventManager.OnStopScript += EventManager_OnStopScript;
|
||||
}
|
||||
|
||||
scene.EventManager.OnFrame += EventManager_OnFrame;
|
||||
|
||||
scene.RegisterModuleInterface<IMRMModule>(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -96,39 +101,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
|||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
m_scene = scene;
|
||||
if (!m_hidden)
|
||||
{
|
||||
scene.EventManager.OnRezScript += EventManager_OnRezScript;
|
||||
scene.EventManager.OnStopScript += EventManager_OnStopScript;
|
||||
}
|
||||
scene.EventManager.OnFrame += EventManager_OnFrame;
|
||||
|
||||
scene.RegisterModuleInterface<IMRMModule>(this);
|
||||
}
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (!m_hidden)
|
||||
{
|
||||
scene.EventManager.OnRezScript -= EventManager_OnRezScript;
|
||||
scene.EventManager.OnStopScript -= EventManager_OnStopScript;
|
||||
}
|
||||
scene.EventManager.OnFrame -= EventManager_OnFrame;
|
||||
|
||||
scene.UnregisterModuleInterface<IMRMModule>(this);
|
||||
}
|
||||
|
||||
void EventManager_OnStopScript(uint localID, UUID itemID)
|
||||
{
|
||||
if (m_scripts.ContainsKey(itemID))
|
||||
|
@ -330,6 +302,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
|||
mmb.InitMiniModule(world, host, itemID);
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
foreach (KeyValuePair<UUID, MRMBase> pair in m_scripts)
|
||||
|
@ -343,6 +320,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
|||
get { return "MiniRegionModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stolen from ScriptEngine Common
|
||||
/// </summary>
|
||||
|
|
|
@ -100,10 +100,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
|||
if (!m_enabled)
|
||||
return;
|
||||
|
||||
scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue;
|
||||
scene.EventManager.OnOarFileLoaded -= OnOarFileLoaded;
|
||||
m_scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue;
|
||||
m_scene.EventManager.OnOarFileLoaded -= OnOarFileLoaded;
|
||||
|
||||
scene = null;
|
||||
m_scene = null;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
|
|
@ -58,7 +58,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.ScriptModuleComms
|
|||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<IScriptModuleComms>(this);
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
|
|
|
@ -30,7 +30,6 @@ using System.Collections.Generic;
|
|||
using System.Reflection;
|
||||
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
|
||||
|
@ -50,8 +49,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule
|
|||
public string uri;
|
||||
}
|
||||
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class XmlRpcGridRouter : INonSharedRegionModule, IXmlRpcRouter
|
||||
public class XmlRpcGridRouter : IRegionModule, IXmlRpcRouter
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -61,7 +59,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule
|
|||
private bool m_Enabled = false;
|
||||
private string m_ServerURI = String.Empty;
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
IConfig startupConfig = config.Configs["Startup"];
|
||||
if (startupConfig == null)
|
||||
|
@ -77,26 +75,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule
|
|||
return;
|
||||
}
|
||||
|
||||
scene.RegisterModuleInterface<IXmlRpcRouter>(this);
|
||||
m_Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
scene.RegisterModuleInterface<IXmlRpcRouter>(this);
|
||||
}
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<IXmlRpcRouter>(this);
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
@ -108,6 +93,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule
|
|||
get { return "XmlRpcGridRouterModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri)
|
||||
{
|
||||
if (!m_Channels.ContainsKey(itemID))
|
||||
|
|
|
@ -29,7 +29,6 @@ using System;
|
|||
using System.Reflection;
|
||||
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
|
||||
|
@ -40,12 +39,11 @@ using OpenSim.Region.Framework.Scenes;
|
|||
|
||||
namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class XmlRpcRouter : INonSharedRegionModule, IXmlRpcRouter
|
||||
public class XmlRpcRouter : IRegionModule, IXmlRpcRouter
|
||||
{
|
||||
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private bool m_enabled = false;
|
||||
public void Initialise(IConfigSource config)
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
IConfig startupConfig = config.Configs["Startup"];
|
||||
if (startupConfig == null)
|
||||
|
@ -54,25 +52,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule
|
|||
if (startupConfig.GetString("XmlRpcRouterModule",
|
||||
"XmlRpcRouterModule") == "XmlRpcRouterModule")
|
||||
{
|
||||
m_enabled = true;
|
||||
scene.RegisterModuleInterface<IXmlRpcRouter>(this);
|
||||
}
|
||||
}
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
scene.RegisterModuleInterface<IXmlRpcRouter>(this);
|
||||
}
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
scene.UnregisterModuleInterface<IXmlRpcRouter>(this);
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
@ -84,6 +69,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule
|
|||
get { return "XmlRpcRouterModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri)
|
||||
{
|
||||
scriptEngine.PostScriptEvent(itemID, "xmlrpc_uri", new Object[] {uri});
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Freeswitch
|
|||
private IConfigSource m_Config;
|
||||
bool m_Registered = false;
|
||||
|
||||
#region ISharedRegionModule interface
|
||||
#region IRegionModule interface
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,6 @@ using System.IO;
|
|||
using System.Reflection;
|
||||
using System.Timers;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.CoreModules.World.Serialiser;
|
||||
|
@ -43,8 +42,7 @@ using Slash = System.IO.Path;
|
|||
|
||||
namespace OpenSim.Region.Modules.SvnSerialiser
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class SvnBackupModule : ISharedRegionModule
|
||||
public class SvnBackupModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
@ -202,9 +200,9 @@ namespace OpenSim.Region.Modules.SvnSerialiser
|
|||
|
||||
#endregion
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
m_scenes = new List<Scene>();
|
||||
m_timer = new Timer();
|
||||
|
@ -227,10 +225,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser
|
|||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
lock (m_scenes)
|
||||
{
|
||||
m_scenes.Add(scene);
|
||||
|
@ -241,18 +236,6 @@ namespace OpenSim.Region.Modules.SvnSerialiser
|
|||
scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
|
||||
}
|
||||
}
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
|
@ -294,6 +277,11 @@ namespace OpenSim.Region.Modules.SvnSerialiser
|
|||
get { return "SvnBackupModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void EventManager_OnPluginConsole(string[] args)
|
||||
|
|
|
@ -25,11 +25,9 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using OpenMetaverse;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
@ -39,8 +37,7 @@ using Timer=System.Timers.Timer;
|
|||
|
||||
namespace OpenSim.Region.OptionalModules.World.NPC
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class NPCModule : ISharedRegionModule, INPCModule
|
||||
public class NPCModule : IRegionModule, INPCModule
|
||||
{
|
||||
// private const bool m_enabled = false;
|
||||
|
||||
|
@ -137,13 +134,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
|||
}
|
||||
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
m_createMutex = new Mutex(false);
|
||||
|
||||
m_timer = new Timer(500);
|
||||
m_timer.Elapsed += m_timer_Elapsed;
|
||||
m_timer.Start();
|
||||
|
||||
scene.RegisterModuleInterface<INPCModule>(this);
|
||||
}
|
||||
|
||||
void m_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||
|
@ -174,19 +173,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
|||
}
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
scene.RegisterModuleInterface<INPCModule>(this);
|
||||
}
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<INPCModule>(this);
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
@ -200,9 +186,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
|||
get { return "NPCModule"; }
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
get { return true; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ 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;
|
||||
|
@ -47,8 +46,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
|
|||
/// <summary>
|
||||
/// Version 2.02 - Still hacky
|
||||
/// </summary>
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule
|
||||
public class TreePopulatorModule : IRegionModule, ICommandableModule, IVegetationModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private readonly Commander m_commander = new Commander("tree");
|
||||
|
@ -170,10 +168,15 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
|
|||
|
||||
#endregion
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
|
||||
m_scene = scene;
|
||||
m_scene.RegisterModuleInterface<IRegionModule>(this);
|
||||
m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
|
||||
|
||||
// ini file settings
|
||||
try
|
||||
{
|
||||
|
@ -193,18 +196,12 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
|
|||
m_log.Debug("[TREES]: ini failure for update_rate - using default");
|
||||
}
|
||||
|
||||
InstallCommands();
|
||||
|
||||
m_log.Debug("[TREES]: Initialised tree module");
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_scene.RegisterModuleInterface<INonSharedRegionModule>(this);
|
||||
m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
|
||||
InstallCommands();
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
ReloadCopse();
|
||||
if (m_copse.Count > 0)
|
||||
|
@ -214,17 +211,6 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
|
|||
activeizeTreeze(true);
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.UnregisterModuleInterface<INonSharedRegionModule>(this);
|
||||
scene.EventManager.OnPluginConsole -= EventManager_OnPluginConsole;
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
@ -234,6 +220,11 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
|
|||
get { return "TreePopulatorModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
|
|
@ -34,7 +34,6 @@ using System.Reflection;
|
|||
using System.Text;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
|
@ -53,8 +52,7 @@ using OSDMap = OpenMetaverse.StructuredData.OSDMap;
|
|||
|
||||
namespace OpenSim.Region.UserStatistics
|
||||
{
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class WebStatsModule : ISharedRegionModule
|
||||
public class WebStatsModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
@ -72,7 +70,7 @@ namespace OpenSim.Region.UserStatistics
|
|||
private string m_loglines = String.Empty;
|
||||
private volatile int lastHit = 12000;
|
||||
|
||||
public virtual void Initialise(IConfigSource config)
|
||||
public virtual void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
IConfig cnfg;
|
||||
try
|
||||
|
@ -84,17 +82,11 @@ namespace OpenSim.Region.UserStatistics
|
|||
{
|
||||
enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
|
||||
if (!enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
lock (m_scene)
|
||||
{
|
||||
|
@ -138,7 +130,7 @@ namespace OpenSim.Region.UserStatistics
|
|||
MainServer.Instance.AddHTTPHandler("/SStats/", HandleStatsRequest);
|
||||
MainServer.Instance.AddHTTPHandler("/CAPS/VS/", HandleUnknownCAPSRequest);
|
||||
}
|
||||
|
||||
|
||||
m_scene.Add(scene);
|
||||
if (m_simstatsCounters.ContainsKey(scene.RegionInfo.RegionID))
|
||||
m_simstatsCounters.Remove(scene.RegionInfo.RegionID);
|
||||
|
@ -148,14 +140,6 @@ namespace OpenSim.Region.UserStatistics
|
|||
}
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void ReceiveClassicSimStatsPacket(SimStats stats)
|
||||
{
|
||||
if (!enabled)
|
||||
|
@ -324,6 +308,11 @@ namespace OpenSim.Region.UserStatistics
|
|||
get { return "ViewerStatsModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public void OnRegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
m_log.DebugFormat("[VC]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
|
||||
|
|
|
@ -161,11 +161,10 @@ namespace OpenSim.Tests.Common.Setup
|
|||
capsModule.Initialise(new IniConfigSource());
|
||||
testScene.AddRegionModule(capsModule.Name, capsModule);
|
||||
capsModule.AddRegion(testScene);
|
||||
|
||||
INonSharedRegionModule godsModule = new GodsModule();
|
||||
godsModule.Initialise(new IniConfigSource());
|
||||
testScene.AddRegionModule(godsModule.Name, godsModule);
|
||||
godsModule.AddRegion(testScene);
|
||||
|
||||
IRegionModule godsModule = new GodsModule();
|
||||
godsModule.Initialise(testScene, new IniConfigSource());
|
||||
testScene.AddModule(godsModule.Name, godsModule);
|
||||
realServices = realServices.ToLower();
|
||||
// IConfigSource config = new IniConfigSource();
|
||||
|
||||
|
|
Loading…
Reference in New Issue