Merge branch 'master' into careminster
commit
b80ea00265
OpenSim
ApplicationPlugins/LoadRegions
Client/MXP
Framework/Console
Region
ClientStack/LindenUDP
CoreModules
Agent
AssetTransaction
Capabilities
IPBan
TextureDownload
TextureSender
Xfer
Avatar
AvatarFactory
Combat
Dialog
Friends
Gestures
Gods
Groups
Inventory
Archiver
Transfer
Lure
ObjectCaps
Profiles
Framework
EventQueue
Monitoring
Hypergrid
Scripting
DynamicTexture
EMailModules
HttpRequest
LSLHttp
LoadImageURL
VectorRender
WorldComm
XMLRPC
ServiceConnectorsIn
ServiceConnectorsOut/Interregion
World
Archiver
Cloud
Permissions
Sound
Sun
Vegetation
Wind
DataSnapshot
OptionalModules
Agent/InternetRelayClientView
Avatar/Voice/FreeSwitchVoice
ContentManagementSystem
Scripting
Minimodule
RegionReadyModule
ScriptModuleComms
XmlRpcRouterModule
ServiceConnectorsIn/Freeswitch
SvnSerialiser
World
NPC
TreePopulator
ScriptEngine/XEngine
UserStatistics
Tests/Common/Setup
|
@ -99,7 +99,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||||
regionLoader.SetIniConfigSource(m_openSim.ConfigSource.Source);
|
regionLoader.SetIniConfigSource(m_openSim.ConfigSource.Source);
|
||||||
RegionInfo[] regionsToLoad = regionLoader.LoadRegions();
|
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_log.Info("[LOADREGIONSPLUGIN]: DynamicTextureModule...");
|
||||||
m_openSim.ModuleLoader.LoadDefaultSharedModule(new DynamicTextureModule());
|
m_openSim.ModuleLoader.LoadDefaultSharedModule(new DynamicTextureModule());
|
||||||
m_log.Info("[LOADREGIONSPLUGIN]: InstantMessageModule...");
|
m_log.Info("[LOADREGIONSPLUGIN]: InstantMessageModule...");
|
||||||
|
@ -111,7 +111,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||||
m_log.Info("[LOADREGIONSPLUGIN]: AssetTransactionModule...");
|
m_log.Info("[LOADREGIONSPLUGIN]: AssetTransactionModule...");
|
||||||
m_openSim.ModuleLoader.LoadDefaultSharedModule(new AssetTransactionModule());
|
m_openSim.ModuleLoader.LoadDefaultSharedModule(new AssetTransactionModule());
|
||||||
m_log.Info("[LOADREGIONSPLUGIN]: Done.");
|
m_log.Info("[LOADREGIONSPLUGIN]: Done.");
|
||||||
|
*/
|
||||||
if (!CheckRegionsForSanity(regionsToLoad))
|
if (!CheckRegionsForSanity(regionsToLoad))
|
||||||
{
|
{
|
||||||
m_log.Error("[LOADREGIONS]: Halting startup due to conflicts in region configurations");
|
m_log.Error("[LOADREGIONS]: Halting startup due to conflicts in region configurations");
|
||||||
|
|
|
@ -31,6 +31,7 @@ using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using MXP;
|
using MXP;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
@ -44,7 +45,8 @@ namespace OpenSim.Client.MXP
|
||||||
/**
|
/**
|
||||||
* MXP Client Module which adds MXP support to client / region communication.
|
* MXP Client Module which adds MXP support to client / region communication.
|
||||||
*/
|
*/
|
||||||
public class MXPModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class MXPModule : ISharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -57,15 +59,23 @@ namespace OpenSim.Client.MXP
|
||||||
private readonly Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
|
private readonly Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
|
||||||
private bool m_shutdown;
|
private bool m_shutdown;
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
if (!m_scenes.ContainsKey(scene.RegionInfo.RegionID))
|
|
||||||
m_scenes.Add(scene.RegionInfo.RegionID, scene);
|
|
||||||
|
|
||||||
m_config = source;
|
m_config = source;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
|
if (!m_scenes.ContainsKey(scene.RegionInfo.RegionID))
|
||||||
|
m_scenes.Add(scene.RegionInfo.RegionID, scene);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
{
|
{
|
||||||
if (m_config.Configs["MXP"] != null)
|
if (m_config.Configs["MXP"] != null)
|
||||||
{
|
{
|
||||||
|
@ -89,6 +99,14 @@ namespace OpenSim.Client.MXP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PostInitialise()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void ticker_Elapsed(object sender, ElapsedEventArgs e)
|
void ticker_Elapsed(object sender, ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -121,11 +139,5 @@ namespace OpenSim.Client.MXP
|
||||||
{
|
{
|
||||||
get { return "MXP ClientStack Module"; }
|
get { return "MXP ClientStack Module"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -302,6 +302,12 @@ namespace OpenSim.Framework.Console
|
||||||
if (!UUID.TryParse(post["ID"].ToString(), out id))
|
if (!UUID.TryParse(post["ID"].ToString(), out id))
|
||||||
return reply;
|
return reply;
|
||||||
|
|
||||||
|
lock(m_Connections)
|
||||||
|
{
|
||||||
|
if(!m_Connections.ContainsKey(id))
|
||||||
|
return reply;
|
||||||
|
}
|
||||||
|
|
||||||
if (post["COMMAND"] == null || post["COMMAND"].ToString() == String.Empty)
|
if (post["COMMAND"] == null || post["COMMAND"].ToString() == String.Empty)
|
||||||
return reply;
|
return reply;
|
||||||
|
|
||||||
|
|
|
@ -1450,6 +1450,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void SendKillObject(ulong regionHandle, uint localID)
|
public void SendKillObject(ulong regionHandle, uint localID)
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, localID, regionHandle);
|
||||||
|
|
||||||
KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject);
|
KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject);
|
||||||
// TODO: don't create new blocks if recycling an old packet
|
// TODO: don't create new blocks if recycling an old packet
|
||||||
kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1];
|
kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1];
|
||||||
|
@ -3455,6 +3457,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void SendPrimitiveToClient(SendPrimitiveData data)
|
public void SendPrimitiveToClient(SendPrimitiveData data)
|
||||||
{
|
{
|
||||||
|
// string text = data.text;
|
||||||
|
// if (text.IndexOf("\n") >= 0)
|
||||||
|
// text = text.Remove(text.IndexOf("\n"));
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[CLIENT]: Placing request to send full info about prim {0} text {1} to client {2}",
|
||||||
|
// data.localID, text, Name);
|
||||||
|
|
||||||
if (data.priority == double.NaN)
|
if (data.priority == double.NaN)
|
||||||
{
|
{
|
||||||
m_log.Error("[LLClientView] SendPrimitiveToClient received a NaN priority, dropping update");
|
m_log.Error("[LLClientView] SendPrimitiveToClient received a NaN priority, dropping update");
|
||||||
|
@ -3492,7 +3501,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[count];
|
outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[count];
|
||||||
for (int i = 0; i < count; i++)
|
for (int i = 0; i < count; i++)
|
||||||
|
{
|
||||||
outPacket.ObjectData[i] = m_primFullUpdates.Dequeue();
|
outPacket.ObjectData[i] = m_primFullUpdates.Dequeue();
|
||||||
|
|
||||||
|
// string text = Util.FieldToString(outPacket.ObjectData[i].Text);
|
||||||
|
// if (text.IndexOf("\n") >= 0)
|
||||||
|
// text = text.Remove(text.IndexOf("\n"));
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[CLIENT]: Sending full info about prim {0} text {1} to client {2}",
|
||||||
|
// outPacket.ObjectData[i].ID, text, Name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OutPacket(outPacket, ThrottleOutPacketType.State);
|
OutPacket(outPacket, ThrottleOutPacketType.State);
|
||||||
|
@ -9075,8 +9093,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
private bool HandleSendPostcard(IClientAPI client, Packet packet)
|
private bool HandleSendPostcard(IClientAPI client, Packet packet)
|
||||||
{
|
{
|
||||||
SendPostcardPacket SendPostcard =
|
// SendPostcardPacket SendPostcard =
|
||||||
(SendPostcardPacket)packet;
|
// (SendPostcardPacket)packet;
|
||||||
SendPostcard handlerSendPostcard = OnSendPostcard;
|
SendPostcard handlerSendPostcard = OnSendPostcard;
|
||||||
if (handlerSendPostcard != null)
|
if (handlerSendPostcard != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -35,7 +36,8 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||||
{
|
{
|
||||||
public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class AssetTransactionModule : ISharedRegionModule, IAgentAssetTransactions
|
||||||
{
|
{
|
||||||
private readonly Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>();
|
private readonly Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>();
|
||||||
private bool m_dumpAssetsToFile = false;
|
private bool m_dumpAssetsToFile = false;
|
||||||
|
@ -59,9 +61,14 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||||
//m_log.Debug("creating AgentAssetTransactionModule");
|
//m_log.Debug("creating AgentAssetTransactionModule");
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
|
if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
|
||||||
{
|
{
|
||||||
|
@ -79,6 +86,23 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||||
m_scene = scene;
|
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()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -92,11 +116,6 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||||
get { return "AgentTransactionModule"; }
|
get { return "AgentTransactionModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public void NewClient(IClientAPI client)
|
public void NewClient(IClientAPI client)
|
||||||
|
|
|
@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
|
||||||
|
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
{
|
{
|
||||||
m_scene.UnregisterModuleInterface<ICapabilitiesModule>(this);
|
scene.UnregisterModuleInterface<ICapabilitiesModule>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise() {}
|
public void PostInitialise() {}
|
||||||
|
|
|
@ -29,6 +29,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
|
@ -36,15 +37,21 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Agent.IPBan
|
namespace OpenSim.Region.CoreModules.Agent.IPBan
|
||||||
{
|
{
|
||||||
public class IPBanModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class IPBanModule : ISharedRegionModule
|
||||||
{
|
{
|
||||||
#region Implementation of IRegionModule
|
#region Implementation of ISharedRegionModule
|
||||||
|
|
||||||
private List<string> m_bans = new List<string>();
|
private List<string> m_bans = new List<string>();
|
||||||
|
private Dictionary<Scene, SceneBanner> SceneBanners = new Dictionary<Scene, SceneBanner>();
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
new SceneBanner(scene, m_bans);
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
|
SceneBanners.Add(scene, new SceneBanner(scene, m_bans));
|
||||||
|
|
||||||
lock (m_bans)
|
lock (m_bans)
|
||||||
{
|
{
|
||||||
|
@ -58,7 +65,12 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
{
|
{
|
||||||
if (File.Exists("bans.txt"))
|
if (File.Exists("bans.txt"))
|
||||||
{
|
{
|
||||||
|
@ -70,9 +82,18 @@ 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 void Close()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Name
|
public string Name
|
||||||
|
@ -80,11 +101,6 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
|
||||||
get { return "IPBanModule"; }
|
get { return "IPBanModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -41,7 +42,8 @@ using OpenSim.Services.Interfaces;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Agent.TextureDownload
|
namespace OpenSim.Region.CoreModules.Agent.TextureDownload
|
||||||
{
|
{
|
||||||
public class TextureDownloadModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class TextureDownloadModule : INonSharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log
|
private static readonly ILog m_log
|
||||||
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
@ -65,11 +67,14 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region INonSharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
if (m_scene == null)
|
if (m_scene == null)
|
||||||
{
|
{
|
||||||
//m_log.Debug("Creating Texture download module");
|
//m_log.Debug("Creating Texture download module");
|
||||||
|
@ -90,8 +95,21 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
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 -= NewClient;
|
||||||
|
scene.EventManager.OnRemovePresence -= EventManager_OnRemovePresence;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
|
@ -103,11 +121,6 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload
|
||||||
get { return "TextureDownloadModule"; }
|
get { return "TextureDownloadModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -32,6 +32,7 @@ using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.Imaging;
|
using OpenMetaverse.Imaging;
|
||||||
|
@ -45,7 +46,8 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||||
{
|
{
|
||||||
public delegate void J2KDecodeDelegate(UUID assetID);
|
public delegate void J2KDecodeDelegate(UUID assetID);
|
||||||
|
|
||||||
public class J2KDecoderModule : IRegionModule, IJ2KDecoder
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class J2KDecoderModule : ISharedRegionModule, IJ2KDecoder
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -58,16 +60,19 @@ 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>
|
/// <summary>Reference to a scene (doesn't matter which one as long as it can load the cache module)</summary>
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
|
|
||||||
#region IRegionModule
|
#region ISharedRegionModule
|
||||||
|
|
||||||
public string Name { get { return "J2KDecoderModule"; } }
|
public string Name { get { return "J2KDecoderModule"; } }
|
||||||
public bool IsSharedModule { get { return true; } }
|
|
||||||
|
|
||||||
public J2KDecoderModule()
|
public J2KDecoderModule()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
if (m_scene == null)
|
if (m_scene == null)
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
|
@ -75,16 +80,30 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||||
scene.RegisterModuleInterface<IJ2KDecoder>(this);
|
scene.RegisterModuleInterface<IJ2KDecoder>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
{
|
{
|
||||||
m_cache = m_scene.RequestModuleInterface<IImprovedAssetCache>();
|
m_cache = m_scene.RequestModuleInterface<IImprovedAssetCache>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
scene.UnregisterModuleInterface<IJ2KDecoder>(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PostInitialise()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion IRegionModule
|
#endregion
|
||||||
|
|
||||||
#region IJ2KDecoder
|
#region IJ2KDecoder
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -35,7 +36,8 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Agent.Xfer
|
namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||||
{
|
{
|
||||||
public class XferModule : IRegionModule, IXfer
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class XferModule : INonSharedRegionModule, IXfer
|
||||||
{
|
{
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
private Dictionary<string, XferRequest> Requests = new Dictionary<string, XferRequest>();
|
private Dictionary<string, XferRequest> Requests = new Dictionary<string, XferRequest>();
|
||||||
|
@ -52,9 +54,13 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||||
public DateTime timeStamp;
|
public DateTime timeStamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region INonSharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
m_scene.EventManager.OnNewClient += NewClient;
|
m_scene.EventManager.OnNewClient += NewClient;
|
||||||
|
@ -62,8 +68,19 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||||
m_scene.RegisterModuleInterface<IXfer>(this);
|
m_scene.RegisterModuleInterface<IXfer>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public Type ReplaceableInterface
|
||||||
{
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
scene.EventManager.OnNewClient -= NewClient;
|
||||||
|
scene.UnregisterModuleInterface<IXfer>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
|
@ -75,11 +92,6 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
|
||||||
get { return "XferModule"; }
|
get { return "XferModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IXfer Members
|
#region IXfer Members
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -38,7 +39,8 @@ using OpenSim.Services.Interfaces;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
{
|
{
|
||||||
public class AvatarFactoryModule : IAvatarFactory, IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class AvatarFactoryModule : IAvatarFactory, ISharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
private Scene m_scene = null;
|
private Scene m_scene = null;
|
||||||
|
@ -75,7 +77,16 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
return appearance;
|
return appearance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
scene.RegisterModuleInterface<IAvatarFactory>(this);
|
scene.RegisterModuleInterface<IAvatarFactory>(this);
|
||||||
scene.EventManager.OnNewClient += NewClient;
|
scene.EventManager.OnNewClient += NewClient;
|
||||||
|
@ -84,7 +95,16 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
scene.UnregisterModuleInterface<IAvatarFactory>(this);
|
||||||
|
scene.EventManager.OnNewClient -= NewClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
|
@ -100,11 +120,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
get { return "Default Avatar Factory"; }
|
get { return "Default Avatar Factory"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void NewClient(IClientAPI client)
|
public void NewClient(IClientAPI client)
|
||||||
{
|
{
|
||||||
client.OnAvatarNowWearing += AvatarIsWearing;
|
client.OnAvatarNowWearing += AvatarIsWearing;
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
@ -34,7 +35,8 @@ using OpenMetaverse;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
|
namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
|
||||||
{
|
{
|
||||||
public class CombatModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class CombatModule : ISharedRegionModule
|
||||||
{
|
{
|
||||||
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -53,7 +55,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="scene"></param>
|
/// <param name="scene"></param>
|
||||||
/// <param name="config"></param>
|
/// <param name="config"></param>
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
lock (m_scenel)
|
lock (m_scenel)
|
||||||
{
|
{
|
||||||
|
@ -71,6 +83,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
|
||||||
scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
|
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()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -84,11 +107,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
|
||||||
get { return "CombatModule"; }
|
get { return "CombatModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
private void KillAvatar(uint killerObjectLocalID, ScenePresence DeadAvatar)
|
private void KillAvatar(uint killerObjectLocalID, ScenePresence DeadAvatar)
|
||||||
{
|
{
|
||||||
if (killerObjectLocalID == 0)
|
if (killerObjectLocalID == 0)
|
||||||
|
|
|
@ -25,9 +25,11 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -37,13 +39,23 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
||||||
{
|
{
|
||||||
public class DialogModule : IRegionModule, IDialogModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class DialogModule : ISharedRegionModule, IDialogModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
protected Scene m_scene;
|
protected Scene m_scene;
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
m_scene.RegisterModuleInterface<IDialogModule>(this);
|
m_scene.RegisterModuleInterface<IDialogModule>(this);
|
||||||
|
@ -55,10 +67,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
||||||
this, "alert general", "alert general <message>", "Send an alert to everyone", HandleAlertConsoleCommand);
|
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 void Close() {}
|
||||||
public string Name { get { return "Dialog Module"; } }
|
public string Name { get { return "Dialog Module"; } }
|
||||||
public bool IsSharedModule { get { return false; } }
|
|
||||||
|
|
||||||
public void SendAlertToUser(IClientAPI client, string message)
|
public void SendAlertToUser(IClientAPI client, string message)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,6 +31,7 @@ using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
@ -81,7 +82,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
- Terminate Friendship messages (single)
|
- Terminate Friendship messages (single)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class FriendsModule : IRegionModule, IFriendsModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class FriendsModule : ISharedRegionModule, IFriendsModule
|
||||||
{
|
{
|
||||||
private class Transaction
|
private class Transaction
|
||||||
{
|
{
|
||||||
|
@ -111,9 +113,23 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
|
|
||||||
private IGridService m_gridServices = null;
|
private IGridService m_gridServices = null;
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PostInitialise()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
lock (m_scenes)
|
lock (m_scenes)
|
||||||
{
|
{
|
||||||
|
@ -138,17 +154,34 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
scene.EventManager.OnClientClosed += ClientClosed;
|
scene.EventManager.OnClientClosed += ClientClosed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void RegionLoaded(Scene scene)
|
||||||
{
|
{
|
||||||
if (m_scenes.Count > 0)
|
if (m_scenes.Count > 0)
|
||||||
{
|
{
|
||||||
m_TransferModule = m_initialScene.RequestModuleInterface<IMessageTransferModule>();
|
m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
|
||||||
m_gridServices = m_initialScene.GridService;
|
m_gridServices = scene.GridService;
|
||||||
}
|
}
|
||||||
if (m_TransferModule == null)
|
if (m_TransferModule == null)
|
||||||
m_log.Error("[FRIENDS]: Unable to find a message transfer module, friendship offers will not work");
|
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()
|
public void Close()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -158,11 +191,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
get { return "FriendsModule"; }
|
get { return "FriendsModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IInterregionFriendsComms
|
#region IInterregionFriendsComms
|
||||||
|
|
|
@ -25,8 +25,10 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -37,23 +39,41 @@ using OpenSim.Services.Interfaces;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.Gestures
|
namespace OpenSim.Region.CoreModules.Avatar.Gestures
|
||||||
{
|
{
|
||||||
public class GesturesModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class GesturesModule : INonSharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
protected Scene m_scene;
|
protected Scene m_scene;
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
|
|
||||||
m_scene.EventManager.OnNewClient += OnNewClient;
|
m_scene.EventManager.OnNewClient += OnNewClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise() {}
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
if(m_scene == scene)
|
||||||
|
m_scene = null;
|
||||||
|
scene.EventManager.OnNewClient -= OnNewClient;
|
||||||
|
}
|
||||||
|
|
||||||
public void Close() {}
|
public void Close() {}
|
||||||
public string Name { get { return "Gestures Module"; } }
|
public string Name { get { return "Gestures Module"; } }
|
||||||
public bool IsSharedModule { get { return false; } }
|
|
||||||
|
|
||||||
private void OnNewClient(IClientAPI client)
|
private void OnNewClient(IClientAPI client)
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,7 +25,9 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -34,7 +36,8 @@ using OpenSim.Region.Framework.Interfaces;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.Gods
|
namespace OpenSim.Region.CoreModules.Avatar.Gods
|
||||||
{
|
{
|
||||||
public class GodsModule : IRegionModule, IGodsModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class GodsModule : INonSharedRegionModule, IGodsModule
|
||||||
{
|
{
|
||||||
/// <summary>Special UUID for actions that apply to all agents</summary>
|
/// <summary>Special UUID for actions that apply to all agents</summary>
|
||||||
private static readonly UUID ALL_AGENTS = new UUID("44e87126-e794-4ded-05b3-7c42da3d5cdb");
|
private static readonly UUID ALL_AGENTS = new UUID("44e87126-e794-4ded-05b3-7c42da3d5cdb");
|
||||||
|
@ -42,17 +45,34 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
|
||||||
protected Scene m_scene;
|
protected Scene m_scene;
|
||||||
protected IDialogModule m_dialogModule;
|
protected IDialogModule m_dialogModule;
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>();
|
m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>();
|
||||||
m_scene.RegisterModuleInterface<IGodsModule>(this);
|
m_scene.RegisterModuleInterface<IGodsModule>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise() {}
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
scene.UnregisterModuleInterface<IGodsModule>(this);
|
||||||
|
}
|
||||||
|
|
||||||
public void Close() {}
|
public void Close() {}
|
||||||
public string Name { get { return "Gods Module"; } }
|
public string Name { get { return "Gods Module"; } }
|
||||||
public bool IsSharedModule { get { return false; } }
|
|
||||||
|
|
||||||
public void RequestGodlikePowers(
|
public void RequestGodlikePowers(
|
||||||
UUID agentID, UUID sessionID, UUID token, bool godLike, IClientAPI controllingClient)
|
UUID agentID, UUID sessionID, UUID token, bool godLike, IClientAPI controllingClient)
|
||||||
|
|
|
@ -25,9 +25,11 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -36,7 +38,8 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.Groups
|
namespace OpenSim.Region.CoreModules.Avatar.Groups
|
||||||
{
|
{
|
||||||
public class GroupsModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class GroupsModule : ISharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log =
|
private static readonly ILog m_log =
|
||||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
@ -55,9 +58,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
|
||||||
private static GroupMembershipData osGroup =
|
private static GroupMembershipData osGroup =
|
||||||
new GroupMembershipData();
|
new GroupMembershipData();
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
IConfig groupsConfig = config.Configs["Groups"];
|
IConfig groupsConfig = config.Configs["Groups"];
|
||||||
|
|
||||||
|
@ -76,7 +79,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
|
||||||
if (groupsConfig.GetString("Module", "Default") != "Default")
|
if (groupsConfig.GetString("Module", "Default") != "Default")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
lock (m_SceneList)
|
lock (m_SceneList)
|
||||||
{
|
{
|
||||||
if (!m_SceneList.Contains(scene))
|
if (!m_SceneList.Contains(scene))
|
||||||
|
@ -99,6 +110,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
|
||||||
scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
|
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()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -123,11 +147,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
|
||||||
get { return "GroupsModule"; }
|
get { return "GroupsModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private void OnNewClient(IClientAPI client)
|
private void OnNewClient(IClientAPI client)
|
||||||
|
|
|
@ -24,9 +24,12 @@
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -36,7 +39,8 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
{
|
{
|
||||||
public class InstantMessageModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class InstantMessageModule : ISharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -47,11 +51,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
|
|
||||||
private readonly List<Scene> m_scenes = new List<Scene>();
|
private readonly List<Scene> m_scenes = new List<Scene>();
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
|
|
||||||
private IMessageTransferModule m_TransferModule = null;
|
private IMessageTransferModule m_TransferModule = null;
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
if (config.Configs["Messaging"] != null)
|
if (config.Configs["Messaging"] != null)
|
||||||
{
|
{
|
||||||
|
@ -62,7 +66,15 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
}
|
}
|
||||||
|
|
||||||
m_enabled = true;
|
m_enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
lock (m_scenes)
|
lock (m_scenes)
|
||||||
{
|
{
|
||||||
if (!m_scenes.Contains(scene))
|
if (!m_scenes.Contains(scene))
|
||||||
|
@ -74,6 +86,27 @@ 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)
|
void OnClientConnect(IClientCore client)
|
||||||
{
|
{
|
||||||
IClientIM clientIM;
|
IClientIM clientIM;
|
||||||
|
@ -85,15 +118,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
|
|
||||||
public void PostInitialise()
|
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()
|
public void Close()
|
||||||
|
@ -105,11 +129,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
get { return "InstantMessageModule"; }
|
get { return "InstantMessageModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public void OnInstantMessage(IClientAPI client, GridInstantMessage im)
|
public void OnInstantMessage(IClientAPI client, GridInstantMessage im)
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
@ -40,7 +41,8 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
{
|
{
|
||||||
public class MessageTransferModule : IRegionModule, IMessageTransferModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class MessageTransferModule : ISharedRegionModule, IMessageTransferModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -50,8 +52,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
protected Dictionary<UUID, ulong> m_UserRegionMap = new Dictionary<UUID, ulong>();
|
protected Dictionary<UUID, ulong> m_UserRegionMap = new Dictionary<UUID, ulong>();
|
||||||
|
|
||||||
public event UndeliveredMessage OnUndeliveredMessage;
|
public event UndeliveredMessage OnUndeliveredMessage;
|
||||||
|
private bool m_enabled = true;
|
||||||
|
|
||||||
public virtual void Initialise(Scene scene, IConfigSource config)
|
public virtual void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
IConfig cnf = config.Configs["Messaging"];
|
IConfig cnf = config.Configs["Messaging"];
|
||||||
if (cnf != null && cnf.GetString(
|
if (cnf != null && cnf.GetString(
|
||||||
|
@ -59,15 +62,23 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
"MessageTransferModule")
|
"MessageTransferModule")
|
||||||
{
|
{
|
||||||
m_log.Debug("[MESSAGE TRANSFER]: Disabled by configuration");
|
m_log.Debug("[MESSAGE TRANSFER]: Disabled by configuration");
|
||||||
return;
|
m_enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cnf = config.Configs["Startup"];
|
cnf = config.Configs["Startup"];
|
||||||
if (cnf != null)
|
if (cnf != null)
|
||||||
m_Gridmode = cnf.GetBoolean("gridmode", false);
|
m_Gridmode = cnf.GetBoolean("gridmode", false);
|
||||||
|
}
|
||||||
|
|
||||||
// m_Enabled = true;
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
|
if (m_enabled)
|
||||||
|
{
|
||||||
lock (m_Scenes)
|
lock (m_Scenes)
|
||||||
{
|
{
|
||||||
if (m_Scenes.Count == 0)
|
if (m_Scenes.Count == 0)
|
||||||
|
@ -81,6 +92,20 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
m_Scenes.Add(scene);
|
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()
|
public virtual void PostInitialise()
|
||||||
{
|
{
|
||||||
|
@ -95,11 +120,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
get { return "MessageTransferModule"; }
|
get { return "MessageTransferModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual void SendInstantMessage(GridInstantMessage im, MessageResultNotification result)
|
public virtual void SendInstantMessage(GridInstantMessage im, MessageResultNotification result)
|
||||||
{
|
{
|
||||||
UUID toAgentID = new UUID(im.toAgentID);
|
UUID toAgentID = new UUID(im.toAgentID);
|
||||||
|
|
|
@ -28,6 +28,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -39,7 +40,8 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.MuteList
|
namespace OpenSim.Region.CoreModules.Avatar.MuteList
|
||||||
{
|
{
|
||||||
public class MuteListModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class MuteListModule : ISharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -47,7 +49,7 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList
|
||||||
private List<Scene> m_SceneList = new List<Scene>();
|
private List<Scene> m_SceneList = new List<Scene>();
|
||||||
private string m_RestURL = String.Empty;
|
private string m_RestURL = String.Empty;
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
if (!enabled)
|
if (!enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -66,11 +68,6 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList
|
||||||
enabled = false;
|
enabled = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lock (m_SceneList)
|
|
||||||
{
|
|
||||||
if (m_SceneList.Count == 0)
|
|
||||||
{
|
|
||||||
m_RestURL = cnf.GetString("MuteListURL", "");
|
m_RestURL = cnf.GetString("MuteListURL", "");
|
||||||
if (m_RestURL == "")
|
if (m_RestURL == "")
|
||||||
{
|
{
|
||||||
|
@ -79,6 +76,16 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
|
lock (m_SceneList)
|
||||||
|
{
|
||||||
if (!m_SceneList.Contains(scene))
|
if (!m_SceneList.Contains(scene))
|
||||||
m_SceneList.Add(scene);
|
m_SceneList.Add(scene);
|
||||||
|
|
||||||
|
@ -86,6 +93,18 @@ 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()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
if (!enabled)
|
if (!enabled)
|
||||||
|
@ -102,11 +121,6 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList
|
||||||
get { return "MuteListModule"; }
|
get { return "MuteListModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -40,7 +41,8 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
{
|
{
|
||||||
public class OfflineMessageModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class OfflineMessageModule : ISharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -49,7 +51,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
private string m_RestURL = String.Empty;
|
private string m_RestURL = String.Empty;
|
||||||
private bool m_ForwardOfflineGroupMessages = true;
|
private bool m_ForwardOfflineGroupMessages = true;
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
if (!enabled)
|
if (!enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -83,14 +85,23 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
if (!m_SceneList.Contains(scene))
|
if (!m_SceneList.Contains(scene))
|
||||||
m_SceneList.Add(scene);
|
m_SceneList.Add(scene);
|
||||||
|
|
||||||
scene.EventManager.OnNewClient += OnNewClient;
|
scene.EventManager.OnNewClient += OnNewClient;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void PostInitialise()
|
public void RegionLoaded(Scene scene)
|
||||||
{
|
{
|
||||||
if (!enabled)
|
if (!enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -120,16 +131,22 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
m_log.Debug("[OFFLINE MESSAGING] Offline messages enabled");
|
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
|
public string Name
|
||||||
{
|
{
|
||||||
get { return "OfflineMessageModule"; }
|
get { return "OfflineMessageModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -162,6 +179,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RetrieveInstantMessages(IClientAPI client)
|
private void RetrieveInstantMessages(IClientAPI client)
|
||||||
|
{
|
||||||
|
if (m_RestURL != "")
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[OFFLINE MESSAGING] Retrieving stored messages for {0}", client.AgentId);
|
m_log.DebugFormat("[OFFLINE MESSAGING] Retrieving stored messages for {0}", client.AgentId);
|
||||||
|
|
||||||
|
|
|
@ -24,11 +24,14 @@
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
@ -39,7 +42,8 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
{
|
{
|
||||||
public class PresenceModule : IRegionModule, IPresenceModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class PresenceModule : ISharedRegionModule, IPresenceModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -59,7 +63,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
public event PresenceChange OnPresenceChange;
|
public event PresenceChange OnPresenceChange;
|
||||||
public event BulkPresenceData OnBulkPresenceData;
|
public event BulkPresenceData OnBulkPresenceData;
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
lock (m_Scenes)
|
lock (m_Scenes)
|
||||||
{
|
{
|
||||||
|
@ -78,15 +82,24 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
m_Gridmode = cnf.GetBoolean("gridmode", false);
|
m_Gridmode = cnf.GetBoolean("gridmode", false);
|
||||||
|
|
||||||
m_Enabled = true;
|
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)
|
if (m_Gridmode)
|
||||||
NotifyMessageServerOfStartup(scene);
|
NotifyMessageServerOfStartup(scene);
|
||||||
|
|
||||||
m_Scenes.Add(scene);
|
m_Scenes.Add(scene);
|
||||||
}
|
|
||||||
|
|
||||||
scene.RegisterModuleInterface<IPresenceModule>(this);
|
scene.RegisterModuleInterface<IPresenceModule>(this);
|
||||||
|
|
||||||
|
@ -94,12 +107,13 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
scene.EventManager.OnSetRootAgentScene += OnSetRootAgentScene;
|
scene.EventManager.OnSetRootAgentScene += OnSetRootAgentScene;
|
||||||
scene.EventManager.OnMakeChildAgent += OnMakeChildAgent;
|
scene.EventManager.OnMakeChildAgent += OnMakeChildAgent;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void RegionLoaded(Scene scene)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void RemoveRegion(Scene scene)
|
||||||
{
|
{
|
||||||
if (!m_Gridmode || !m_Enabled)
|
if (!m_Gridmode || !m_Enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -116,11 +130,23 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lock (m_Scenes)
|
|
||||||
{
|
|
||||||
foreach (Scene scene in m_Scenes)
|
|
||||||
NotifyMessageServerOfShutdown(scene);
|
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()
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Name
|
public string Name
|
||||||
|
@ -128,11 +154,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
get { return "PresenceModule"; }
|
get { return "PresenceModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RequestBulkPresenceData(UUID[] users)
|
public void RequestBulkPresenceData(UUID[] users)
|
||||||
{
|
{
|
||||||
if (OnBulkPresenceData != null)
|
if (OnBulkPresenceData != null)
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -41,10 +42,11 @@ using OpenSim.Services.Interfaces;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
{
|
{
|
||||||
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This module loads and saves OpenSimulator inventory archives
|
/// This module loads and saves OpenSimulator inventory archives
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class InventoryArchiverModule : IRegionModule, IInventoryArchiverModule
|
public class InventoryArchiverModule : ISharedRegionModule, IInventoryArchiverModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -82,7 +84,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
DisablePresenceChecks = disablePresenceChecks;
|
DisablePresenceChecks = disablePresenceChecks;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
if (m_scenes.Count == 0)
|
if (m_scenes.Count == 0)
|
||||||
{
|
{
|
||||||
|
@ -105,6 +117,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
m_scenes[scene.RegionInfo.RegionID] = 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 PostInitialise() {}
|
||||||
|
|
||||||
public void Close() {}
|
public void Close() {}
|
||||||
|
|
|
@ -29,6 +29,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -39,7 +40,8 @@ using OpenSim.Services.Interfaces;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
{
|
{
|
||||||
public class InventoryTransferModule : IInventoryTransferModule, IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class InventoryTransferModule : IInventoryTransferModule, ISharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log
|
private static readonly ILog m_log
|
||||||
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
@ -50,10 +52,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
new Dictionary<UUID, Scene>();
|
new Dictionary<UUID, Scene>();
|
||||||
|
|
||||||
private IMessageTransferModule m_TransferModule = null;
|
private IMessageTransferModule m_TransferModule = null;
|
||||||
|
private bool m_enabled = true;
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
if (config.Configs["Messaging"] != null)
|
if (config.Configs["Messaging"] != null)
|
||||||
{
|
{
|
||||||
|
@ -62,9 +65,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
if (config.Configs["Messaging"].GetString(
|
if (config.Configs["Messaging"].GetString(
|
||||||
"InventoryTransferModule", "InventoryTransferModule") !=
|
"InventoryTransferModule", "InventoryTransferModule") !=
|
||||||
"InventoryTransferModule")
|
"InventoryTransferModule")
|
||||||
return;
|
m_enabled = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
@ -76,8 +89,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
|
scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
if (m_enabled)
|
||||||
{
|
{
|
||||||
if (m_Scenelist.Count > 0)
|
if (m_Scenelist.Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -86,6 +102,23 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only");
|
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()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,6 +29,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -37,24 +38,37 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.Lure
|
namespace OpenSim.Region.CoreModules.Avatar.Lure
|
||||||
{
|
{
|
||||||
public class LureModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class LureModule : ISharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private readonly List<Scene> m_scenes = new List<Scene>();
|
private readonly List<Scene> m_scenes = new List<Scene>();
|
||||||
|
|
||||||
|
private bool m_enabled = true;
|
||||||
|
|
||||||
private IMessageTransferModule m_TransferModule = null;
|
private IMessageTransferModule m_TransferModule = null;
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
if (config.Configs["Messaging"] != null)
|
if (config.Configs["Messaging"] != null)
|
||||||
{
|
{
|
||||||
if (config.Configs["Messaging"].GetString(
|
if (config.Configs["Messaging"].GetString(
|
||||||
"LureModule", "LureModule") !=
|
"LureModule", "LureModule") !=
|
||||||
"LureModule")
|
"LureModule")
|
||||||
return;
|
m_enabled = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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))
|
||||||
|
@ -66,6 +80,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
void OnNewClient(IClientAPI client)
|
||||||
{
|
{
|
||||||
|
@ -76,12 +113,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
|
||||||
|
|
||||||
public void PostInitialise()
|
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()
|
public void Close()
|
||||||
|
|
|
@ -29,6 +29,7 @@ using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
|
@ -41,24 +42,54 @@ using Caps=OpenSim.Framework.Capabilities.Caps;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
||||||
{
|
{
|
||||||
public class ObjectAdd : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class ObjectAdd : ISharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log =
|
private static readonly ILog m_log =
|
||||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene pScene, IConfigSource pSource)
|
public void Initialise(IConfigSource pSource)
|
||||||
{
|
{
|
||||||
m_scene = pScene;
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
|
m_scene = scene;
|
||||||
m_scene.EventManager.OnRegisterCaps += RegisterCaps;
|
m_scene.EventManager.OnRegisterCaps += RegisterCaps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
scene.EventManager.OnRegisterCaps -= RegisterCaps;
|
||||||
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Name
|
||||||
|
{
|
||||||
|
get { return "ObjectAddModule"; }
|
||||||
|
}
|
||||||
|
|
||||||
public void RegisterCaps(UUID agentID, Caps caps)
|
public void RegisterCaps(UUID agentID, Caps caps)
|
||||||
{
|
{
|
||||||
UUID capuuid = UUID.Random();
|
UUID capuuid = UUID.Random();
|
||||||
|
@ -348,22 +379,6 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
|
||||||
Array.Reverse(resultbytes);
|
Array.Reverse(resultbytes);
|
||||||
return String.Format("<binary encoding=\"base64\">{0}</binary>",Convert.ToBase64String(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
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System.Collections;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -38,20 +39,17 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.Profiles
|
namespace OpenSim.Region.CoreModules.Avatar.Profiles
|
||||||
{
|
{
|
||||||
public class AvatarProfilesModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class AvatarProfilesModule : INonSharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
private IProfileModule m_profileModule = null;
|
private IProfileModule m_profileModule = null;
|
||||||
private bool m_enabled = true;
|
private bool m_enabled = true;
|
||||||
|
|
||||||
public AvatarProfilesModule()
|
#region INonSharedRegionModule Members
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#region IRegionModule Members
|
public void Initialise(IConfigSource config)
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
|
||||||
{
|
{
|
||||||
IConfig profileConfig = config.Configs["Profile"];
|
IConfig profileConfig = config.Configs["Profile"];
|
||||||
if (profileConfig != null)
|
if (profileConfig != null)
|
||||||
|
@ -62,18 +60,31 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
m_scene.EventManager.OnNewClient += NewClient;
|
m_scene.EventManager.OnNewClient += NewClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void RegionLoaded(Scene scene)
|
||||||
{
|
{
|
||||||
if (!m_enabled)
|
if (!m_enabled)
|
||||||
return;
|
return;
|
||||||
m_profileModule = m_scene.RequestModuleInterface<IProfileModule>();
|
m_profileModule = m_scene.RequestModuleInterface<IProfileModule>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
scene.EventManager.OnNewClient -= NewClient;
|
||||||
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -83,11 +94,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
|
||||||
get { return "AvatarProfilesModule"; }
|
get { return "AvatarProfilesModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public void NewClient(IClientAPI client)
|
public void NewClient(IClientAPI client)
|
||||||
|
|
|
@ -32,6 +32,7 @@ using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.Packets;
|
using OpenMetaverse.Packets;
|
||||||
|
@ -52,11 +53,13 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||||
public OSDMap body;
|
public OSDMap body;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EventQueueGetModule : IEventQueue, IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class EventQueueGetModule : IEventQueue, INonSharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
protected Scene m_scene = null;
|
protected Scene m_scene = null;
|
||||||
private IConfigSource m_gConfig;
|
private IConfigSource m_gConfig;
|
||||||
|
private IConfig m_startupConfig;
|
||||||
bool enabledYN = false;
|
bool enabledYN = false;
|
||||||
|
|
||||||
private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
|
private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
|
||||||
|
@ -65,14 +68,22 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||||
private Dictionary<UUID, UUID> m_QueueUUIDAvatarMapping = new Dictionary<UUID, UUID>();
|
private Dictionary<UUID, UUID> m_QueueUUIDAvatarMapping = new Dictionary<UUID, UUID>();
|
||||||
private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>();
|
private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>();
|
||||||
|
|
||||||
#region IRegionModule methods
|
#region INonSharedRegionModule methods
|
||||||
public virtual void Initialise(Scene scene, IConfigSource config)
|
public virtual void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
m_gConfig = config;
|
m_gConfig = config;
|
||||||
|
|
||||||
IConfig startupConfig = m_gConfig.Configs["Startup"];
|
m_startupConfig = m_gConfig.Configs["Startup"];
|
||||||
|
}
|
||||||
|
|
||||||
ReadConfigAndPopulate(scene, startupConfig, "Startup");
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
|
ReadConfigAndPopulate(scene, m_startupConfig, "Startup");
|
||||||
|
|
||||||
if (enabledYN)
|
if (enabledYN)
|
||||||
{
|
{
|
||||||
|
@ -99,7 +110,14 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||||
{
|
{
|
||||||
m_gConfig = null;
|
m_gConfig = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p)
|
private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p)
|
||||||
|
@ -107,10 +125,6 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||||
enabledYN = startupConfig.GetBoolean("EventQueue", true);
|
enabledYN = startupConfig.GetBoolean("EventQueue", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual void Close()
|
public virtual void Close()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -120,10 +134,6 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||||
get { return "EventQueueGetModule"; }
|
get { return "EventQueueGetModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -25,10 +25,12 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -39,7 +41,8 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Framework.Monitoring
|
namespace OpenSim.Region.CoreModules.Framework.Monitoring
|
||||||
{
|
{
|
||||||
public class MonitorModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class MonitorModule : INonSharedRegionModule
|
||||||
{
|
{
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
private readonly List<IMonitor> m_monitors = new List<IMonitor>();
|
private readonly List<IMonitor> m_monitors = new List<IMonitor>();
|
||||||
|
@ -62,9 +65,19 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Implementation of IRegionModule
|
#region Implementation of INonSharedRegionModule
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
|
|
||||||
|
@ -77,6 +90,51 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
|
||||||
MainServer.Instance.AddHTTPHandler("/monitorstats/" + m_scene.RegionInfo.RegionID + "/", StatsPage);
|
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)
|
public Hashtable StatsPage(Hashtable request)
|
||||||
{
|
{
|
||||||
// If request was for a specific monitor
|
// If request was for a specific monitor
|
||||||
|
@ -132,49 +190,10 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
|
||||||
return ereply;
|
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)
|
void OnTriggerAlert(System.Type reporter, string reason, bool fatal)
|
||||||
{
|
{
|
||||||
m_log.Error("[Monitor] " + reporter.Name + " for " + m_scene.RegionInfo.RegionName + " reports " + reason + " (Fatal: " + 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
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
|
@ -32,6 +32,7 @@ using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
|
@ -46,7 +47,8 @@ using OpenSim.Region.Framework.Interfaces;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Hypergrid
|
namespace OpenSim.Region.CoreModules.Hypergrid
|
||||||
{
|
{
|
||||||
public class HGStandaloneLoginModule : IRegionModule, ILoginServiceToRegionsConnector
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class HGStandaloneLoginModule : ISharedRegionModule, ILoginServiceToRegionsConnector
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -56,32 +58,43 @@ namespace OpenSim.Region.CoreModules.Hypergrid
|
||||||
protected bool m_enabled = false; // Module is only enabled if running in standalone mode
|
protected bool m_enabled = false; // Module is only enabled if running in standalone mode
|
||||||
|
|
||||||
protected HGLoginAuthService m_loginService;
|
protected HGLoginAuthService m_loginService;
|
||||||
|
private bool authenticate = true;
|
||||||
|
private string welcomeMessage = "Welcome to OpenSim";
|
||||||
|
private IConfig startupConfig;
|
||||||
|
private IConfig standaloneConfig;
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
if (m_firstScene == null)
|
startupConfig = source.Configs["Startup"];
|
||||||
{
|
standaloneConfig = source.Configs["StandAlone"];
|
||||||
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)
|
if (standaloneConfig != null)
|
||||||
{
|
{
|
||||||
authenticate = standaloneConfig.GetBoolean("accounts_authenticate", true);
|
authenticate = standaloneConfig.GetBoolean("accounts_authenticate", true);
|
||||||
welcomeMessage = standaloneConfig.GetString("welcome_message");
|
welcomeMessage = standaloneConfig.GetString("welcome_message");
|
||||||
}
|
}
|
||||||
|
m_enabled = !startupConfig.GetBoolean("gridmode", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
if (m_firstScene == null)
|
||||||
|
{
|
||||||
|
m_firstScene = scene;
|
||||||
|
|
||||||
|
if (m_enabled)
|
||||||
|
{
|
||||||
|
m_log.Debug("[HGLogin]: HGlogin module enabled");
|
||||||
|
|
||||||
//TODO: fix casting.
|
//TODO: fix casting.
|
||||||
LibraryRootFolder rootFolder = m_firstScene.CommsManager.UserProfileCacheService.LibraryRoot as LibraryRootFolder;
|
LibraryRootFolder rootFolder = m_firstScene.CommsManager.UserProfileCacheService.LibraryRoot as LibraryRootFolder;
|
||||||
|
@ -113,6 +126,19 @@ 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()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -128,11 +154,6 @@ namespace OpenSim.Region.CoreModules.Hypergrid
|
||||||
get { return "HGStandaloneLoginModule"; }
|
get { return "HGStandaloneLoginModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
protected void AddScene(Scene scene)
|
protected void AddScene(Scene scene)
|
||||||
|
|
|
@ -32,6 +32,7 @@ using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
@ -42,7 +43,8 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.InterGrid
|
namespace OpenSim.Region.CoreModules.InterGrid
|
||||||
{
|
{
|
||||||
public class OGSRadmin : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class OGSRadmin : ISharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
private readonly List<Scene> m_scenes = new List<Scene>();
|
private readonly List<Scene> m_scenes = new List<Scene>();
|
||||||
|
@ -56,7 +58,6 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
||||||
get { return "OGS Supporting RAdmin"; }
|
get { return "OGS Supporting RAdmin"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
m_settings = source;
|
m_settings = source;
|
||||||
|
@ -67,6 +68,11 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
public void AddRegion(Scene scene)
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
lock (m_scenes)
|
lock (m_scenes)
|
||||||
|
@ -77,14 +83,10 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
||||||
{
|
{
|
||||||
lock (m_scenes)
|
lock (m_scenes)
|
||||||
m_scenes.Remove(scene);
|
m_scenes.Remove(scene);
|
||||||
|
MainServer.Instance.RemoveXmlRPCHandler("grid_message");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegionLoaded(Scene scene)
|
public void RegionLoaded(Scene scene)
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PostInitialise()
|
|
||||||
{
|
{
|
||||||
if (m_settings.Configs["Startup"].GetBoolean("gridmode", false))
|
if (m_settings.Configs["Startup"].GetBoolean("gridmode", false))
|
||||||
{
|
{
|
||||||
|
@ -93,21 +95,8 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
public void PostInitialise()
|
||||||
|
|
||||||
#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
|
#endregion
|
||||||
|
|
|
@ -35,6 +35,7 @@ using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
|
@ -76,7 +77,8 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
||||||
public string teleported_into_region;
|
public string teleported_into_region;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class OpenGridProtocolModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class OpenGridProtocolModule : ISharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
private List<Scene> m_scene = new List<Scene>();
|
private List<Scene> m_scene = new List<Scene>();
|
||||||
|
@ -92,21 +94,22 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
||||||
private bool httpSSL = false;
|
private bool httpSSL = false;
|
||||||
private uint httpsslport = 0;
|
private uint httpsslport = 0;
|
||||||
private bool GridMode = false;
|
private bool GridMode = false;
|
||||||
|
private bool m_enabled = false;
|
||||||
|
private IConfig cfg = null;
|
||||||
|
private IConfig httpcfg = null;
|
||||||
|
private IConfig startupcfg = null;
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
bool enabled = false;
|
|
||||||
IConfig cfg = null;
|
|
||||||
IConfig httpcfg = null;
|
|
||||||
IConfig startupcfg = null;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
cfg = config.Configs["OpenGridProtocol"];
|
cfg = config.Configs["OpenGridProtocol"];
|
||||||
} catch (NullReferenceException)
|
}
|
||||||
|
catch (NullReferenceException)
|
||||||
{
|
{
|
||||||
enabled = false;
|
m_enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -128,15 +131,15 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
||||||
|
|
||||||
if (startupcfg != null)
|
if (startupcfg != null)
|
||||||
{
|
{
|
||||||
GridMode = enabled = startupcfg.GetBoolean("gridmode", false);
|
GridMode = m_enabled = startupcfg.GetBoolean("gridmode", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfg != null)
|
if (cfg != null)
|
||||||
{
|
{
|
||||||
enabled = cfg.GetBoolean("ogp_enabled", false);
|
m_enabled = cfg.GetBoolean("ogp_enabled", false);
|
||||||
LastNameSuffix = cfg.GetString("ogp_lastname_suffix", "_EXTERNAL");
|
LastNameSuffix = cfg.GetString("ogp_lastname_suffix", "_EXTERNAL");
|
||||||
FirstNamePrefix = cfg.GetString("ogp_firstname_prefix", "");
|
FirstNamePrefix = cfg.GetString("ogp_firstname_prefix", "");
|
||||||
if (enabled)
|
if (m_enabled)
|
||||||
{
|
{
|
||||||
m_log.Warn("[OGP]: Open Grid Protocol is on, Listening for Clients on /agent/");
|
m_log.Warn("[OGP]: Open Grid Protocol is on, Listening for Clients on /agent/");
|
||||||
lock (m_scene)
|
lock (m_scene)
|
||||||
|
@ -165,20 +168,20 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// 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)
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
{
|
{
|
||||||
MainServer.Instance.AddLLSDHandler(
|
get { return null; }
|
||||||
"/" + HttpUtility.UrlPathEncode(scene.RegionInfo.RegionName.ToLower()),
|
|
||||||
ProcessRegionDomainSeed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_scene.Contains(scene))
|
public void AddRegion(Scene scene)
|
||||||
m_scene.Add(scene);
|
{
|
||||||
}
|
if (m_enabled)
|
||||||
}
|
{
|
||||||
}
|
|
||||||
lock (m_scene)
|
lock (m_scene)
|
||||||
{
|
{
|
||||||
if (m_scene.Count == 1)
|
if (m_scene.Count == 1)
|
||||||
|
@ -193,6 +196,32 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 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()
|
public void PostInitialise()
|
||||||
|
@ -209,11 +238,6 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
||||||
get { return "OpenGridProtocolModule"; }
|
get { return "OpenGridProtocolModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public OSD ProcessRegionDomainSeed(string path, OSD request, string endpoint)
|
public OSD ProcessRegionDomainSeed(string path, OSD request, string endpoint)
|
||||||
|
|
|
@ -29,6 +29,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.Imaging;
|
using OpenMetaverse.Imaging;
|
||||||
|
@ -40,7 +41,8 @@ using System.Reflection;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
||||||
{
|
{
|
||||||
public class DynamicTextureModule : IRegionModule, IDynamicTextureManager
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class DynamicTextureModule : ISharedRegionModule, IDynamicTextureManager
|
||||||
{
|
{
|
||||||
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -210,9 +212,14 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
|
if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
|
||||||
{
|
{
|
||||||
|
@ -221,6 +228,24 @@ 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()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -234,11 +259,6 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
||||||
get { return "DynamicTextureModule"; }
|
get { return "DynamicTextureModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Nested type: DynamicTextureUpdater
|
#region Nested type: DynamicTextureUpdater
|
||||||
|
|
|
@ -32,6 +32,7 @@ using System.Text.RegularExpressions;
|
||||||
using DotNetOpenMail;
|
using DotNetOpenMail;
|
||||||
using DotNetOpenMail.SmtpAuth;
|
using DotNetOpenMail.SmtpAuth;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -40,6 +41,7 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||||
{
|
{
|
||||||
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
public class EmailModule : IEmailModule
|
public class EmailModule : IEmailModule
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
@ -94,7 +96,7 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
m_Config = config;
|
m_Config = config;
|
||||||
IConfig SMTPConfig;
|
IConfig SMTPConfig;
|
||||||
|
@ -136,7 +138,16 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||||
m_Enabled = false;
|
m_Enabled = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
m_log.Info("[EMAIL] Activated DefaultEmailModule");
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
// It's a go!
|
// It's a go!
|
||||||
if (m_Enabled)
|
if (m_Enabled)
|
||||||
{
|
{
|
||||||
|
@ -155,8 +166,20 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||||
m_Scenes.Add(scene.RegionInfo.RegionHandle, scene);
|
m_Scenes.Add(scene.RegionInfo.RegionHandle, scene);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_log.Info("[EMAIL] Activated DefaultEmailModule");
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,11 +196,6 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||||
get { return "DefaultEmailModule"; }
|
get { return "DefaultEmailModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delay function using thread in seconds
|
/// Delay function using thread in seconds
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -31,6 +31,7 @@ using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -84,7 +85,8 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||||
{
|
{
|
||||||
public class HttpRequestModule : IRegionModule, IHttpRequestModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class HttpRequestModule : ISharedRegionModule, IHttpRequestModule
|
||||||
{
|
{
|
||||||
private object HttpListLock = new object();
|
private object HttpListLock = new object();
|
||||||
private int httpTimeout = 30000;
|
private int httpTimeout = 30000;
|
||||||
|
@ -229,20 +231,37 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
|
||||||
|
|
||||||
m_scene.RegisterModuleInterface<IHttpRequestModule>(this);
|
|
||||||
|
|
||||||
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
||||||
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
||||||
|
|
||||||
m_pendingRequests = new Dictionary<UUID, HttpRequestClass>();
|
m_pendingRequests = new Dictionary<UUID, HttpRequestClass>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
|
m_scene = scene;
|
||||||
|
|
||||||
|
m_scene.RegisterModuleInterface<IHttpRequestModule>(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
scene.UnregisterModuleInterface<IHttpRequestModule>(this);
|
||||||
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -256,11 +275,6 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||||
get { return m_name; }
|
get { return m_name; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,6 +126,8 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
|
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
scene.UnregisterModuleInterface<IUrlModule>(this);
|
||||||
|
scene.EventManager.OnScriptReset -= OnScriptReset;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
|
|
|
@ -29,6 +29,7 @@ using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.Imaging;
|
using OpenMetaverse.Imaging;
|
||||||
|
@ -39,7 +40,8 @@ using System.Reflection;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||||
{
|
{
|
||||||
public class LoadImageURLModule : IRegionModule, IDynamicTextureRender
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class LoadImageURLModule : ISharedRegionModule, IDynamicTextureRender
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -97,20 +99,28 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
|
{
|
||||||
|
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
||||||
|
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
if (m_scene == null)
|
if (m_scene == null)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
|
||||||
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
{
|
{
|
||||||
m_textureManager = m_scene.RequestModuleInterface<IDynamicTextureManager>();
|
m_textureManager = m_scene.RequestModuleInterface<IDynamicTextureManager>();
|
||||||
if (m_textureManager != null)
|
if (m_textureManager != null)
|
||||||
|
@ -119,6 +129,14 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PostInitialise()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -128,11 +146,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||||
get { return m_name; }
|
get { return m_name; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private void MakeHttpRequest(string url, UUID requestID)
|
private void MakeHttpRequest(string url, UUID requestID)
|
||||||
|
|
|
@ -31,6 +31,7 @@ using System.Drawing.Imaging;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.Imaging;
|
using OpenMetaverse.Imaging;
|
||||||
|
@ -43,7 +44,8 @@ using System.Reflection;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||||
{
|
{
|
||||||
public class VectorRenderModule : IRegionModule, IDynamicTextureRender
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class VectorRenderModule : ISharedRegionModule, IDynamicTextureRender
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -110,15 +112,10 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
if (m_scene == null)
|
|
||||||
{
|
|
||||||
m_scene = scene;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_graph == null)
|
if (m_graph == null)
|
||||||
{
|
{
|
||||||
Bitmap bitmap = new Bitmap(1024, 1024, PixelFormat.Format32bppArgb);
|
Bitmap bitmap = new Bitmap(1024, 1024, PixelFormat.Format32bppArgb);
|
||||||
|
@ -133,7 +130,20 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||||
m_log.DebugFormat("[VECTORRENDERMODULE]: using font \"{0}\" for text rendering.", m_fontName);
|
m_log.DebugFormat("[VECTORRENDERMODULE]: using font \"{0}\" for text rendering.", m_fontName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
|
if (m_scene == null)
|
||||||
|
{
|
||||||
|
m_scene = scene;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
{
|
{
|
||||||
m_textureManager = m_scene.RequestModuleInterface<IDynamicTextureManager>();
|
m_textureManager = m_scene.RequestModuleInterface<IDynamicTextureManager>();
|
||||||
if (m_textureManager != null)
|
if (m_textureManager != null)
|
||||||
|
@ -142,6 +152,14 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PostInitialise()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -151,11 +169,6 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||||
get { return m_name; }
|
get { return m_name; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private void Draw(string data, UUID id, string extraParams)
|
private void Draw(string data, UUID id, string extraParams)
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -85,7 +86,8 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
||||||
{
|
{
|
||||||
public class WorldCommModule : IRegionModule, IWorldComm
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class WorldCommModule : INonSharedRegionModule, IWorldComm
|
||||||
{
|
{
|
||||||
// private static readonly ILog m_log =
|
// private static readonly ILog m_log =
|
||||||
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
@ -98,9 +100,9 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
||||||
private int m_saydistance = 30;
|
private int m_saydistance = 30;
|
||||||
private int m_shoutdistance = 100;
|
private int m_shoutdistance = 100;
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
// wrap this in a try block so that defaults will work if
|
// wrap this in a try block so that defaults will work if
|
||||||
// the config file doesn't specify otherwise.
|
// the config file doesn't specify otherwise.
|
||||||
|
@ -120,17 +122,33 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
||||||
if (maxlisteners < 1) maxlisteners = int.MaxValue;
|
if (maxlisteners < 1) maxlisteners = int.MaxValue;
|
||||||
if (maxhandles < 1) maxhandles = int.MaxValue;
|
if (maxhandles < 1) maxhandles = int.MaxValue;
|
||||||
|
|
||||||
m_scene = scene;
|
|
||||||
m_scene.RegisterModuleInterface<IWorldComm>(this);
|
|
||||||
m_listenerManager = new ListenerManager(maxlisteners, maxhandles);
|
m_listenerManager = new ListenerManager(maxlisteners, maxhandles);
|
||||||
m_scene.EventManager.OnChatFromClient += DeliverClientMessage;
|
|
||||||
m_scene.EventManager.OnChatBroadcast += DeliverClientMessage;
|
|
||||||
m_pendingQ = new Queue();
|
m_pendingQ = new Queue();
|
||||||
m_pending = Queue.Synchronized(m_pendingQ);
|
m_pending = Queue.Synchronized(m_pendingQ);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
m_scene = scene;
|
||||||
|
m_scene.RegisterModuleInterface<IWorldComm>(this);
|
||||||
|
m_scene.EventManager.OnChatFromClient += DeliverClientMessage;
|
||||||
|
m_scene.EventManager.OnChatBroadcast += DeliverClientMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
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()
|
public void Close()
|
||||||
|
@ -142,11 +160,6 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
||||||
get { return "WorldCommModule"; }
|
get { return "WorldCommModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IWorldComm Members
|
#region IWorldComm Members
|
||||||
|
|
|
@ -32,6 +32,7 @@ using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
@ -76,7 +77,8 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
||||||
{
|
{
|
||||||
public class XMLRPCModule : IRegionModule, IXMLRPC
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class XMLRPCModule : ISharedRegionModule, IXMLRPC
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -94,9 +96,9 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
||||||
private int RemoteReplyScriptWait = 300;
|
private int RemoteReplyScriptWait = 300;
|
||||||
private object XMLRPCListLock = new object();
|
private object XMLRPCListLock = new object();
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
// We need to create these early because the scripts might be calling
|
// 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
|
// But since this gets called for every region, we need to make sure they
|
||||||
|
@ -116,7 +118,14 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PostInitialise()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
if (!m_scenes.Contains(scene))
|
if (!m_scenes.Contains(scene))
|
||||||
{
|
{
|
||||||
m_scenes.Add(scene);
|
m_scenes.Add(scene);
|
||||||
|
@ -125,7 +134,12 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
private Dictionary<Scene, BaseHttpServer> m_HttpServers = new Dictionary<Scene, BaseHttpServer>();
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
{
|
{
|
||||||
if (IsEnabled())
|
if (IsEnabled())
|
||||||
{
|
{
|
||||||
|
@ -136,6 +150,28 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
||||||
BaseHttpServer httpServer = new BaseHttpServer((uint)m_remoteDataPort);
|
BaseHttpServer httpServer = new BaseHttpServer((uint)m_remoteDataPort);
|
||||||
httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData);
|
httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData);
|
||||||
httpServer.Start();
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,11 +184,6 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
||||||
get { return m_name; }
|
get { return m_name; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public int Port
|
public int Port
|
||||||
{
|
{
|
||||||
get { return m_remoteDataPort; }
|
get { return m_remoteDataPort; }
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset
|
||||||
private IConfigSource m_Config;
|
private IConfigSource m_Config;
|
||||||
bool m_Registered = false;
|
bool m_Registered = false;
|
||||||
|
|
||||||
#region IRegionModule interface
|
#region ISharedRegionModule interface
|
||||||
|
|
||||||
public void Initialise(IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid
|
||||||
bool m_Registered = false;
|
bool m_Registered = false;
|
||||||
HypergridServiceInConnector m_HypergridHandler;
|
HypergridServiceInConnector m_HypergridHandler;
|
||||||
|
|
||||||
#region IRegionModule interface
|
#region ISharedRegionModule interface
|
||||||
|
|
||||||
public void Initialise(IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory
|
||||||
private IConfigSource m_Config;
|
private IConfigSource m_Config;
|
||||||
bool m_Registered = false;
|
bool m_Registered = false;
|
||||||
|
|
||||||
#region IRegionModule interface
|
#region ISharedRegionModule interface
|
||||||
|
|
||||||
public void Initialise(IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land
|
||||||
private IConfigSource m_Config;
|
private IConfigSource m_Config;
|
||||||
private List<Scene> m_Scenes = new List<Scene>();
|
private List<Scene> m_Scenes = new List<Scene>();
|
||||||
|
|
||||||
#region IRegionModule interface
|
#region ISharedRegionModule interface
|
||||||
|
|
||||||
public void Initialise(IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Neighbour
|
||||||
private IConfigSource m_Config;
|
private IConfigSource m_Config;
|
||||||
private List<Scene> m_Scenes = new List<Scene>();
|
private List<Scene> m_Scenes = new List<Scene>();
|
||||||
|
|
||||||
#region IRegionModule interface
|
#region ISharedRegionModule interface
|
||||||
|
|
||||||
public void Initialise(IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Simulation
|
||||||
private IConfigSource m_Config;
|
private IConfigSource m_Config;
|
||||||
bool m_Registered = false;
|
bool m_Registered = false;
|
||||||
|
|
||||||
#region IRegionModule interface
|
#region ISharedRegionModule interface
|
||||||
|
|
||||||
public void Initialise(IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
|
||||||
|
|
||||||
#endregion /* Events */
|
#endregion /* Events */
|
||||||
|
|
||||||
#region IRegionModule
|
#region ISharedRegionModule
|
||||||
|
|
||||||
public void Initialise(IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
|
@ -136,7 +136,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion /* IRegionModule */
|
#endregion
|
||||||
|
|
||||||
#region IInterregionComms
|
#region IInterregionComms
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
|
||||||
protected bool m_safemode;
|
protected bool m_safemode;
|
||||||
protected IPAddress m_thisIP;
|
protected IPAddress m_thisIP;
|
||||||
|
|
||||||
#region IRegionModule
|
#region ISharedRegionModule
|
||||||
|
|
||||||
public virtual void Initialise(IConfigSource config)
|
public virtual void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
|
@ -149,7 +149,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
|
||||||
MainServer.Instance.AddHTTPHandler("/object/", ObjectHandler);
|
MainServer.Instance.AddHTTPHandler("/object/", ObjectHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion /* IRegionModule */
|
#endregion
|
||||||
|
|
||||||
#region IInterregionComms
|
#region IInterregionComms
|
||||||
|
|
||||||
|
|
|
@ -424,6 +424,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
currentRegionSettings.WaterHeight = loadedRegionSettings.WaterHeight;
|
currentRegionSettings.WaterHeight = loadedRegionSettings.WaterHeight;
|
||||||
|
|
||||||
IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>();
|
IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>();
|
||||||
|
|
||||||
|
if (estateModule != null)
|
||||||
estateModule.sendRegionHandshakeToAll();
|
estateModule.sendRegionHandshakeToAll();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -81,6 +81,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
|
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
scene.UnregisterModuleInterface<IRegionArchiverModule>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
|
|
|
@ -36,6 +36,7 @@ using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
using OpenSim.Framework.Communications.Cache;
|
||||||
using OpenSim.Framework.Serialization;
|
using OpenSim.Framework.Serialization;
|
||||||
|
using OpenSim.Framework.Serialization.External;
|
||||||
using OpenSim.Region.CoreModules.World.Serialiser;
|
using OpenSim.Region.CoreModules.World.Serialiser;
|
||||||
using OpenSim.Region.CoreModules.World.Terrain;
|
using OpenSim.Region.CoreModules.World.Terrain;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
@ -234,6 +235,45 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
UUID.Zero, shape, groupPosition, rotationOffset, offsetPosition);
|
UUID.Zero, shape, groupPosition, rotationOffset, offsetPosition);
|
||||||
part1.Name = part1Name;
|
part1.Name = part1Name;
|
||||||
SceneObjectGroup object1 = new SceneObjectGroup(part1);
|
SceneObjectGroup object1 = new SceneObjectGroup(part1);
|
||||||
|
|
||||||
|
// Let's put some inventory items into our object
|
||||||
|
UUID soundItemUuid = UUID.Parse("00000000-0000-0000-0000-000000000002");
|
||||||
|
Type type = GetType();
|
||||||
|
Assembly assembly = type.Assembly;
|
||||||
|
string soundDataResourceName = null;
|
||||||
|
string[] names = assembly.GetManifestResourceNames();
|
||||||
|
foreach (string name in names)
|
||||||
|
{
|
||||||
|
if (name.EndsWith(".Resources.test-sound.wav"))
|
||||||
|
soundDataResourceName = name;
|
||||||
|
}
|
||||||
|
Assert.That(soundDataResourceName, Is.Not.Null);
|
||||||
|
|
||||||
|
byte[] soundData;
|
||||||
|
Console.WriteLine("Loading " + soundDataResourceName);
|
||||||
|
using (Stream resource = assembly.GetManifestResourceStream(soundDataResourceName))
|
||||||
|
{
|
||||||
|
using (BinaryReader br = new BinaryReader(resource))
|
||||||
|
{
|
||||||
|
// FIXME: Use the inspector insteadthere are so many forums and lists already, though admittedly none of them are suitable for cross virtual-enivornemnt discussion
|
||||||
|
soundData = br.ReadBytes(99999999);
|
||||||
|
UUID soundUuid = UUID.Parse("00000000-0000-0000-0000-000000000001");
|
||||||
|
string soundAssetFileName
|
||||||
|
= ArchiveConstants.ASSETS_PATH + soundUuid
|
||||||
|
+ ArchiveConstants.ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.SoundWAV];
|
||||||
|
tar.WriteFile(soundAssetFileName, soundData);
|
||||||
|
|
||||||
|
/*
|
||||||
|
AssetBase soundAsset = AssetHelpers.CreateAsset(soundUuid, soundData);
|
||||||
|
scene.AssetService.Store(soundAsset);
|
||||||
|
asset1FileName = ArchiveConstants.ASSETS_PATH + soundUuid + ".wav";
|
||||||
|
*/
|
||||||
|
|
||||||
|
TaskInventoryItem item1 = new TaskInventoryItem { AssetID = soundUuid, ItemID = soundItemUuid };
|
||||||
|
part1.Inventory.AddInventoryItem(item1, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
scene.AddNewSceneObject(object1, false);
|
scene.AddNewSceneObject(object1, false);
|
||||||
|
|
||||||
string object1FileName = string.Format(
|
string object1FileName = string.Format(
|
||||||
|
@ -265,10 +305,116 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
Assert.That(
|
Assert.That(
|
||||||
object1PartLoaded.OffsetPosition, Is.EqualTo(offsetPosition), "object1 offset position not equal");
|
object1PartLoaded.OffsetPosition, Is.EqualTo(offsetPosition), "object1 offset position not equal");
|
||||||
|
|
||||||
|
// Need to implement a method to get the task inventory item by name (since the uuid will have changed on load)
|
||||||
|
/*
|
||||||
|
TaskInventoryItem loadedSoundItem = object1PartLoaded.Inventory.GetInventoryItem(soundItemUuid);
|
||||||
|
Assert.That(loadedSoundItem, Is.Not.Null, "loaded sound item was null");
|
||||||
|
AssetBase loadedSoundAsset = scene.AssetService.Get(loadedSoundItem.AssetID.ToString());
|
||||||
|
Assert.That(loadedSoundAsset, Is.Not.Null, "loaded sound asset was null");
|
||||||
|
Assert.That(loadedSoundAsset.Data, Is.EqualTo(soundData), "saved and loaded sound data do not match");
|
||||||
|
*/
|
||||||
|
|
||||||
// Temporary
|
// Temporary
|
||||||
Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod());
|
Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Test loading the region settings of a V0.2 OpenSim Region Archive.
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void TestLoadOarV0_2RegionSettings()
|
||||||
|
{
|
||||||
|
TestHelper.InMethod();
|
||||||
|
//log4net.Config.XmlConfigurator.Configure();
|
||||||
|
|
||||||
|
SerialiserModule serialiserModule = new SerialiserModule();
|
||||||
|
ArchiverModule archiverModule = new ArchiverModule();
|
||||||
|
Scene scene = SceneSetupHelpers.SetupScene();
|
||||||
|
SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
|
||||||
|
|
||||||
|
MemoryStream archiveWriteStream = new MemoryStream();
|
||||||
|
TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream);
|
||||||
|
|
||||||
|
tar.WriteDir(ArchiveConstants.TERRAINS_PATH);
|
||||||
|
tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestExecution.Create0p2ControlFile());
|
||||||
|
|
||||||
|
RegionSettings rs = new RegionSettings();
|
||||||
|
rs.AgentLimit = 17;
|
||||||
|
rs.AllowDamage = true;
|
||||||
|
rs.AllowLandJoinDivide = true;
|
||||||
|
rs.AllowLandResell = true;
|
||||||
|
rs.BlockFly = true;
|
||||||
|
rs.BlockShowInSearch = true;
|
||||||
|
rs.BlockTerraform = true;
|
||||||
|
rs.DisableCollisions = true;
|
||||||
|
rs.DisablePhysics = true;
|
||||||
|
rs.DisableScripts = true;
|
||||||
|
rs.Elevation1NW = 15.9;
|
||||||
|
rs.Elevation1NE = 45.3;
|
||||||
|
rs.Elevation1SE = 49;
|
||||||
|
rs.Elevation1SW = 1.9;
|
||||||
|
rs.Elevation2NW = 4.5;
|
||||||
|
rs.Elevation2NE = 19.2;
|
||||||
|
rs.Elevation2SE = 9.2;
|
||||||
|
rs.Elevation2SW = 2.1;
|
||||||
|
rs.FixedSun = true;
|
||||||
|
rs.ObjectBonus = 1.4;
|
||||||
|
rs.RestrictPushing = true;
|
||||||
|
rs.TerrainLowerLimit = 0.4;
|
||||||
|
rs.TerrainRaiseLimit = 17.9;
|
||||||
|
rs.TerrainTexture1 = UUID.Parse("00000000-0000-0000-0000-000000000020");
|
||||||
|
rs.TerrainTexture2 = UUID.Parse("00000000-0000-0000-0000-000000000040");
|
||||||
|
rs.TerrainTexture3 = UUID.Parse("00000000-0000-0000-0000-000000000060");
|
||||||
|
rs.TerrainTexture4 = UUID.Parse("00000000-0000-0000-0000-000000000080");
|
||||||
|
rs.UseEstateSun = true;
|
||||||
|
rs.WaterHeight = 23;
|
||||||
|
|
||||||
|
tar.WriteFile(ArchiveConstants.SETTINGS_PATH + "region1.xml", RegionSettingsSerializer.Serialize(rs));
|
||||||
|
|
||||||
|
tar.Close();
|
||||||
|
|
||||||
|
MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
|
||||||
|
|
||||||
|
lock (this)
|
||||||
|
{
|
||||||
|
scene.EventManager.OnOarFileLoaded += LoadCompleted;
|
||||||
|
archiverModule.DearchiveRegion(archiveReadStream);
|
||||||
|
}
|
||||||
|
|
||||||
|
Assert.That(m_lastErrorMessage, Is.Null);
|
||||||
|
RegionSettings loadedRs = scene.RegionInfo.RegionSettings;
|
||||||
|
|
||||||
|
Assert.That(loadedRs.AgentLimit, Is.EqualTo(17));
|
||||||
|
Assert.That(loadedRs.AllowDamage, Is.True);
|
||||||
|
Assert.That(loadedRs.AllowLandJoinDivide, Is.True);
|
||||||
|
Assert.That(loadedRs.AllowLandResell, Is.True);
|
||||||
|
Assert.That(loadedRs.BlockFly, Is.True);
|
||||||
|
Assert.That(loadedRs.BlockShowInSearch, Is.True);
|
||||||
|
Assert.That(loadedRs.BlockTerraform, Is.True);
|
||||||
|
Assert.That(loadedRs.DisableCollisions, Is.True);
|
||||||
|
Assert.That(loadedRs.DisablePhysics, Is.True);
|
||||||
|
Assert.That(loadedRs.DisableScripts, Is.True);
|
||||||
|
Assert.That(loadedRs.Elevation1NW, Is.EqualTo(15.9));
|
||||||
|
Assert.That(loadedRs.Elevation1NE, Is.EqualTo(45.3));
|
||||||
|
Assert.That(loadedRs.Elevation1SE, Is.EqualTo(49));
|
||||||
|
Assert.That(loadedRs.Elevation1SW, Is.EqualTo(1.9));
|
||||||
|
Assert.That(loadedRs.Elevation2NW, Is.EqualTo(4.5));
|
||||||
|
Assert.That(loadedRs.Elevation2NE, Is.EqualTo(19.2));
|
||||||
|
Assert.That(loadedRs.Elevation2SE, Is.EqualTo(9.2));
|
||||||
|
Assert.That(loadedRs.Elevation2SW, Is.EqualTo(2.1));
|
||||||
|
Assert.That(loadedRs.FixedSun, Is.True);
|
||||||
|
Assert.That(loadedRs.ObjectBonus, Is.EqualTo(1.4));
|
||||||
|
Assert.That(loadedRs.RestrictPushing, Is.True);
|
||||||
|
Assert.That(loadedRs.TerrainLowerLimit, Is.EqualTo(0.4));
|
||||||
|
Assert.That(loadedRs.TerrainRaiseLimit, Is.EqualTo(17.9));
|
||||||
|
Assert.That(loadedRs.TerrainTexture1, Is.EqualTo(UUID.Parse("00000000-0000-0000-0000-000000000020")));
|
||||||
|
Assert.That(loadedRs.TerrainTexture2, Is.EqualTo(UUID.Parse("00000000-0000-0000-0000-000000000040")));
|
||||||
|
Assert.That(loadedRs.TerrainTexture3, Is.EqualTo(UUID.Parse("00000000-0000-0000-0000-000000000060")));
|
||||||
|
Assert.That(loadedRs.TerrainTexture4, Is.EqualTo(UUID.Parse("00000000-0000-0000-0000-000000000080")));
|
||||||
|
Assert.That(loadedRs.UseEstateSun, Is.True);
|
||||||
|
Assert.That(loadedRs.WaterHeight, Is.EqualTo(23));
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test merging a V0.2 OpenSim Region Archive into an existing scene
|
/// Test merging a V0.2 OpenSim Region Archive into an existing scene
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Binary file not shown.
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -35,6 +36,7 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules
|
namespace OpenSim.Region.CoreModules
|
||||||
{
|
{
|
||||||
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
public class CloudModule : ICloudModule
|
public class CloudModule : ICloudModule
|
||||||
{
|
{
|
||||||
// private static readonly log4net.ILog m_log
|
// private static readonly log4net.ILog m_log
|
||||||
|
@ -48,7 +50,7 @@ namespace OpenSim.Region.CoreModules
|
||||||
private float m_cloudDensity = 1.0F;
|
private float m_cloudDensity = 1.0F;
|
||||||
private float[] cloudCover = new float[16 * 16];
|
private float[] cloudCover = new float[16 * 16];
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
IConfig cloudConfig = config.Configs["Cloud"];
|
IConfig cloudConfig = config.Configs["Cloud"];
|
||||||
|
|
||||||
|
@ -58,10 +60,17 @@ namespace OpenSim.Region.CoreModules
|
||||||
m_cloudDensity = cloudConfig.GetFloat("density", 0.5F);
|
m_cloudDensity = cloudConfig.GetFloat("density", 0.5F);
|
||||||
m_frameUpdateRate = cloudConfig.GetInt("cloud_update_rate", 1000);
|
m_frameUpdateRate = cloudConfig.GetInt("cloud_update_rate", 1000);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
if (m_enabled)
|
if (m_enabled)
|
||||||
{
|
{
|
||||||
|
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
|
|
||||||
scene.EventManager.OnNewClient += CloudsToClient;
|
scene.EventManager.OnNewClient += CloudsToClient;
|
||||||
|
@ -71,9 +80,18 @@ namespace OpenSim.Region.CoreModules
|
||||||
GenerateCloudCover();
|
GenerateCloudCover();
|
||||||
|
|
||||||
m_ready = true;
|
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()
|
public void PostInitialise()
|
||||||
|
@ -96,12 +114,6 @@ namespace OpenSim.Region.CoreModules
|
||||||
get { return "CloudModule"; }
|
get { return "CloudModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public float CloudCover(int x, int y, int z)
|
public float CloudCover(int x, int y, int z)
|
||||||
{
|
{
|
||||||
float cover = 0f;
|
float cover = 0f;
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Security;
|
using System.Security;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -38,6 +39,7 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.World.Estate
|
namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
{
|
{
|
||||||
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
public class EstateManagementModule : IEstateModule
|
public class EstateManagementModule : IEstateModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
@ -898,7 +900,16 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region IRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
m_scene.RegisterModuleInterface<IEstateModule>(this);
|
m_scene.RegisterModuleInterface<IEstateModule>(this);
|
||||||
|
@ -920,6 +931,29 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
consoleSetTerrainHeights);
|
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
|
#region Console Commands
|
||||||
|
|
||||||
public void consoleSetTerrainTexture(string module, string[] args)
|
public void consoleSetTerrainTexture(string module, string[] args)
|
||||||
|
@ -1006,28 +1040,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#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
|
#endregion
|
||||||
|
|
||||||
#region Other Functions
|
#region Other Functions
|
||||||
|
|
|
@ -29,6 +29,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -89,7 +90,8 @@ enum GroupPowers : long
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.World.Permissions
|
namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
{
|
{
|
||||||
public class PermissionsModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class PermissionsModule : INonSharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -148,12 +150,10 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region INonSharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
|
||||||
|
|
||||||
IConfig myConfig = config.Configs["Startup"];
|
IConfig myConfig = config.Configs["Startup"];
|
||||||
|
|
||||||
string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule");
|
string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule");
|
||||||
|
@ -179,6 +179,56 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
else
|
else
|
||||||
m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks");
|
m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks");
|
||||||
|
|
||||||
|
string grant = myConfig.GetString("GrantLSL","");
|
||||||
|
if (grant.Length > 0) {
|
||||||
|
foreach (string uuidl in grant.Split(',')) {
|
||||||
|
string uuid = uuidl.Trim(" \t".ToCharArray());
|
||||||
|
GrantLSL.Add(uuid, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
grant = myConfig.GetString("GrantCS","");
|
||||||
|
if (grant.Length > 0) {
|
||||||
|
foreach (string uuidl in grant.Split(',')) {
|
||||||
|
string uuid = uuidl.Trim(" \t".ToCharArray());
|
||||||
|
GrantCS.Add(uuid, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
grant = myConfig.GetString("GrantVB","");
|
||||||
|
if (grant.Length > 0) {
|
||||||
|
foreach (string uuidl in grant.Split(',')) {
|
||||||
|
string uuid = uuidl.Trim(" \t".ToCharArray());
|
||||||
|
GrantVB.Add(uuid, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
grant = myConfig.GetString("GrantJS", "");
|
||||||
|
if (grant.Length > 0)
|
||||||
|
{
|
||||||
|
foreach (string uuidl in grant.Split(','))
|
||||||
|
{
|
||||||
|
string uuid = uuidl.Trim(" \t".ToCharArray());
|
||||||
|
GrantJS.Add(uuid, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
grant = myConfig.GetString("GrantYP", "");
|
||||||
|
if (grant.Length > 0)
|
||||||
|
{
|
||||||
|
foreach (string uuidl in grant.Split(','))
|
||||||
|
{
|
||||||
|
string uuid = uuidl.Trim(" \t".ToCharArray());
|
||||||
|
GrantYP.Add(uuid, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
|
m_scene = scene;
|
||||||
|
|
||||||
//Register functions with Scene External Checks!
|
//Register functions with Scene External Checks!
|
||||||
m_scene.Permissions.OnBypassPermissions += BypassPermissions;
|
m_scene.Permissions.OnBypassPermissions += BypassPermissions;
|
||||||
m_scene.Permissions.OnSetBypassPermissions += SetBypassPermissions;
|
m_scene.Permissions.OnSetBypassPermissions += SetBypassPermissions;
|
||||||
|
@ -244,52 +294,87 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
"debug permissions <true / false>",
|
"debug permissions <true / false>",
|
||||||
"Enable permissions debugging",
|
"Enable permissions debugging",
|
||||||
HandleDebugPermissions);
|
HandleDebugPermissions);
|
||||||
|
|
||||||
|
|
||||||
string grant = myConfig.GetString("GrantLSL","");
|
|
||||||
if (grant.Length > 0) {
|
|
||||||
foreach (string uuidl in grant.Split(',')) {
|
|
||||||
string uuid = uuidl.Trim(" \t".ToCharArray());
|
|
||||||
GrantLSL.Add(uuid, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
grant = myConfig.GetString("GrantCS","");
|
public Type ReplaceableInterface
|
||||||
if (grant.Length > 0) {
|
|
||||||
foreach (string uuidl in grant.Split(',')) {
|
|
||||||
string uuid = uuidl.Trim(" \t".ToCharArray());
|
|
||||||
GrantCS.Add(uuid, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
grant = myConfig.GetString("GrantVB","");
|
|
||||||
if (grant.Length > 0) {
|
|
||||||
foreach (string uuidl in grant.Split(',')) {
|
|
||||||
string uuid = uuidl.Trim(" \t".ToCharArray());
|
|
||||||
GrantVB.Add(uuid, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
grant = myConfig.GetString("GrantJS", "");
|
|
||||||
if (grant.Length > 0)
|
|
||||||
{
|
{
|
||||||
foreach (string uuidl in grant.Split(','))
|
get { return null; }
|
||||||
{
|
|
||||||
string uuid = uuidl.Trim(" \t".ToCharArray());
|
|
||||||
GrantJS.Add(uuid, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
grant = myConfig.GetString("GrantYP", "");
|
public void RegionLoaded(Scene scene)
|
||||||
if (grant.Length > 0)
|
|
||||||
{
|
{
|
||||||
foreach (string uuidl in grant.Split(','))
|
m_friendsModule = m_scene.RequestModuleInterface<IFriendsModule>();
|
||||||
{
|
|
||||||
string uuid = uuidl.Trim(" \t".ToCharArray());
|
if (m_friendsModule == null)
|
||||||
GrantYP.Add(uuid, true);
|
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)
|
public void HandleBypassPermissions(string module, string[] args)
|
||||||
|
@ -362,31 +447,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
m_log.InfoFormat("[PERMISSIONS] Set permissions debugging to {0} in {1}", m_debugPermissions, m_scene.RegionInfo.RegionName);
|
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
|
#endregion
|
||||||
|
|
||||||
#region Helper Functions
|
#region Helper Functions
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -34,13 +35,18 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.World.Sound
|
namespace OpenSim.Region.CoreModules.World.Sound
|
||||||
{
|
{
|
||||||
public class SoundModule : IRegionModule, ISoundModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class SoundModule : INonSharedRegionModule, ISoundModule
|
||||||
{
|
{
|
||||||
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
protected Scene m_scene;
|
protected Scene m_scene;
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
|
|
||||||
|
@ -49,10 +55,23 @@ namespace OpenSim.Region.CoreModules.World.Sound
|
||||||
m_scene.RegisterModuleInterface<ISoundModule>(this);
|
m_scene.RegisterModuleInterface<ISoundModule>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise() {}
|
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 Close() {}
|
public void Close() {}
|
||||||
public string Name { get { return "Sound Module"; } }
|
public string Name { get { return "Sound Module"; } }
|
||||||
public bool IsSharedModule { get { return false; } }
|
|
||||||
|
|
||||||
private void OnNewClient(IClientAPI client)
|
private void OnNewClient(IClientAPI client)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,6 +29,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -37,6 +38,7 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules
|
namespace OpenSim.Region.CoreModules
|
||||||
{
|
{
|
||||||
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
public class SunModule : ISunModule
|
public class SunModule : ISunModule
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -278,27 +280,12 @@ namespace OpenSim.Region.CoreModules
|
||||||
return GetCurrentSunHour() + 6.0f;
|
return GetCurrentSunHour() + 6.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IRegion Methods
|
#region INonSharedRegionModule Methods
|
||||||
|
|
||||||
// Called immediately after the module is loaded for a given region
|
// Called immediately after the module is loaded for a given region
|
||||||
// i.e. Immediately after instance creation.
|
// i.e. Immediately after instance creation.
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
|
||||||
m_frame = 0;
|
|
||||||
|
|
||||||
// This one puts an entry in the main help screen
|
|
||||||
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;
|
TimeZone local = TimeZone.CurrentTimeZone;
|
||||||
TicksUTCOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks;
|
TicksUTCOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks;
|
||||||
m_log.Debug("[SUN]: localtime offset is " + TicksUTCOffset);
|
m_log.Debug("[SUN]: localtime offset is " + TicksUTCOffset);
|
||||||
|
@ -346,7 +333,43 @@ namespace OpenSim.Region.CoreModules
|
||||||
// m_latitude = d_latitude;
|
// m_latitude = d_latitude;
|
||||||
// m_longitude = d_longitude;
|
// m_longitude = d_longitude;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
ready = false;
|
||||||
|
|
||||||
|
// Remove our hooks
|
||||||
|
m_scene.EventManager.OnFrame -= SunUpdate;
|
||||||
|
m_scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel;
|
||||||
|
m_scene.EventManager.OnEstateToolsSunUpdate -= EstateToolsSunUpdate;
|
||||||
|
m_scene.EventManager.OnGetCurrentTimeAsLindenSunHour -= GetCurrentTimeAsLindenSunHour;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Name
|
||||||
|
{
|
||||||
|
get { return "SunModule"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
switch (m_RegionMode)
|
||||||
{
|
{
|
||||||
case "T1":
|
case "T1":
|
||||||
|
@ -391,34 +414,21 @@ namespace OpenSim.Region.CoreModules
|
||||||
}
|
}
|
||||||
|
|
||||||
scene.RegisterModuleInterface<ISunModule>(this);
|
scene.RegisterModuleInterface<ISunModule>(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
public void PostInitialise()
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void RemoveRegion(Scene scene)
|
||||||
{
|
{
|
||||||
ready = false;
|
scene.RegisterModuleInterface<ISunModule>(this);
|
||||||
|
scene.EventManager.OnFrame -= SunUpdate;
|
||||||
// Remove our hooks
|
scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel;
|
||||||
m_scene.EventManager.OnFrame -= SunUpdate;
|
scene.EventManager.OnEstateToolsSunUpdate -= EstateToolsSunUpdate;
|
||||||
m_scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel;
|
scene.EventManager.OnGetCurrentTimeAsLindenSunHour -= GetCurrentTimeAsLindenSunHour;
|
||||||
m_scene.EventManager.OnEstateToolsSunUpdate -= EstateToolsSunUpdate;
|
|
||||||
m_scene.EventManager.OnGetCurrentTimeAsLindenSunHour -= GetCurrentTimeAsLindenSunHour;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Name
|
|
||||||
{
|
|
||||||
get { return "SunModule"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region EventManager Events
|
#region EventManager Events
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -36,7 +37,8 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.Vegetation
|
namespace OpenSim.Region.CoreModules.Avatar.Vegetation
|
||||||
{
|
{
|
||||||
public class VegetationModule : IRegionModule, IVegetationModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class VegetationModule : INonSharedRegionModule, IVegetationModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -45,16 +47,33 @@ namespace OpenSim.Region.CoreModules.Avatar.Vegetation
|
||||||
protected static readonly PCode[] creationCapabilities = new PCode[] { PCode.Grass, PCode.NewTree, PCode.Tree };
|
protected static readonly PCode[] creationCapabilities = new PCode[] { PCode.Grass, PCode.NewTree, PCode.Tree };
|
||||||
public PCode[] CreationCapabilities { get { return creationCapabilities; } }
|
public PCode[] CreationCapabilities { get { return creationCapabilities; } }
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
m_scene.RegisterModuleInterface<IVegetationModule>(this);
|
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 PostInitialise() {}
|
||||||
public void Close() {}
|
public void Close() {}
|
||||||
public string Name { get { return "Vegetation Module"; } }
|
public string Name { get { return "Vegetation Module"; } }
|
||||||
public bool IsSharedModule { get { return false; } }
|
|
||||||
|
|
||||||
public SceneObjectGroup AddTree(
|
public SceneObjectGroup AddTree(
|
||||||
UUID uuid, UUID groupID, Vector3 scale, Quaternion rotation, Vector3 position, Tree treeType, bool newTree)
|
UUID uuid, UUID groupID, Vector3 scale, Quaternion rotation, Vector3 position, Tree treeType, bool newTree)
|
||||||
|
|
|
@ -55,17 +55,19 @@ namespace OpenSim.Region.CoreModules
|
||||||
|
|
||||||
private IWindModelPlugin m_activeWindPlugin = null;
|
private IWindModelPlugin m_activeWindPlugin = null;
|
||||||
private const string m_dWindPluginName = "SimpleRandomWind";
|
private const string m_dWindPluginName = "SimpleRandomWind";
|
||||||
|
private string m_desiredWindPlugin = "SimpleRandomWind";
|
||||||
private Dictionary<string, IWindModelPlugin> m_availableWindPlugins = new Dictionary<string, IWindModelPlugin>();
|
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
|
// Simplified windSpeeds based on the fact that the client protocal tracks at a resolution of 16m
|
||||||
private Vector2[] windSpeeds = new Vector2[16 * 16];
|
private Vector2[] windSpeeds = new Vector2[16 * 16];
|
||||||
|
private IConfig windConfig;
|
||||||
|
|
||||||
#region IRegion Methods
|
#region IRegion Methods
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
IConfig windConfig = config.Configs["Wind"];
|
windConfig = config.Configs["Wind"];
|
||||||
string desiredWindPlugin = m_dWindPluginName;
|
m_desiredWindPlugin = m_dWindPluginName;
|
||||||
|
|
||||||
if (windConfig != null)
|
if (windConfig != null)
|
||||||
{
|
{
|
||||||
|
@ -76,10 +78,18 @@ namespace OpenSim.Region.CoreModules
|
||||||
// Determine which wind model plugin is desired
|
// Determine which wind model plugin is desired
|
||||||
if (windConfig.Contains("wind_plugin"))
|
if (windConfig.Contains("wind_plugin"))
|
||||||
{
|
{
|
||||||
desiredWindPlugin = windConfig.GetString("wind_plugin");
|
m_desiredWindPlugin = windConfig.GetString("wind_plugin");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
if (m_enabled)
|
if (m_enabled)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[WIND] Enabled with an update rate of {0} frames.", m_frameUpdateRate);
|
m_log.InfoFormat("[WIND] Enabled with an update rate of {0} frames.", m_frameUpdateRate);
|
||||||
|
@ -95,11 +105,11 @@ namespace OpenSim.Region.CoreModules
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for desired plugin
|
// Check for desired plugin
|
||||||
if (m_availableWindPlugins.ContainsKey(desiredWindPlugin))
|
if (m_availableWindPlugins.ContainsKey(m_desiredWindPlugin))
|
||||||
{
|
{
|
||||||
m_activeWindPlugin = m_availableWindPlugins[desiredWindPlugin];
|
m_activeWindPlugin = m_availableWindPlugins[m_desiredWindPlugin];
|
||||||
|
|
||||||
m_log.InfoFormat("[WIND] {0} plugin found, initializing.", desiredWindPlugin);
|
m_log.InfoFormat("[WIND] {0} plugin found, initializing.", m_desiredWindPlugin);
|
||||||
|
|
||||||
if (windConfig != null)
|
if (windConfig != null)
|
||||||
{
|
{
|
||||||
|
@ -112,7 +122,7 @@ namespace OpenSim.Region.CoreModules
|
||||||
// if the plug-in wasn't found, default to no wind.
|
// if the plug-in wasn't found, default to no wind.
|
||||||
if (m_activeWindPlugin == null)
|
if (m_activeWindPlugin == null)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[WIND] Could not find specified wind plug-in: {0}", desiredWindPlugin);
|
m_log.ErrorFormat("[WIND] Could not find specified wind plug-in: {0}", m_desiredWindPlugin);
|
||||||
m_log.ErrorFormat("[WIND] Defaulting to no wind.");
|
m_log.ErrorFormat("[WIND] Defaulting to no wind.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,13 +159,19 @@ namespace OpenSim.Region.CoreModules
|
||||||
m_ready = true;
|
m_ready = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void RegionLoaded(Scene scene)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
scene.EventManager.OnFrame -= WindUpdate;
|
||||||
|
scene.EventManager.OnMakeRootAgent -= OnAgentEnteredRegion;
|
||||||
|
scene.UnregisterModuleInterface<IWindModule>(this);
|
||||||
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
if (m_enabled)
|
if (m_enabled)
|
||||||
|
@ -182,11 +198,6 @@ namespace OpenSim.Region.CoreModules
|
||||||
get { return "WindModule"; }
|
get { return "WindModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.Imaging;
|
using OpenMetaverse.Imaging;
|
||||||
|
@ -59,7 +60,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
public face[] trns;
|
public face[] trns;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MapImageModule : IMapImageGenerator, IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class MapImageModule : IMapImageGenerator, INonSharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log =
|
private static readonly ILog m_log =
|
||||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
@ -128,23 +130,36 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region INonSharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
|
||||||
m_config = source;
|
m_config = source;
|
||||||
|
|
||||||
IConfig startupConfig = m_config.Configs["Startup"];
|
IConfig startupConfig = m_config.Configs["Startup"];
|
||||||
if (startupConfig.GetString("MapImageModule", "MapImageModule") !=
|
if (startupConfig.GetString("MapImageModule", "MapImageModule") !=
|
||||||
"MapImageModule")
|
"MapImageModule")
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
|
m_scene = scene;
|
||||||
m_scene.RegisterModuleInterface<IMapImageGenerator>(this);
|
m_scene.RegisterModuleInterface<IMapImageGenerator>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public Type ReplaceableInterface
|
||||||
{
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
scene.UnregisterModuleInterface<IMapImageGenerator>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
|
@ -156,11 +171,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
get { return "MapImageModule"; }
|
get { return "MapImageModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// TODO: unused:
|
// TODO: unused:
|
||||||
|
|
|
@ -24,9 +24,12 @@
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -38,7 +41,8 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.World.WorldMap
|
namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
{
|
{
|
||||||
public class MapSearchModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class MapSearchModule : ISharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log =
|
private static readonly ILog m_log =
|
||||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
@ -46,8 +50,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
Scene m_scene = null; // only need one for communication with GridService
|
Scene m_scene = null; // only need one for communication with GridService
|
||||||
List<Scene> m_scenes = new List<Scene>();
|
List<Scene> m_scenes = new List<Scene>();
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
if (m_scene == null)
|
if (m_scene == null)
|
||||||
{
|
{
|
||||||
|
@ -58,6 +66,22 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
scene.EventManager.OnNewClient += OnNewClient;
|
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()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -73,11 +97,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
get { return "MapSearchModule"; }
|
get { return "MapSearchModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private void OnNewClient(IClientAPI client)
|
private void OnNewClient(IClientAPI client)
|
||||||
|
|
|
@ -33,6 +33,7 @@ using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -43,7 +44,8 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.DataSnapshot
|
namespace OpenSim.Region.DataSnapshot
|
||||||
{
|
{
|
||||||
public class DataSnapshotManager : IRegionModule, IDataSnapshot
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class DataSnapshotManager : ISharedRegionModule, IDataSnapshot
|
||||||
{
|
{
|
||||||
#region Class members
|
#region Class members
|
||||||
//Information from config
|
//Information from config
|
||||||
|
@ -89,7 +91,7 @@ namespace OpenSim.Region.DataSnapshot
|
||||||
|
|
||||||
#region IRegionModule
|
#region IRegionModule
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
if (!m_configLoaded)
|
if (!m_configLoaded)
|
||||||
{
|
{
|
||||||
|
@ -140,7 +142,16 @@ namespace OpenSim.Region.DataSnapshot
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
if (m_enabled)
|
if (m_enabled)
|
||||||
{
|
{
|
||||||
//Hand it the first scene, assuming that all scenes have the same BaseHTTPServer
|
//Hand it the first scene, assuming that all scenes have the same BaseHTTPServer
|
||||||
|
@ -153,11 +164,7 @@ namespace OpenSim.Region.DataSnapshot
|
||||||
|
|
||||||
if (m_dataServices != "" && m_dataServices != "noservices")
|
if (m_dataServices != "" && m_dataServices != "noservices")
|
||||||
NotifyDataServices(m_dataServices, "online");
|
NotifyDataServices(m_dataServices, "online");
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_enabled)
|
|
||||||
{
|
|
||||||
m_log.Info("[DATASNAPSHOT]: Scene added to module.");
|
m_log.Info("[DATASNAPSHOT]: Scene added to module.");
|
||||||
|
|
||||||
m_snapStore.AddScene(scene);
|
m_snapStore.AddScene(scene);
|
||||||
|
@ -191,22 +198,27 @@ namespace OpenSim.Region.DataSnapshot
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.Warn("[DATASNAPSHOT]: Data snapshot disabled, not adding scene to module (or anything else).");
|
m_log.Info("[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()
|
public void Close()
|
||||||
{
|
{
|
||||||
if (m_enabled && m_dataServices != "" && m_dataServices != "noservices")
|
if (m_enabled && m_dataServices != "" && m_dataServices != "noservices")
|
||||||
NotifyDataServices(m_dataServices, "offline");
|
NotifyDataServices(m_dataServices, "offline");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Name
|
public string Name
|
||||||
{
|
{
|
||||||
get { return "External Data Generator"; }
|
get { return "External Data Generator"; }
|
||||||
|
@ -214,7 +226,6 @@ namespace OpenSim.Region.DataSnapshot
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Interfaces
|
namespace OpenSim.Region.Framework.Interfaces
|
||||||
{
|
{
|
||||||
public interface ICloudModule : IRegionModule
|
public interface ICloudModule : INonSharedRegionModule
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves the cloud density at the given region coordinates
|
/// Retrieves the cloud density at the given region coordinates
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
public int numLeft;
|
public int numLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IEmailModule : IRegionModule
|
public interface IEmailModule : ISharedRegionModule
|
||||||
{
|
{
|
||||||
void SendEmail(UUID objectID, string address, string subject, string body);
|
void SendEmail(UUID objectID, string address, string subject, string body);
|
||||||
Email GetNextEmail(UUID objectID, string sender, string subject);
|
Email GetNextEmail(UUID objectID, string sender, string subject);
|
||||||
|
|
|
@ -77,7 +77,11 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stop all the scripts in this entity.
|
/// Stop all the scripts in this entity.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void RemoveScriptInstances();
|
/// <param name="sceneObjectBeingDeleted">
|
||||||
|
/// Should be true if these scripts are being removed because the scene
|
||||||
|
/// object is being deleted. This will prevent spurious updates to the client.
|
||||||
|
/// </param>
|
||||||
|
void RemoveScriptInstances(bool sceneObjectBeingDeleted);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Start a script which is in this entity's inventory.
|
/// Start a script which is in this entity's inventory.
|
||||||
|
@ -103,7 +107,11 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
/// Stop a script which is in this prim's inventory.
|
/// Stop a script which is in this prim's inventory.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="itemId"></param>
|
/// <param name="itemId"></param>
|
||||||
void RemoveScriptInstance(UUID itemId);
|
/// <param name="sceneObjectBeingDeleted">
|
||||||
|
/// Should be true if these scripts are being removed because the scene
|
||||||
|
/// object is being deleted. This will prevent spurious updates to the client.
|
||||||
|
/// </param>
|
||||||
|
void RemoveScriptInstance(UUID itemId, bool sceneObjectBeingDeleted);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add an item to this entity's inventory. If an item with the same name already exists, then an alternative
|
/// Add an item to this entity's inventory. If an item with the same name already exists, then an alternative
|
||||||
|
|
|
@ -29,7 +29,7 @@ using OpenMetaverse;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Interfaces
|
namespace OpenSim.Region.Framework.Interfaces
|
||||||
{
|
{
|
||||||
public interface IEstateModule : IRegionModule
|
public interface IEstateModule : INonSharedRegionModule
|
||||||
{
|
{
|
||||||
uint GetRegionFlags();
|
uint GetRegionFlags();
|
||||||
bool IsManager(UUID avatarID);
|
bool IsManager(UUID avatarID);
|
||||||
|
|
|
@ -29,7 +29,7 @@ using OpenMetaverse;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Interfaces
|
namespace OpenSim.Region.Framework.Interfaces
|
||||||
{
|
{
|
||||||
public interface ISunModule : IRegionModule
|
public interface ISunModule : INonSharedRegionModule
|
||||||
{
|
{
|
||||||
double GetSunParameter(string param);
|
double GetSunParameter(string param);
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ using OpenMetaverse;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Interfaces
|
namespace OpenSim.Region.Framework.Interfaces
|
||||||
{
|
{
|
||||||
public interface IWindModule : IRegionModule
|
public interface IWindModule : INonSharedRegionModule
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -256,7 +256,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (isScriptRunning)
|
if (isScriptRunning)
|
||||||
{
|
{
|
||||||
part.Inventory.RemoveScriptInstance(item.ItemID);
|
part.Inventory.RemoveScriptInstance(item.ItemID, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update item with new asset
|
// Update item with new asset
|
||||||
|
@ -859,8 +859,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (item.Type == 10)
|
if (item.Type == 10)
|
||||||
{
|
{
|
||||||
|
part.RemoveScriptEvents(itemID);
|
||||||
EventManager.TriggerRemoveScript(localID, itemID);
|
EventManager.TriggerRemoveScript(localID, itemID);
|
||||||
}
|
}
|
||||||
|
|
||||||
group.RemoveInventoryItem(localID, itemID);
|
group.RemoveInventoryItem(localID, itemID);
|
||||||
part.GetProperties(remoteClient);
|
part.GetProperties(remoteClient);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1023,7 +1023,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
if (ent is SceneObjectGroup)
|
if (ent is SceneObjectGroup)
|
||||||
{
|
{
|
||||||
((SceneObjectGroup) ent).RemoveScriptInstances();
|
((SceneObjectGroup) ent).RemoveScriptInstances(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1911,13 +1911,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <param name="silent">Suppress broadcasting changes to other clients.</param>
|
/// <param name="silent">Suppress broadcasting changes to other clients.</param>
|
||||||
public void DeleteSceneObject(SceneObjectGroup group, bool silent)
|
public void DeleteSceneObject(SceneObjectGroup group, bool silent)
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[SCENE]: Deleting scene object {0} {1}", group.Name, group.UUID);
|
||||||
|
|
||||||
//SceneObjectPart rootPart = group.GetChildPart(group.UUID);
|
//SceneObjectPart rootPart = group.GetChildPart(group.UUID);
|
||||||
|
|
||||||
// Serialise calls to RemoveScriptInstances to avoid
|
// Serialise calls to RemoveScriptInstances to avoid
|
||||||
// deadlocking on m_parts inside SceneObjectGroup
|
// deadlocking on m_parts inside SceneObjectGroup
|
||||||
lock (m_deleting_scene_object)
|
lock (m_deleting_scene_object)
|
||||||
{
|
{
|
||||||
group.RemoveScriptInstances();
|
group.RemoveScriptInstances(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (SceneObjectPart part in group.Children.Values)
|
foreach (SceneObjectPart part in group.Children.Values)
|
||||||
|
@ -1945,6 +1947,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
group.DeleteGroup(silent);
|
group.DeleteGroup(silent);
|
||||||
|
|
||||||
|
// m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -2543,6 +2543,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ScheduleFullUpdate()
|
public void ScheduleFullUpdate()
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId);
|
||||||
|
|
||||||
if (m_parentGroup != null)
|
if (m_parentGroup != null)
|
||||||
{
|
{
|
||||||
m_parentGroup.QueueForUpdateCheck();
|
m_parentGroup.QueueForUpdateCheck();
|
||||||
|
@ -4069,6 +4071,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (m_parentGroup == null)
|
if (m_parentGroup == null)
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[SCENE OBJECT PART]: Scheduling part {0} {1} for full update in aggregateScriptEvents() since m_parentGroup == null", Name, LocalId);
|
||||||
ScheduleFullUpdate();
|
ScheduleFullUpdate();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -4085,10 +4089,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
LocalFlags=(PrimFlags)objectflagupdate;
|
LocalFlags=(PrimFlags)objectflagupdate;
|
||||||
|
|
||||||
if (m_parentGroup != null && m_parentGroup.RootPart == this)
|
if (m_parentGroup != null && m_parentGroup.RootPart == this)
|
||||||
|
{
|
||||||
m_parentGroup.aggregateScriptEvents();
|
m_parentGroup.aggregateScriptEvents();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[SCENE OBJECT PART]: Scheduling part {0} {1} for full update in aggregateScriptEvents()", Name, LocalId);
|
||||||
ScheduleFullUpdate();
|
ScheduleFullUpdate();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public int registerTargetWaypoint(Vector3 target, float tolerance)
|
public int registerTargetWaypoint(Vector3 target, float tolerance)
|
||||||
{
|
{
|
||||||
|
|
|
@ -235,7 +235,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stop all the scripts in this prim.
|
/// Stop all the scripts in this prim.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void RemoveScriptInstances()
|
/// <param name="sceneObjectBeingDeleted">
|
||||||
|
/// Should be true if these scripts are being removed because the scene
|
||||||
|
/// object is being deleted. This will prevent spurious updates to the client.
|
||||||
|
/// </param>
|
||||||
|
public void RemoveScriptInstances(bool sceneObjectBeingDeleted)
|
||||||
{
|
{
|
||||||
Items.LockItemsForRead(true);
|
Items.LockItemsForRead(true);
|
||||||
IList<TaskInventoryItem> items = new List<TaskInventoryItem>(Items.Values);
|
IList<TaskInventoryItem> items = new List<TaskInventoryItem>(Items.Values);
|
||||||
|
@ -412,10 +416,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Stop a script which is in this prim's inventory.
|
/// Stop a script which is in this prim's inventory.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="itemId"></param>
|
/// <param name="itemId"></param>
|
||||||
public void RemoveScriptInstance(UUID itemId)
|
/// <param name="sceneObjectBeingDeleted">
|
||||||
|
/// Should be true if this script is being removed because the scene
|
||||||
|
/// object is being deleted. This will prevent spurious updates to the client.
|
||||||
|
/// </param>
|
||||||
|
public void RemoveScriptInstance(UUID itemId, bool sceneObjectBeingDeleted)
|
||||||
{
|
{
|
||||||
if (m_items.ContainsKey(itemId))
|
if (m_items.ContainsKey(itemId))
|
||||||
{
|
{
|
||||||
|
if (!sceneObjectBeingDeleted)
|
||||||
|
m_part.RemoveScriptEvents(itemId);
|
||||||
|
|
||||||
m_part.ParentGroup.Scene.EventManager.TriggerRemoveScript(m_part.LocalId, itemId);
|
m_part.ParentGroup.Scene.EventManager.TriggerRemoveScript(m_part.LocalId, itemId);
|
||||||
m_part.ParentGroup.AddActiveScriptCount(-1);
|
m_part.ParentGroup.AddActiveScriptCount(-1);
|
||||||
}
|
}
|
||||||
|
@ -496,7 +507,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (i.Name == item.Name)
|
if (i.Name == item.Name)
|
||||||
{
|
{
|
||||||
if (i.InvType == (int)InventoryType.LSL)
|
if (i.InvType == (int)InventoryType.LSL)
|
||||||
RemoveScriptInstance(i.ItemID);
|
RemoveScriptInstance(i.ItemID, false);
|
||||||
|
|
||||||
RemoveInventoryItem(i.ItemID);
|
RemoveInventoryItem(i.ItemID);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1319,6 +1319,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (m_allowMovement)
|
if (m_allowMovement)
|
||||||
{
|
{
|
||||||
|
if (agentData.UseClientAgentPosition)
|
||||||
|
{
|
||||||
|
m_moveToPositionInProgress = (agentData.ClientAgentPosition - AbsolutePosition).Length() > 0.2f;
|
||||||
|
m_moveToPositionTarget = agentData.ClientAgentPosition;
|
||||||
|
}
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
bool update_rotation = false;
|
bool update_rotation = false;
|
||||||
|
@ -1421,7 +1427,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (bAllowUpdateMoveToPosition && (m_moveToPositionInProgress && !m_autopilotMoving))
|
if (bAllowUpdateMoveToPosition && (m_moveToPositionInProgress && !m_autopilotMoving))
|
||||||
{
|
{
|
||||||
//Check the error term of the current position in relation to the target position
|
//Check the error term of the current position in relation to the target position
|
||||||
if (Util.GetDistanceTo(AbsolutePosition, m_moveToPositionTarget) <= 1.5f)
|
if (Util.GetDistanceTo(AbsolutePosition, m_moveToPositionTarget) <= 0.5f)
|
||||||
{
|
{
|
||||||
// we are close enough to the target
|
// we are close enough to the target
|
||||||
m_moveToPositionTarget = Vector3.Zero;
|
m_moveToPositionTarget = Vector3.Zero;
|
||||||
|
@ -2969,8 +2975,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
protected void CrossToNewRegion()
|
protected void CrossToNewRegion()
|
||||||
{
|
{
|
||||||
InTransit();
|
InTransit();
|
||||||
|
try
|
||||||
|
{
|
||||||
m_scene.CrossAgentToNewRegion(this, m_physicsActor.Flying);
|
m_scene.CrossAgentToNewRegion(this, m_physicsActor.Flying);
|
||||||
}
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
m_scene.CrossAgentToNewRegion(this, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void InTransit()
|
public void InTransit()
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,9 +25,11 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
@ -35,24 +37,23 @@ using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server;
|
||||||
|
|
||||||
namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
|
namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
|
||||||
{
|
{
|
||||||
public class IRCStackModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class IRCStackModule : INonSharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private IRCServer m_server;
|
private IRCServer m_server;
|
||||||
// private Scene m_scene;
|
// private Scene m_scene;
|
||||||
|
private int portNo;
|
||||||
|
|
||||||
#region Implementation of IRegionModule
|
#region Implementation of ISharedRegionModule
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
if (null != source.Configs["IRCd"] &&
|
if (null != source.Configs["IRCd"] &&
|
||||||
source.Configs["IRCd"].GetBoolean("Enabled",false))
|
source.Configs["IRCd"].GetBoolean("Enabled",false))
|
||||||
{
|
{
|
||||||
int portNo = source.Configs["IRCd"].GetInt("Port",6666);
|
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,9 +69,20 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
|
||||||
m_log.Info("[IRCd] Added user to Scene");
|
m_log.Info("[IRCd] Added user to Scene");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
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()
|
public void Close()
|
||||||
|
@ -83,9 +95,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
|
||||||
get { return "IRCClientStackModule"; }
|
get { return "IRCClientStackModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
public Type ReplaceableInterface
|
||||||
{
|
{
|
||||||
get { return false; }
|
get { return null; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -38,6 +38,7 @@ using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -53,7 +54,8 @@ using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
||||||
{
|
{
|
||||||
public class FreeSwitchVoiceModule : IRegionModule, IVoiceModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class FreeSwitchVoiceModule : ISharedRegionModule, IVoiceModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -108,9 +110,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
||||||
|
|
||||||
private IConfig m_config;
|
private IConfig m_config;
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
|
||||||
m_config = config.Configs["FreeSwitchVoice"];
|
m_config = config.Configs["FreeSwitchVoice"];
|
||||||
|
|
||||||
if (null == m_config)
|
if (null == m_config)
|
||||||
|
@ -224,7 +225,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
|
m_scene = scene;
|
||||||
if (m_pluginEnabled)
|
if (m_pluginEnabled)
|
||||||
{
|
{
|
||||||
// we need to capture scene in an anonymous method
|
// we need to capture scene in an anonymous method
|
||||||
|
@ -256,10 +261,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void PostInitialise()
|
|
||||||
{
|
|
||||||
if (m_pluginEnabled)
|
if (m_pluginEnabled)
|
||||||
{
|
{
|
||||||
m_log.Info("[FreeSwitchVoice] registering IVoiceModule with the scene");
|
m_log.Info("[FreeSwitchVoice] registering IVoiceModule with the scene");
|
||||||
|
@ -269,6 +270,42 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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()
|
public void Close()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -278,11 +315,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
||||||
get { return "FreeSwitchVoiceModule"; }
|
get { return "FreeSwitchVoiceModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
// <summary>
|
// <summary>
|
||||||
// implementation of IVoiceModule, called by osSetParcelSIPAddress script function
|
// implementation of IVoiceModule, called by osSetParcelSIPAddress script function
|
||||||
// </summary>
|
// </summary>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
|
@ -38,6 +38,7 @@ using System.Threading;
|
||||||
|
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
|
||||||
using OpenSim;
|
using OpenSim;
|
||||||
|
@ -50,7 +51,8 @@ using log4net;
|
||||||
|
|
||||||
namespace OpenSim.Region.OptionalModules.ContentManagement
|
namespace OpenSim.Region.OptionalModules.ContentManagement
|
||||||
{
|
{
|
||||||
public class ContentManagementModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class ContentManagementModule : ISharedRegionModule
|
||||||
{
|
{
|
||||||
#region Static Fields
|
#region Static Fields
|
||||||
|
|
||||||
|
@ -60,22 +62,20 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
|
||||||
|
|
||||||
#region Fields
|
#region Fields
|
||||||
|
|
||||||
bool initialised = false;
|
private bool initialised = false;
|
||||||
CMController m_control = null;
|
private CMController m_control = null;
|
||||||
bool m_enabled = false;
|
private bool m_enabled = false;
|
||||||
CMModel m_model = null;
|
private CMModel m_model = null;
|
||||||
bool m_posted = false;
|
private bool m_posted = false;
|
||||||
CMView m_view = null;
|
private CMView m_view = null;
|
||||||
|
private string databaseDir = "./";
|
||||||
|
private string database = "FileSystemDatabase";
|
||||||
|
private int channel = 345;
|
||||||
|
|
||||||
#endregion Fields
|
#endregion Fields
|
||||||
|
|
||||||
#region Public Properties
|
#region Public Properties
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Name
|
public string Name
|
||||||
{
|
{
|
||||||
get { return "ContentManagementModule"; }
|
get { return "ContentManagementModule"; }
|
||||||
|
@ -89,11 +89,8 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
string databaseDir = "./";
|
|
||||||
string database = "FileSystemDatabase";
|
|
||||||
int channel = 345;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (source.Configs["CMS"] == null)
|
if (source.Configs["CMS"] == null)
|
||||||
|
@ -115,13 +112,15 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
|
||||||
m_log.ErrorFormat("[Content Management]: Exception thrown while reading parameters from configuration file. Message: " + e);
|
m_log.ErrorFormat("[Content Management]: Exception thrown while reading parameters from configuration file. Message: " + e);
|
||||||
m_enabled = false;
|
m_enabled = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
if (!m_enabled)
|
if (!m_enabled)
|
||||||
{
|
{
|
||||||
m_log.Info("[Content Management]: Content Management System is not Enabled.");
|
m_log.Info("[Content Management]: Content Management System is not Enabled.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lock (this)
|
lock (this)
|
||||||
{
|
{
|
||||||
if (!initialised) //only init once
|
if (!initialised) //only init once
|
||||||
|
@ -142,6 +141,18 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,6 +38,7 @@ using System.Security.Policy;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Microsoft.CSharp;
|
using Microsoft.CSharp;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -46,7 +47,8 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||||
{
|
{
|
||||||
public class MRMModule : IRegionModule, IMRMModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class MRMModule : INonSharedRegionModule, IMRMModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
|
@ -62,12 +64,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||||
|
|
||||||
private IConfig m_config;
|
private IConfig m_config;
|
||||||
|
|
||||||
|
private bool m_hidden = true;
|
||||||
|
|
||||||
public void RegisterExtension<T>(T instance)
|
public void RegisterExtension<T>(T instance)
|
||||||
{
|
{
|
||||||
m_extensions[typeof (T)] = instance;
|
m_extensions[typeof (T)] = instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
if (source.Configs["MRM"] != null)
|
if (source.Configs["MRM"] != null)
|
||||||
{
|
{
|
||||||
|
@ -76,19 +80,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||||
if (source.Configs["MRM"].GetBoolean("Enabled", false))
|
if (source.Configs["MRM"].GetBoolean("Enabled", false))
|
||||||
{
|
{
|
||||||
m_log.Info("[MRM] Enabling MRM Module");
|
m_log.Info("[MRM] Enabling MRM Module");
|
||||||
m_scene = scene;
|
|
||||||
|
|
||||||
// when hidden, we don't listen for client initiated script events
|
// when hidden, we don't listen for client initiated script events
|
||||||
// only making the MRM engine available for region modules
|
// only making the MRM engine available for region modules
|
||||||
if (!source.Configs["MRM"].GetBoolean("Hidden", false))
|
m_hidden = 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
|
else
|
||||||
{
|
{
|
||||||
|
@ -101,6 +96,39 @@ 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)
|
void EventManager_OnStopScript(uint localID, UUID itemID)
|
||||||
{
|
{
|
||||||
if (m_scripts.ContainsKey(itemID))
|
if (m_scripts.ContainsKey(itemID))
|
||||||
|
@ -302,11 +330,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||||
mmb.InitMiniModule(world, host, itemID);
|
mmb.InitMiniModule(world, host, itemID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
foreach (KeyValuePair<UUID, MRMBase> pair in m_scripts)
|
foreach (KeyValuePair<UUID, MRMBase> pair in m_scripts)
|
||||||
|
@ -320,11 +343,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||||
get { return "MiniRegionModule"; }
|
get { return "MiniRegionModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stolen from ScriptEngine Common
|
/// Stolen from ScriptEngine Common
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -100,10 +100,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
||||||
if (!m_enabled)
|
if (!m_enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue;
|
scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue;
|
||||||
m_scene.EventManager.OnOarFileLoaded -= OnOarFileLoaded;
|
scene.EventManager.OnOarFileLoaded -= OnOarFileLoaded;
|
||||||
|
|
||||||
m_scene = null;
|
scene = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
|
|
|
@ -58,6 +58,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.ScriptModuleComms
|
||||||
|
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
scene.UnregisterModuleInterface<IScriptModuleComms>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegionLoaded(Scene scene)
|
public void RegionLoaded(Scene scene)
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
|
||||||
|
@ -49,7 +50,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule
|
||||||
public string uri;
|
public string uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class XmlRpcGridRouter : IRegionModule, IXmlRpcRouter
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class XmlRpcGridRouter : INonSharedRegionModule, IXmlRpcRouter
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -59,7 +61,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule
|
||||||
private bool m_Enabled = false;
|
private bool m_Enabled = false;
|
||||||
private string m_ServerURI = String.Empty;
|
private string m_ServerURI = String.Empty;
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
IConfig startupConfig = config.Configs["Startup"];
|
IConfig startupConfig = config.Configs["Startup"];
|
||||||
if (startupConfig == null)
|
if (startupConfig == null)
|
||||||
|
@ -75,13 +77,26 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
scene.RegisterModuleInterface<IXmlRpcRouter>(this);
|
|
||||||
m_Enabled = true;
|
m_Enabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
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()
|
public void Close()
|
||||||
|
@ -93,11 +108,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule
|
||||||
get { return "XmlRpcGridRouterModule"; }
|
get { return "XmlRpcGridRouterModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri)
|
public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri)
|
||||||
{
|
{
|
||||||
if (!m_Channels.ContainsKey(itemID))
|
if (!m_Channels.ContainsKey(itemID))
|
||||||
|
|
|
@ -29,6 +29,7 @@ using System;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
|
||||||
|
@ -39,11 +40,12 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule
|
namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule
|
||||||
{
|
{
|
||||||
public class XmlRpcRouter : IRegionModule, IXmlRpcRouter
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class XmlRpcRouter : INonSharedRegionModule, IXmlRpcRouter
|
||||||
{
|
{
|
||||||
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
private bool m_enabled = false;
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
IConfig startupConfig = config.Configs["Startup"];
|
IConfig startupConfig = config.Configs["Startup"];
|
||||||
if (startupConfig == null)
|
if (startupConfig == null)
|
||||||
|
@ -51,13 +53,26 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule
|
||||||
|
|
||||||
if (startupConfig.GetString("XmlRpcRouterModule",
|
if (startupConfig.GetString("XmlRpcRouterModule",
|
||||||
"XmlRpcRouterModule") == "XmlRpcRouterModule")
|
"XmlRpcRouterModule") == "XmlRpcRouterModule")
|
||||||
|
{
|
||||||
|
m_enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
scene.RegisterModuleInterface<IXmlRpcRouter>(this);
|
scene.RegisterModuleInterface<IXmlRpcRouter>(this);
|
||||||
}
|
}
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void RemoveRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
scene.UnregisterModuleInterface<IXmlRpcRouter>(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
|
@ -69,11 +84,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule
|
||||||
get { return "XmlRpcRouterModule"; }
|
get { return "XmlRpcRouterModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri)
|
public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri)
|
||||||
{
|
{
|
||||||
scriptEngine.PostScriptEvent(itemID, "xmlrpc_uri", new Object[] {uri});
|
scriptEngine.PostScriptEvent(itemID, "xmlrpc_uri", new Object[] {uri});
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Freeswitch
|
||||||
private IConfigSource m_Config;
|
private IConfigSource m_Config;
|
||||||
bool m_Registered = false;
|
bool m_Registered = false;
|
||||||
|
|
||||||
#region IRegionModule interface
|
#region ISharedRegionModule interface
|
||||||
|
|
||||||
public void Initialise(IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,6 +31,7 @@ using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.CoreModules.World.Serialiser;
|
using OpenSim.Region.CoreModules.World.Serialiser;
|
||||||
|
@ -42,7 +43,8 @@ using Slash = System.IO.Path;
|
||||||
|
|
||||||
namespace OpenSim.Region.Modules.SvnSerialiser
|
namespace OpenSim.Region.Modules.SvnSerialiser
|
||||||
{
|
{
|
||||||
public class SvnBackupModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class SvnBackupModule : ISharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -200,9 +202,9 @@ namespace OpenSim.Region.Modules.SvnSerialiser
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
m_scenes = new List<Scene>();
|
m_scenes = new List<Scene>();
|
||||||
m_timer = new Timer();
|
m_timer = new Timer();
|
||||||
|
@ -225,7 +227,10 @@ namespace OpenSim.Region.Modules.SvnSerialiser
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
lock (m_scenes)
|
lock (m_scenes)
|
||||||
{
|
{
|
||||||
m_scenes.Add(scene);
|
m_scenes.Add(scene);
|
||||||
|
@ -236,6 +241,18 @@ namespace OpenSim.Region.Modules.SvnSerialiser
|
||||||
scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
|
scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
|
@ -277,11 +294,6 @@ namespace OpenSim.Region.Modules.SvnSerialiser
|
||||||
get { return "SvnBackupModule"; }
|
get { return "SvnBackupModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private void EventManager_OnPluginConsole(string[] args)
|
private void EventManager_OnPluginConsole(string[] args)
|
||||||
|
|
|
@ -25,9 +25,11 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
@ -37,7 +39,8 @@ using Timer=System.Timers.Timer;
|
||||||
|
|
||||||
namespace OpenSim.Region.OptionalModules.World.NPC
|
namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
{
|
{
|
||||||
public class NPCModule : IRegionModule, INPCModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class NPCModule : ISharedRegionModule, INPCModule
|
||||||
{
|
{
|
||||||
// private const bool m_enabled = false;
|
// private const bool m_enabled = false;
|
||||||
|
|
||||||
|
@ -134,15 +137,13 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
m_createMutex = new Mutex(false);
|
m_createMutex = new Mutex(false);
|
||||||
|
|
||||||
m_timer = new Timer(500);
|
m_timer = new Timer(500);
|
||||||
m_timer.Elapsed += m_timer_Elapsed;
|
m_timer.Elapsed += m_timer_Elapsed;
|
||||||
m_timer.Start();
|
m_timer.Start();
|
||||||
|
|
||||||
scene.RegisterModuleInterface<INPCModule>(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void m_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
void m_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||||
|
@ -173,6 +174,19 @@ 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()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -186,9 +200,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
get { return "NPCModule"; }
|
get { return "NPCModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
public Type ReplaceableInterface
|
||||||
{
|
{
|
||||||
get { return true; }
|
get { return null; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ using System.Reflection;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
|
using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
|
||||||
|
@ -46,7 +47,8 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Version 2.02 - Still hacky
|
/// Version 2.02 - Still hacky
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class TreePopulatorModule : IRegionModule, ICommandableModule, IVegetationModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
private readonly Commander m_commander = new Commander("tree");
|
private readonly Commander m_commander = new Commander("tree");
|
||||||
|
@ -168,15 +170,10 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region ISharedRegionModule Members
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
|
|
||||||
m_scene = scene;
|
|
||||||
m_scene.RegisterModuleInterface<IRegionModule>(this);
|
|
||||||
m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
|
|
||||||
|
|
||||||
// ini file settings
|
// ini file settings
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -196,12 +193,18 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
|
||||||
m_log.Debug("[TREES]: ini failure for update_rate - using default");
|
m_log.Debug("[TREES]: ini failure for update_rate - using default");
|
||||||
}
|
}
|
||||||
|
|
||||||
InstallCommands();
|
|
||||||
|
|
||||||
m_log.Debug("[TREES]: Initialised tree module");
|
m_log.Debug("[TREES]: Initialised tree module");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
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)
|
||||||
{
|
{
|
||||||
ReloadCopse();
|
ReloadCopse();
|
||||||
if (m_copse.Count > 0)
|
if (m_copse.Count > 0)
|
||||||
|
@ -211,6 +214,17 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
|
||||||
activeizeTreeze(true);
|
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()
|
public void Close()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -220,11 +234,6 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
|
||||||
get { return "TreePopulatorModule"; }
|
get { return "TreePopulatorModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
|
|
|
@ -923,9 +923,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
|
|
||||||
instance = null;
|
instance = null;
|
||||||
|
|
||||||
|
<<<<<<< HEAD:OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
|
||||||
ObjectRemoved handlerObjectRemoved = OnObjectRemoved;
|
ObjectRemoved handlerObjectRemoved = OnObjectRemoved;
|
||||||
if (handlerObjectRemoved != null)
|
if (handlerObjectRemoved != null)
|
||||||
handlerObjectRemoved(part.UUID);
|
handlerObjectRemoved(part.UUID);
|
||||||
|
=======
|
||||||
|
ObjectRemoved handlerObjectRemoved = OnObjectRemoved;
|
||||||
|
if (handlerObjectRemoved != null)
|
||||||
|
{
|
||||||
|
SceneObjectPart part = m_Scene.GetSceneObjectPart(localID);
|
||||||
|
handlerObjectRemoved(part.UUID);
|
||||||
|
}
|
||||||
|
>>>>>>> master:OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
|
||||||
|
|
||||||
CleanAssemblies();
|
CleanAssemblies();
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
|
@ -52,7 +53,8 @@ using OSDMap = OpenMetaverse.StructuredData.OSDMap;
|
||||||
|
|
||||||
namespace OpenSim.Region.UserStatistics
|
namespace OpenSim.Region.UserStatistics
|
||||||
{
|
{
|
||||||
public class WebStatsModule : IRegionModule
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class WebStatsModule : ISharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log =
|
private static readonly ILog m_log =
|
||||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
@ -70,7 +72,7 @@ namespace OpenSim.Region.UserStatistics
|
||||||
private string m_loglines = String.Empty;
|
private string m_loglines = String.Empty;
|
||||||
private volatile int lastHit = 12000;
|
private volatile int lastHit = 12000;
|
||||||
|
|
||||||
public virtual void Initialise(Scene scene, IConfigSource config)
|
public virtual void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
IConfig cnfg;
|
IConfig cnfg;
|
||||||
try
|
try
|
||||||
|
@ -82,12 +84,18 @@ namespace OpenSim.Region.UserStatistics
|
||||||
{
|
{
|
||||||
enabled = false;
|
enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!enabled)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Type ReplaceableInterface
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
|
if (!enabled)
|
||||||
|
return;
|
||||||
|
|
||||||
lock (m_scene)
|
lock (m_scene)
|
||||||
{
|
{
|
||||||
if (m_scene.Count == 0)
|
if (m_scene.Count == 0)
|
||||||
|
@ -140,6 +148,14 @@ namespace OpenSim.Region.UserStatistics
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public void ReceiveClassicSimStatsPacket(SimStats stats)
|
public void ReceiveClassicSimStatsPacket(SimStats stats)
|
||||||
{
|
{
|
||||||
if (!enabled)
|
if (!enabled)
|
||||||
|
@ -308,11 +324,6 @@ namespace OpenSim.Region.UserStatistics
|
||||||
get { return "ViewerStatsModule"; }
|
get { return "ViewerStatsModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnRegisterCaps(UUID agentID, Caps caps)
|
public void OnRegisterCaps(UUID agentID, Caps caps)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[VC]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
|
m_log.DebugFormat("[VC]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
|
||||||
|
|
|
@ -162,9 +162,10 @@ namespace OpenSim.Tests.Common.Setup
|
||||||
testScene.AddRegionModule(capsModule.Name, capsModule);
|
testScene.AddRegionModule(capsModule.Name, capsModule);
|
||||||
capsModule.AddRegion(testScene);
|
capsModule.AddRegion(testScene);
|
||||||
|
|
||||||
IRegionModule godsModule = new GodsModule();
|
INonSharedRegionModule godsModule = new GodsModule();
|
||||||
godsModule.Initialise(testScene, new IniConfigSource());
|
godsModule.Initialise(new IniConfigSource());
|
||||||
testScene.AddModule(godsModule.Name, godsModule);
|
testScene.AddRegionModule(godsModule.Name, godsModule);
|
||||||
|
godsModule.AddRegion(testScene);
|
||||||
realServices = realServices.ToLower();
|
realServices = realServices.ToLower();
|
||||||
// IConfigSource config = new IniConfigSource();
|
// IConfigSource config = new IniConfigSource();
|
||||||
|
|
||||||
|
|
|
@ -2272,6 +2272,7 @@
|
||||||
<Reference name="OpenMetaverseTypes.dll"/>
|
<Reference name="OpenMetaverseTypes.dll"/>
|
||||||
<Reference name="OpenMetaverse.dll"/>
|
<Reference name="OpenMetaverse.dll"/>
|
||||||
<Reference name="Nini.dll" />
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="Mono.Addins" />
|
||||||
<Reference name="log4net.dll" />
|
<Reference name="log4net.dll" />
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
@ -2332,6 +2333,7 @@
|
||||||
<Reference name="log4net.dll"/>
|
<Reference name="log4net.dll"/>
|
||||||
<Reference name="protobuf-net"/>
|
<Reference name="protobuf-net"/>
|
||||||
<Reference name="MXP.dll"/>
|
<Reference name="MXP.dll"/>
|
||||||
|
<Reference name="Mono.Addins"/>
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -2842,6 +2844,7 @@
|
||||||
<Reference name="OpenSim.Framework.Statistics"/>
|
<Reference name="OpenSim.Framework.Statistics"/>
|
||||||
<Reference name="OpenSim.Region.Physics.Manager"/>
|
<Reference name="OpenSim.Region.Physics.Manager"/>
|
||||||
<Reference name="Mono.Data.SqliteClient"/>
|
<Reference name="Mono.Data.SqliteClient"/>
|
||||||
|
<Reference name="Mono.Addins"/>
|
||||||
|
|
||||||
<!-- For scripting in funny languages by default -->
|
<!-- For scripting in funny languages by default -->
|
||||||
<Reference name="Microsoft.JScript"/>
|
<Reference name="Microsoft.JScript"/>
|
||||||
|
@ -3301,6 +3304,7 @@
|
||||||
<Match path="Agent/TextureSender/Tests" pattern="*.cs" recurse="true" />
|
<Match path="Agent/TextureSender/Tests" pattern="*.cs" recurse="true" />
|
||||||
<Match path="Avatar/Inventory/Archiver/Tests" pattern="*.cs" recurse="true" />
|
<Match path="Avatar/Inventory/Archiver/Tests" pattern="*.cs" recurse="true" />
|
||||||
<Match path="World/Archiver/Tests" pattern="*.cs" recurse="true" />
|
<Match path="World/Archiver/Tests" pattern="*.cs" recurse="true" />
|
||||||
|
<Match path="World/Archiver/Tests/Resources" pattern="*" buildAction="EmbeddedResource"/>
|
||||||
<Match path="World/Serialiser/Tests" pattern="*.cs" recurse="true" />
|
<Match path="World/Serialiser/Tests" pattern="*.cs" recurse="true" />
|
||||||
<Match path="World/Terrain/Tests" pattern="*.cs" recurse="true" />
|
<Match path="World/Terrain/Tests" pattern="*.cs" recurse="true" />
|
||||||
<Match path="ServiceConnectorsOut/Grid/Tests" pattern="*.cs" recurse="true" />
|
<Match path="ServiceConnectorsOut/Grid/Tests" pattern="*.cs" recurse="true" />
|
||||||
|
|
Loading…
Reference in New Issue