mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 12:25:42 +08:00
* 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:
@@ -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);
|
||||
|
||||
20
OpenSim/Framework/RegionBanListItem.cs
Normal file
20
OpenSim/Framework/RegionBanListItem.cs
Normal 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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user