aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Agent/IPBan
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/CoreModules/Agent/IPBan
parentOne more module converted: TreePopulator. (diff)
downloadopensim-SC_OLD-86b22604fa5d6b27421d87b6fb04baf01ed74ca5.zip
opensim-SC_OLD-86b22604fa5d6b27421d87b6fb04baf01ed74ca5.tar.gz
opensim-SC_OLD-86b22604fa5d6b27421d87b6fb04baf01ed74ca5.tar.bz2
opensim-SC_OLD-86b22604fa5d6b27421d87b6fb04baf01ed74ca5.tar.xz
One more more converted: IPBanModule.
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent/IPBan')
-rw-r--r--OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs24
1 files changed, 18 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