diff options
author | Melanie | 2012-11-11 16:31:01 +0000 |
---|---|---|
committer | Melanie | 2012-11-11 16:31:01 +0000 |
commit | 389077345f9fc78fddcaa39e29daa532a32815d6 (patch) | |
tree | a455d88d93ac5fe984ebf5342276ca1ddc831442 /OpenSim/Region/CoreModules/Agent | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Deleted 2 obsolete modules: OGSRadmin and OpenGridProtocol. They were still I... (diff) | |
download | opensim-SC_OLD-389077345f9fc78fddcaa39e29daa532a32815d6.zip opensim-SC_OLD-389077345f9fc78fddcaa39e29daa532a32815d6.tar.gz opensim-SC_OLD-389077345f9fc78fddcaa39e29daa532a32815d6.tar.bz2 opensim-SC_OLD-389077345f9fc78fddcaa39e29daa532a32815d6.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent')
3 files changed, 74 insertions, 25 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs index bfe2a71..1749dcf 100644 --- a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs +++ b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs | |||
@@ -36,13 +36,17 @@ using OpenSim.Region.Framework.Scenes; | |||
36 | 36 | ||
37 | namespace OpenSim.Region.CoreModules.Agent.IPBan | 37 | namespace OpenSim.Region.CoreModules.Agent.IPBan |
38 | { | 38 | { |
39 | public class IPBanModule : IRegionModule | 39 | public class IPBanModule : ISharedRegionModule |
40 | { | 40 | { |
41 | #region Implementation of IRegionModule | 41 | #region Implementation of ISharedRegionModule |
42 | 42 | ||
43 | private List<string> m_bans = new List<string>(); | 43 | private List<string> m_bans = new List<string>(); |
44 | 44 | ||
45 | public void Initialise(Scene scene, IConfigSource source) | 45 | public void Initialise(IConfigSource source) |
46 | { | ||
47 | } | ||
48 | |||
49 | public void AddRegion(Scene scene) | ||
46 | { | 50 | { |
47 | new SceneBanner(scene, m_bans); | 51 | new SceneBanner(scene, m_bans); |
48 | 52 | ||
@@ -50,7 +54,7 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan | |||
50 | { | 54 | { |
51 | foreach (EstateBan ban in scene.RegionInfo.EstateSettings.EstateBans) | 55 | foreach (EstateBan ban in scene.RegionInfo.EstateSettings.EstateBans) |
52 | { | 56 | { |
53 | if (!String.IsNullOrEmpty(ban.BannedHostIPMask)) | 57 | if (!String.IsNullOrEmpty(ban.BannedHostIPMask)) |
54 | m_bans.Add(ban.BannedHostIPMask); | 58 | m_bans.Add(ban.BannedHostIPMask); |
55 | if (!String.IsNullOrEmpty(ban.BannedHostNameMask)) | 59 | if (!String.IsNullOrEmpty(ban.BannedHostNameMask)) |
56 | m_bans.Add(ban.BannedHostNameMask); | 60 | m_bans.Add(ban.BannedHostNameMask); |
@@ -58,6 +62,14 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan | |||
58 | } | 62 | } |
59 | } | 63 | } |
60 | 64 | ||
65 | public void RemoveRegion(Scene scene) | ||
66 | { | ||
67 | } | ||
68 | |||
69 | public void RegionLoaded(Scene scene) | ||
70 | { | ||
71 | } | ||
72 | |||
61 | public void PostInitialise() | 73 | public void PostInitialise() |
62 | { | 74 | { |
63 | if (File.Exists("bans.txt")) | 75 | if (File.Exists("bans.txt")) |
@@ -80,9 +92,9 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan | |||
80 | get { return "IPBanModule"; } | 92 | get { return "IPBanModule"; } |
81 | } | 93 | } |
82 | 94 | ||
83 | public bool IsSharedModule | 95 | public Type ReplaceableInterface |
84 | { | 96 | { |
85 | get { return true; } | 97 | get { return null; } |
86 | } | 98 | } |
87 | 99 | ||
88 | #endregion | 100 | #endregion |
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index a1a2501..2879154 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs | |||
@@ -45,7 +45,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
45 | { | 45 | { |
46 | public delegate void J2KDecodeDelegate(UUID assetID); | 46 | public delegate void J2KDecodeDelegate(UUID assetID); |
47 | 47 | ||
48 | public class J2KDecoderModule : IRegionModule, IJ2KDecoder | 48 | public class J2KDecoderModule : ISharedRegionModule, IJ2KDecoder |
49 | { | 49 | { |
50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
51 | 51 | ||
@@ -56,26 +56,21 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
56 | /// <summary>Cache that will store decoded JPEG2000 layer boundary data</summary> | 56 | /// <summary>Cache that will store decoded JPEG2000 layer boundary data</summary> |
57 | private IImprovedAssetCache m_cache; | 57 | private IImprovedAssetCache m_cache; |
58 | /// <summary>Reference to a scene (doesn't matter which one as long as it can load the cache module)</summary> | 58 | /// <summary>Reference to a scene (doesn't matter which one as long as it can load the cache module)</summary> |
59 | private UUID m_CreatorID = UUID.Zero; | ||
59 | private Scene m_scene; | 60 | private Scene m_scene; |
60 | 61 | ||
61 | #region IRegionModule | 62 | #region ISharedRegionModule |
62 | 63 | ||
63 | private bool m_useCSJ2K = true; | 64 | private bool m_useCSJ2K = true; |
64 | 65 | ||
65 | public string Name { get { return "J2KDecoderModule"; } } | 66 | public string Name { get { return "J2KDecoderModule"; } } |
66 | public bool IsSharedModule { get { return true; } } | ||
67 | 67 | ||
68 | public J2KDecoderModule() | 68 | public J2KDecoderModule() |
69 | { | 69 | { |
70 | } | 70 | } |
71 | 71 | ||
72 | public void Initialise(Scene scene, IConfigSource source) | 72 | public void Initialise(IConfigSource source) |
73 | { | 73 | { |
74 | if (m_scene == null) | ||
75 | m_scene = scene; | ||
76 | |||
77 | scene.RegisterModuleInterface<IJ2KDecoder>(this); | ||
78 | |||
79 | IConfig startupConfig = source.Configs["Startup"]; | 74 | IConfig startupConfig = source.Configs["Startup"]; |
80 | if (startupConfig != null) | 75 | if (startupConfig != null) |
81 | { | 76 | { |
@@ -83,6 +78,24 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
83 | } | 78 | } |
84 | } | 79 | } |
85 | 80 | ||
81 | public void AddRegion(Scene scene) | ||
82 | { | ||
83 | if (m_scene == null) | ||
84 | { | ||
85 | m_scene = scene; | ||
86 | m_CreatorID = scene.RegionInfo.RegionID; | ||
87 | } | ||
88 | |||
89 | scene.RegisterModuleInterface<IJ2KDecoder>(this); | ||
90 | |||
91 | } | ||
92 | |||
93 | public void RemoveRegion(Scene scene) | ||
94 | { | ||
95 | if (m_scene == scene) | ||
96 | m_scene = null; | ||
97 | } | ||
98 | |||
86 | public void PostInitialise() | 99 | public void PostInitialise() |
87 | { | 100 | { |
88 | m_cache = m_scene.RequestModuleInterface<IImprovedAssetCache>(); | 101 | m_cache = m_scene.RequestModuleInterface<IImprovedAssetCache>(); |
@@ -92,6 +105,15 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
92 | { | 105 | { |
93 | } | 106 | } |
94 | 107 | ||
108 | public void RegionLoaded(Scene scene) | ||
109 | { | ||
110 | } | ||
111 | |||
112 | public Type ReplaceableInterface | ||
113 | { | ||
114 | get { return null; } | ||
115 | } | ||
116 | |||
95 | #endregion IRegionModule | 117 | #endregion IRegionModule |
96 | 118 | ||
97 | #region IJ2KDecoder | 119 | #region IJ2KDecoder |
@@ -279,7 +301,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
279 | { | 301 | { |
280 | string assetID = "j2kCache_" + AssetId.ToString(); | 302 | string assetID = "j2kCache_" + AssetId.ToString(); |
281 | 303 | ||
282 | AssetBase layerDecodeAsset = new AssetBase(assetID, assetID, (sbyte)AssetType.Notecard, m_scene.RegionInfo.RegionID.ToString()); | 304 | AssetBase layerDecodeAsset = new AssetBase(assetID, assetID, (sbyte)AssetType.Notecard, m_CreatorID.ToString()); |
283 | layerDecodeAsset.Local = true; | 305 | layerDecodeAsset.Local = true; |
284 | layerDecodeAsset.Temporary = true; | 306 | layerDecodeAsset.Temporary = true; |
285 | 307 | ||
diff --git a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs index 78d597d..8237faf 100644 --- a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs +++ b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs | |||
@@ -35,9 +35,12 @@ using OpenSim.Framework; | |||
35 | using OpenSim.Region.Framework.Interfaces; | 35 | using OpenSim.Region.Framework.Interfaces; |
36 | using OpenSim.Region.Framework.Scenes; | 36 | using OpenSim.Region.Framework.Scenes; |
37 | 37 | ||
38 | using Mono.Addins; | ||
39 | |||
38 | namespace OpenSim.Region.CoreModules.Agent.Xfer | 40 | namespace OpenSim.Region.CoreModules.Agent.Xfer |
39 | { | 41 | { |
40 | public class XferModule : IRegionModule, IXfer | 42 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
43 | public class XferModule : INonSharedRegionModule, IXfer | ||
41 | { | 44 | { |
42 | private Scene m_scene; | 45 | private Scene m_scene; |
43 | private Dictionary<string, FileData> NewFiles = new Dictionary<string, FileData>(); | 46 | private Dictionary<string, FileData> NewFiles = new Dictionary<string, FileData>(); |
@@ -59,9 +62,13 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer | |||
59 | public int Count; | 62 | public int Count; |
60 | } | 63 | } |
61 | 64 | ||
62 | #region IRegionModule Members | 65 | #region INonSharedRegionModule Members |
66 | |||
67 | public void Initialise(IConfigSource config) | ||
68 | { | ||
69 | } | ||
63 | 70 | ||
64 | public void Initialise(Scene scene, IConfigSource config) | 71 | public void AddRegion(Scene scene) |
65 | { | 72 | { |
66 | m_scene = scene; | 73 | m_scene = scene; |
67 | m_scene.EventManager.OnNewClient += NewClient; | 74 | m_scene.EventManager.OnNewClient += NewClient; |
@@ -69,22 +76,30 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer | |||
69 | m_scene.RegisterModuleInterface<IXfer>(this); | 76 | m_scene.RegisterModuleInterface<IXfer>(this); |
70 | } | 77 | } |
71 | 78 | ||
72 | public void PostInitialise() | 79 | public void RemoveRegion(Scene scene) |
73 | { | 80 | { |
81 | m_scene.EventManager.OnNewClient -= NewClient; | ||
82 | |||
83 | m_scene.UnregisterModuleInterface<IXfer>(this); | ||
84 | m_scene = null; | ||
74 | } | 85 | } |
75 | 86 | ||
76 | public void Close() | 87 | public void RegionLoaded(Scene scene) |
77 | { | 88 | { |
78 | } | 89 | } |
79 | 90 | ||
80 | public string Name | 91 | public Type ReplaceableInterface |
81 | { | 92 | { |
82 | get { return "XferModule"; } | 93 | get { return null; } |
83 | } | 94 | } |
84 | 95 | ||
85 | public bool IsSharedModule | 96 | public void Close() |
86 | { | 97 | { |
87 | get { return false; } | 98 | } |
99 | |||
100 | public string Name | ||
101 | { | ||
102 | get { return "XferModule"; } | ||
88 | } | 103 | } |
89 | 104 | ||
90 | #endregion | 105 | #endregion |