diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs index bfe2a71..4b457b1 100644 --- a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs +++ b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.IO; | 30 | using System.IO; |
31 | using System.Text; | 31 | using System.Text; |
32 | using Mono.Addins; | ||
32 | using Nini.Config; | 33 | using Nini.Config; |
33 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
34 | using OpenSim.Region.Framework.Interfaces; | 35 | using OpenSim.Region.Framework.Interfaces; |
@@ -36,13 +37,18 @@ using OpenSim.Region.Framework.Scenes; | |||
36 | 37 | ||
37 | namespace OpenSim.Region.CoreModules.Agent.IPBan | 38 | namespace OpenSim.Region.CoreModules.Agent.IPBan |
38 | { | 39 | { |
39 | public class IPBanModule : IRegionModule | 40 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "IPBanModule")] |
41 | public class IPBanModule : ISharedRegionModule | ||
40 | { | 42 | { |
41 | #region Implementation of IRegionModule | 43 | #region Implementation of ISharedRegionModule |
42 | 44 | ||
43 | private List<string> m_bans = new List<string>(); | 45 | private List<string> m_bans = new List<string>(); |
44 | 46 | ||
45 | public void Initialise(Scene scene, IConfigSource source) | 47 | public void Initialise(IConfigSource source) |
48 | { | ||
49 | } | ||
50 | |||
51 | public void AddRegion(Scene scene) | ||
46 | { | 52 | { |
47 | new SceneBanner(scene, m_bans); | 53 | new SceneBanner(scene, m_bans); |
48 | 54 | ||
@@ -50,7 +56,7 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan | |||
50 | { | 56 | { |
51 | foreach (EstateBan ban in scene.RegionInfo.EstateSettings.EstateBans) | 57 | foreach (EstateBan ban in scene.RegionInfo.EstateSettings.EstateBans) |
52 | { | 58 | { |
53 | if (!String.IsNullOrEmpty(ban.BannedHostIPMask)) | 59 | if (!String.IsNullOrEmpty(ban.BannedHostIPMask)) |
54 | m_bans.Add(ban.BannedHostIPMask); | 60 | m_bans.Add(ban.BannedHostIPMask); |
55 | if (!String.IsNullOrEmpty(ban.BannedHostNameMask)) | 61 | if (!String.IsNullOrEmpty(ban.BannedHostNameMask)) |
56 | m_bans.Add(ban.BannedHostNameMask); | 62 | m_bans.Add(ban.BannedHostNameMask); |
@@ -58,6 +64,14 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan | |||
58 | } | 64 | } |
59 | } | 65 | } |
60 | 66 | ||
67 | public void RemoveRegion(Scene scene) | ||
68 | { | ||
69 | } | ||
70 | |||
71 | public void RegionLoaded(Scene scene) | ||
72 | { | ||
73 | } | ||
74 | |||
61 | public void PostInitialise() | 75 | public void PostInitialise() |
62 | { | 76 | { |
63 | if (File.Exists("bans.txt")) | 77 | if (File.Exists("bans.txt")) |
@@ -80,9 +94,9 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan | |||
80 | get { return "IPBanModule"; } | 94 | get { return "IPBanModule"; } |
81 | } | 95 | } |
82 | 96 | ||
83 | public bool IsSharedModule | 97 | public Type ReplaceableInterface |
84 | { | 98 | { |
85 | get { return true; } | 99 | get { return null; } |
86 | } | 100 | } |
87 | 101 | ||
88 | #endregion | 102 | #endregion |