aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorDiva Canto2012-11-09 22:21:11 -0800
committerDiva Canto2012-11-09 22:21:11 -0800
commit86b22604fa5d6b27421d87b6fb04baf01ed74ca5 (patch)
tree44610029dbfe8b9c80da3d6240b2ddd4593e06f9 /OpenSim/Region
parentOne more module converted: TreePopulator. (diff)
downloadopensim-SC-86b22604fa5d6b27421d87b6fb04baf01ed74ca5.zip
opensim-SC-86b22604fa5d6b27421d87b6fb04baf01ed74ca5.tar.gz
opensim-SC-86b22604fa5d6b27421d87b6fb04baf01ed74ca5.tar.bz2
opensim-SC-86b22604fa5d6b27421d87b6fb04baf01ed74ca5.tar.xz
One more more converted: IPBanModule.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs24
-rw-r--r--OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml1
2 files changed, 19 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs
index 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
37namespace OpenSim.Region.CoreModules.Agent.IPBan 37namespace 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/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
index 14dc22a..5a413a9 100644
--- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
+++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
@@ -42,6 +42,7 @@
42 <RegionModule id="WindModule" type="OpenSim.Region.CoreModules.WindModule"/> 42 <RegionModule id="WindModule" type="OpenSim.Region.CoreModules.WindModule"/>
43 <RegionModule id="MapSearchModule" type="OpenSim.Region.CoreModules.World.WorldMap.MapSearchModule"/> 43 <RegionModule id="MapSearchModule" type="OpenSim.Region.CoreModules.World.WorldMap.MapSearchModule"/>
44 <RegionModule id="VegetationModule" type="OpenSim.Region.CoreModules.Avatar.Vegetation.VegetationModule"/> 44 <RegionModule id="VegetationModule" type="OpenSim.Region.CoreModules.Avatar.Vegetation.VegetationModule"/>
45 <RegionModule id="IPBanModule" type="OpenSim.Region.CoreModules.Agent.IPBan.IPBanModule"/>
45 <!-- Service connectors OUT modules --> 46 <!-- Service connectors OUT modules -->
46 <RegionModule id="LocalAssetServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.LocalAssetServicesConnector" /> 47 <RegionModule id="LocalAssetServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.LocalAssetServicesConnector" />
47 <RegionModule id="RemoteAssetServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.RemoteAssetServicesConnector" /> 48 <RegionModule id="RemoteAssetServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.RemoteAssetServicesConnector" />