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/Framework/RegionInfo.cs | |
parent | lots of futzing with nhibernate to make it more efficient. I (diff) | |
download | opensim-SC-a5860ad438885cbf76a36dc7958947355522b8cf.zip opensim-SC-a5860ad438885cbf76a36dc7958947355522b8cf.tar.gz opensim-SC-a5860ad438885cbf76a36dc7958947355522b8cf.tar.bz2 opensim-SC-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 'OpenSim/Framework/RegionInfo.cs')
-rw-r--r-- | OpenSim/Framework/RegionInfo.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 979ced5..f10f25d 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
29 | using System.Net; | 30 | using System.Net; |
30 | using System.Net.Sockets; | 31 | using System.Net.Sockets; |
31 | using System.Xml; | 32 | using System.Xml; |
@@ -210,6 +211,7 @@ namespace OpenSim.Framework | |||
210 | 211 | ||
211 | public LLUUID lastMapUUID = LLUUID.Zero; | 212 | public LLUUID lastMapUUID = LLUUID.Zero; |
212 | public string lastMapRefresh = "0"; | 213 | public string lastMapRefresh = "0"; |
214 | public List<RegionBanListItem> regionBanlist = new List<RegionBanListItem>(); | ||
213 | 215 | ||
214 | // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. | 216 | // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. |
215 | 217 | ||
@@ -346,6 +348,28 @@ namespace OpenSim.Framework | |||
346 | configMember.performConfigurationRetrieve(); | 348 | configMember.performConfigurationRetrieve(); |
347 | } | 349 | } |
348 | 350 | ||
351 | public bool CheckIfUserBanned(LLUUID user) | ||
352 | { | ||
353 | |||
354 | RegionBanListItem[] bl = regionBanlist.ToArray(); | ||
355 | |||
356 | bool banned = false; | ||
357 | |||
358 | for (int i = 0; i < bl.Length; i++) | ||
359 | { | ||
360 | if (bl[i] == null) | ||
361 | continue; | ||
362 | |||
363 | if (bl[i].bannedUUID == user) | ||
364 | { | ||
365 | banned = true; | ||
366 | break; | ||
367 | } | ||
368 | } | ||
369 | |||
370 | return banned; | ||
371 | } | ||
372 | |||
349 | public void loadConfigurationOptionsFromMe() | 373 | public void loadConfigurationOptionsFromMe() |
350 | { | 374 | { |
351 | configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID_NULL_FREE, | 375 | configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID_NULL_FREE, |