diff options
author | Teravus Ovares | 2008-06-21 03:29:08 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-06-21 03:29:08 +0000 |
commit | a5860ad438885cbf76a36dc7958947355522b8cf (patch) | |
tree | b392682ca7bf79e7fae18c16271980a9eead28bf /OpenSim/Region/Environment/Modules/World | |
parent | lots of futzing with nhibernate to make it more efficient. I (diff) | |
download | opensim-SC_OLD-a5860ad438885cbf76a36dc7958947355522b8cf.zip opensim-SC_OLD-a5860ad438885cbf76a36dc7958947355522b8cf.tar.gz opensim-SC_OLD-a5860ad438885cbf76a36dc7958947355522b8cf.tar.bz2 opensim-SC_OLD-a5860ad438885cbf76a36dc7958947355522b8cf.tar.xz |
* Adds Region ban capability to Regions. You access this by going to World->Region/Estate. Then on the Estate tab, at the lower right hand corner, clicking the 'Add' button and picking an avatar.
* It only persists across reboots for the mySQL datastore currently.
* Currently have stubs in the other datastores.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs | 86 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | 5 |
2 files changed, 90 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 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index a242ebe..50403b9 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | |||
@@ -743,6 +743,11 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
743 | public void sendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID) | 743 | public void sendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID) |
744 | { | 744 | { |
745 | } | 745 | } |
746 | |||
747 | public void sendBannedUserList(LLUUID invoice, List<RegionBanListItem> banlist, uint estateID) | ||
748 | { | ||
749 | } | ||
750 | |||
746 | public void sendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) | 751 | public void sendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) |
747 | { | 752 | { |
748 | } | 753 | } |