diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs | 86 |
1 files changed, 85 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs index 147e4aa..b6d2ab4 100644 --- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs | |||
@@ -51,6 +51,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
51 | { | 51 | { |
52 | remote_client.sendDetailedEstateData(invoice,m_scene.RegionInfo.EstateSettings.estateName,m_scene.RegionInfo.EstateSettings.estateID); | 52 | remote_client.sendDetailedEstateData(invoice,m_scene.RegionInfo.EstateSettings.estateName,m_scene.RegionInfo.EstateSettings.estateID); |
53 | remote_client.sendEstateManagersList(invoice,m_scene.RegionInfo.EstateSettings.estateManagers,m_scene.RegionInfo.EstateSettings.estateID); | 53 | remote_client.sendEstateManagersList(invoice,m_scene.RegionInfo.EstateSettings.estateManagers,m_scene.RegionInfo.EstateSettings.estateID); |
54 | remote_client.sendBannedUserList(invoice, m_scene.RegionInfo.regionBanlist, m_scene.RegionInfo.EstateSettings.estateID); | ||
54 | } | 55 | } |
55 | 56 | ||
56 | private void estateSetRegionInfoHandler(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, | 57 | private void estateSetRegionInfoHandler(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, |
@@ -206,6 +207,89 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
206 | 207 | ||
207 | switch (estateAccessType) | 208 | switch (estateAccessType) |
208 | { | 209 | { |
210 | case 64: | ||
211 | if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remote_client.AgentId) || m_scene.ExternalChecks.ExternalChecksBypassPermissions()) | ||
212 | { | ||
213 | RegionBanListItem[] banlistcheck = m_scene.RegionInfo.regionBanlist.ToArray(); | ||
214 | |||
215 | bool alreadyInList = false; | ||
216 | |||
217 | for (int i = 0; i < banlistcheck.Length; i++) | ||
218 | { | ||
219 | if (user == banlistcheck[i].bannedUUID) | ||
220 | { | ||
221 | alreadyInList = true; | ||
222 | break; | ||
223 | } | ||
224 | |||
225 | } | ||
226 | if (!alreadyInList) | ||
227 | { | ||
228 | |||
229 | RegionBanListItem item = new RegionBanListItem(); | ||
230 | |||
231 | item.bannedUUID = user; | ||
232 | item.regionUUID = m_scene.RegionInfo.RegionID; | ||
233 | item.bannedIP = "0.0.0.0"; | ||
234 | item.bannedIPHostMask = "0.0.0.0"; | ||
235 | |||
236 | m_scene.RegionInfo.regionBanlist.Add(item); | ||
237 | m_scene.AddToRegionBanlist(item); | ||
238 | |||
239 | ScenePresence s = m_scene.GetScenePresence(user); | ||
240 | if (s != null) | ||
241 | { | ||
242 | m_scene.TeleportClientHome(user, s.ControllingClient); | ||
243 | } | ||
244 | |||
245 | } | ||
246 | else | ||
247 | { | ||
248 | remote_client.SendAlertMessage("User is already on the region ban list"); | ||
249 | } | ||
250 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); | ||
251 | remote_client.sendBannedUserList(invoice, m_scene.RegionInfo.regionBanlist, m_scene.RegionInfo.EstateSettings.estateID); | ||
252 | } | ||
253 | else | ||
254 | { | ||
255 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
256 | } | ||
257 | break; | ||
258 | case 128: | ||
259 | if (m_scene.ExternalChecks.ExternalChecksCanIssueEstateCommand(remote_client.AgentId) || m_scene.ExternalChecks.ExternalChecksBypassPermissions()) | ||
260 | { | ||
261 | RegionBanListItem[] banlistcheck = m_scene.RegionInfo.regionBanlist.ToArray(); | ||
262 | |||
263 | bool alreadyInList = false; | ||
264 | RegionBanListItem listitem = null; | ||
265 | |||
266 | for (int i = 0; i < banlistcheck.Length; i++) | ||
267 | { | ||
268 | if (user == banlistcheck[i].bannedUUID) | ||
269 | { | ||
270 | alreadyInList = true; | ||
271 | listitem = banlistcheck[i]; | ||
272 | break; | ||
273 | } | ||
274 | |||
275 | } | ||
276 | if (alreadyInList && listitem != null) | ||
277 | { | ||
278 | m_scene.RegionInfo.regionBanlist.Remove(listitem); | ||
279 | m_scene.RemoveFromRegionBanlist(listitem); | ||
280 | } | ||
281 | else | ||
282 | { | ||
283 | remote_client.SendAlertMessage("User is not on the region ban list"); | ||
284 | } | ||
285 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); | ||
286 | remote_client.sendBannedUserList(invoice, m_scene.RegionInfo.regionBanlist, m_scene.RegionInfo.EstateSettings.estateID); | ||
287 | } | ||
288 | else | ||
289 | { | ||
290 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
291 | } | ||
292 | break; | ||
209 | case 256: | 293 | case 256: |
210 | 294 | ||
211 | // This needs to be updated for SuperEstateOwnerUser.. a non existing user in the estatesettings.xml | 295 | // This needs to be updated for SuperEstateOwnerUser.. a non existing user in the estatesettings.xml |
@@ -237,7 +321,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
237 | 321 | ||
238 | default: | 322 | default: |
239 | 323 | ||
240 | m_log.Error("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta"); | 324 | m_log.ErrorFormat("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta: {0}", estateAccessType.ToString()); |
241 | break; | 325 | break; |
242 | } | 326 | } |
243 | } | 327 | } |