aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/RegionInfo.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-06-21 03:29:08 +0000
committerTeravus Ovares2008-06-21 03:29:08 +0000
commita5860ad438885cbf76a36dc7958947355522b8cf (patch)
treeb392682ca7bf79e7fae18c16271980a9eead28bf /OpenSim/Framework/RegionInfo.cs
parentlots of futzing with nhibernate to make it more efficient. I (diff)
downloadopensim-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 '')
-rw-r--r--OpenSim/Framework/RegionInfo.cs24
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
28using System; 28using System;
29using System.Collections.Generic;
29using System.Net; 30using System.Net;
30using System.Net.Sockets; 31using System.Net.Sockets;
31using System.Xml; 32using 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,