* 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.
This commit is contained in:
Teravus Ovares
2008-06-21 03:29:08 +00:00
parent 17fd6cf661
commit a5860ad438
18 changed files with 557 additions and 17 deletions

View File

@@ -970,6 +970,9 @@ namespace OpenSim.Framework
void sendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID);
void sendBannedUserList(LLUUID invoice, List<RegionBanListItem> banlist, uint estateID);
void sendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args);
void sendEstateCovenantInformation();
void sendDetailedEstateData(LLUUID invoice,string estateName, uint estateID);

View File

@@ -0,0 +1,20 @@
using libsecondlife;
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenSim.Framework
{
public class RegionBanListItem
{
public LLUUID regionUUID = LLUUID.Zero;
public LLUUID bannedUUID = LLUUID.Zero;
public string bannedIP = string.Empty;
public string bannedIPHostMask = string.Empty;
public RegionBanListItem()
{
}
}
}

View File

@@ -26,6 +26,7 @@
*/
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using System.Xml;
@@ -210,6 +211,7 @@ namespace OpenSim.Framework
public LLUUID lastMapUUID = LLUUID.Zero;
public string lastMapRefresh = "0";
public List<RegionBanListItem> regionBanlist = new List<RegionBanListItem>();
// Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
@@ -346,6 +348,28 @@ namespace OpenSim.Framework
configMember.performConfigurationRetrieve();
}
public bool CheckIfUserBanned(LLUUID user)
{
RegionBanListItem[] bl = regionBanlist.ToArray();
bool banned = false;
for (int i = 0; i < bl.Length; i++)
{
if (bl[i] == null)
continue;
if (bl[i].bannedUUID == user)
{
banned = true;
break;
}
}
return banned;
}
public void loadConfigurationOptionsFromMe()
{
configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID_NULL_FREE,