diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/EstateBan.cs | 85 | ||||
-rw-r--r-- | OpenSim/Framework/EstateSettings.cs | 6 |
2 files changed, 83 insertions, 8 deletions
diff --git a/OpenSim/Framework/EstateBan.cs b/OpenSim/Framework/EstateBan.cs index 5c3aa42..64d32e8 100644 --- a/OpenSim/Framework/EstateBan.cs +++ b/OpenSim/Framework/EstateBan.cs | |||
@@ -31,10 +31,85 @@ namespace OpenSim.Framework | |||
31 | { | 31 | { |
32 | public class EstateBan | 32 | public class EstateBan |
33 | { | 33 | { |
34 | public uint estateID = 1; | 34 | private uint m_estateID = 1; |
35 | public UUID bannedUUID = UUID.Zero; | 35 | /// <summary> |
36 | public string bannedIP = string.Empty; | 36 | /// ID of the estate this ban limits access to. |
37 | public string bannedIPHostMask = string.Empty; | 37 | /// </summary> |
38 | public string bannedNameMask = string.Empty; | 38 | public uint EstateID |
39 | { | ||
40 | get | ||
41 | { | ||
42 | return m_estateID; | ||
43 | } | ||
44 | set | ||
45 | { | ||
46 | m_estateID = value; | ||
47 | } | ||
48 | } | ||
49 | |||
50 | private UUID m_bannedUserID = UUID.Zero; | ||
51 | /// <summary> | ||
52 | /// ID of the banned user. | ||
53 | /// </summary> | ||
54 | public UUID BannedUserID | ||
55 | { | ||
56 | get | ||
57 | { | ||
58 | return m_bannedUserID; | ||
59 | } | ||
60 | set | ||
61 | { | ||
62 | m_bannedUserID = value; | ||
63 | } | ||
64 | } | ||
65 | |||
66 | private string m_bannedHostAddress = string.Empty; | ||
67 | /// <summary> | ||
68 | /// IP address or domain name of the banned client. | ||
69 | /// </summary> | ||
70 | public string BannedHostAddress | ||
71 | { | ||
72 | get | ||
73 | { | ||
74 | return m_bannedHostAddress; | ||
75 | } | ||
76 | set | ||
77 | { | ||
78 | m_bannedHostAddress = value; | ||
79 | } | ||
80 | } | ||
81 | |||
82 | private string m_bannedHostIPMask = string.Empty; | ||
83 | /// <summary> | ||
84 | /// IP address mask for banning group of client hosts. | ||
85 | /// </summary> | ||
86 | public string BannedHostIPMask | ||
87 | { | ||
88 | get | ||
89 | { | ||
90 | return m_bannedHostIPMask; | ||
91 | } | ||
92 | set | ||
93 | { | ||
94 | m_bannedHostIPMask = value; | ||
95 | } | ||
96 | } | ||
97 | |||
98 | private string m_bannedHostNameMask = string.Empty; | ||
99 | /// <summary> | ||
100 | /// Domain name mask for banning group of client hosts. | ||
101 | /// </summary> | ||
102 | public string BannedHostNameMask | ||
103 | { | ||
104 | get | ||
105 | { | ||
106 | return m_bannedHostNameMask; | ||
107 | } | ||
108 | set | ||
109 | { | ||
110 | m_bannedHostNameMask = value; | ||
111 | } | ||
112 | } | ||
113 | |||
39 | } | 114 | } |
40 | } | 115 | } |
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index 81f85cd..b84d1d7 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs | |||
@@ -333,7 +333,7 @@ namespace OpenSim.Framework | |||
333 | public bool IsBanned(UUID avatarID) | 333 | public bool IsBanned(UUID avatarID) |
334 | { | 334 | { |
335 | foreach (EstateBan ban in l_EstateBans) | 335 | foreach (EstateBan ban in l_EstateBans) |
336 | if (ban.bannedUUID == avatarID) | 336 | if (ban.BannedUserID == avatarID) |
337 | return true; | 337 | return true; |
338 | return false; | 338 | return false; |
339 | } | 339 | } |
@@ -342,7 +342,7 @@ namespace OpenSim.Framework | |||
342 | { | 342 | { |
343 | if (ban == null) | 343 | if (ban == null) |
344 | return; | 344 | return; |
345 | if (!IsBanned(ban.bannedUUID)) | 345 | if (!IsBanned(ban.BannedUserID)) |
346 | l_EstateBans.Add(ban); | 346 | l_EstateBans.Add(ban); |
347 | } | 347 | } |
348 | 348 | ||
@@ -354,7 +354,7 @@ namespace OpenSim.Framework | |||
354 | public void RemoveBan(UUID avatarID) | 354 | public void RemoveBan(UUID avatarID) |
355 | { | 355 | { |
356 | foreach (EstateBan ban in new List<EstateBan>(l_EstateBans)) | 356 | foreach (EstateBan ban in new List<EstateBan>(l_EstateBans)) |
357 | if (ban.bannedUUID == avatarID) | 357 | if (ban.BannedUserID == avatarID) |
358 | l_EstateBans.Remove(ban); | 358 | l_EstateBans.Remove(ban); |
359 | } | 359 | } |
360 | 360 | ||