mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 13:15:44 +08:00
Restructure god level and permissions
Create a class GodController which controls all aspects of god level, viewer modes and user levels at ScenePresence level.
This commit is contained in:
@@ -1977,7 +1977,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
ScenePresence SP;
|
||||
((Scene)client.Scene).TryGetScenePresence(client.AgentId, out SP);
|
||||
List<SceneObjectGroup> returns = new List<SceneObjectGroup>();
|
||||
if (SP.UserLevel != 0)
|
||||
if (SP.GodController.UserLevel != 0)
|
||||
{
|
||||
if (flags == 0) //All parcels, scripted or not
|
||||
{
|
||||
@@ -2043,7 +2043,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
((Scene)client.Scene).TryGetScenePresence(client.AgentId, out parcelManager);
|
||||
System.Threading.Timer Timer;
|
||||
|
||||
if (targetAvatar.UserLevel == 0)
|
||||
if (targetAvatar.GodController.UserLevel == 0)
|
||||
{
|
||||
ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y);
|
||||
if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze, true))
|
||||
|
||||
@@ -547,7 +547,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
{
|
||||
ScenePresence sp = m_scene.GetScenePresence(user);
|
||||
if (sp != null)
|
||||
return (sp.UserLevel >= 200);
|
||||
return (sp.GodController.UserLevel >= 200);
|
||||
|
||||
UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, user);
|
||||
if (account != null)
|
||||
|
||||
Reference in New Issue
Block a user