diff options
author | UbitUmarov | 2017-01-05 18:02:59 +0000 |
---|---|---|
committer | UbitUmarov | 2017-01-05 18:02:59 +0000 |
commit | cbc3501246d5250788634f6d1b6fbd1f60661c85 (patch) | |
tree | 5983ff6f4c0ce5bce469c6b1257b9b60069cf79f /OpenSim/Region/Framework/Scenes | |
parent | a few changes to estates port handling (diff) | |
download | opensim-SC-cbc3501246d5250788634f6d1b6fbd1f60661c85.zip opensim-SC-cbc3501246d5250788634f6d1b6fbd1f60661c85.tar.gz opensim-SC-cbc3501246d5250788634f6d1b6fbd1f60661c85.tar.bz2 opensim-SC-cbc3501246d5250788634f6d1b6fbd1f60661c85.tar.xz |
a few changes to Gods ( ie administrators) control
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f906d9f..c1b1a63 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -4506,34 +4506,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
4506 | #endregion | 4506 | #endregion |
4507 | 4507 | ||
4508 | /// <summary> | 4508 | /// <summary> |
4509 | /// This allows the Sim owner the abiility to kick users from their sim currently. | 4509 | /// handle god level requests. |
4510 | /// It tells the client that the agent has permission to do so. | ||
4511 | /// </summary> | 4510 | /// </summary> |
4512 | public void GrantGodlikePowers(UUID agentID, UUID sessionID, UUID token, bool godStatus) | 4511 | public void GrantGodlikePowers(UUID token, bool godStatus) |
4513 | { | 4512 | { |
4514 | int oldgodlevel = GodLevel; | 4513 | int oldgodlevel = GodLevel; |
4515 | 4514 | ||
4516 | if (godStatus) | 4515 | if (godStatus && !isNPC && m_scene.Permissions.IsGod(UUID)) |
4517 | { | 4516 | { |
4518 | // For now, assign god level 200 to anyone | 4517 | GodLevel = 200; |
4519 | // who is granted god powers, but has no god level set. | 4518 | if(GodLevel < UserLevel) |
4520 | // | 4519 | GodLevel = UserLevel; |
4521 | UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, agentID); | ||
4522 | if (account != null) | ||
4523 | { | ||
4524 | if (account.UserLevel > 0) | ||
4525 | GodLevel = account.UserLevel; | ||
4526 | else | ||
4527 | GodLevel = 200; | ||
4528 | } | ||
4529 | } | 4520 | } |
4530 | else | 4521 | else |
4531 | { | 4522 | GodLevel = 0; |
4532 | GodLevel = 0; | ||
4533 | } | ||
4534 | 4523 | ||
4535 | ControllingClient.SendAdminResponse(token, (uint)GodLevel); | 4524 | ControllingClient.SendAdminResponse(token, (uint)GodLevel); |
4536 | |||
4537 | if(oldgodlevel != GodLevel) | 4525 | if(oldgodlevel != GodLevel) |
4538 | parcelGodCheck(m_currentParcelUUID, GodLevel >= 200); | 4526 | parcelGodCheck(m_currentParcelUUID, GodLevel >= 200); |
4539 | } | 4527 | } |
@@ -4640,7 +4628,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4640 | cAgent.BodyRotation = Rotation; | 4628 | cAgent.BodyRotation = Rotation; |
4641 | cAgent.ControlFlags = (uint)m_AgentControlFlags; | 4629 | cAgent.ControlFlags = (uint)m_AgentControlFlags; |
4642 | 4630 | ||
4643 | if (m_scene.Permissions.IsGod(new UUID(cAgent.AgentID))) | 4631 | if (GodLevel > 200 && m_scene.Permissions.IsGod(cAgent.AgentID)) |
4644 | cAgent.GodLevel = (byte)GodLevel; | 4632 | cAgent.GodLevel = (byte)GodLevel; |
4645 | else | 4633 | else |
4646 | cAgent.GodLevel = (byte) 0; | 4634 | cAgent.GodLevel = (byte) 0; |
@@ -4741,10 +4729,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
4741 | Rotation = cAgent.BodyRotation; | 4729 | Rotation = cAgent.BodyRotation; |
4742 | m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags; | 4730 | m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags; |
4743 | 4731 | ||
4744 | if (m_scene.Permissions.IsGod(new UUID(cAgent.AgentID))) | 4732 | if (cAgent.GodLevel >200 && m_scene.Permissions.IsGod(cAgent.AgentID)) |
4745 | GodLevel = cAgent.GodLevel; | 4733 | GodLevel = cAgent.GodLevel; |
4746 | SetAlwaysRun = cAgent.AlwaysRun; | 4734 | else |
4735 | GodLevel = 0; | ||
4747 | 4736 | ||
4737 | SetAlwaysRun = cAgent.AlwaysRun; | ||
4748 | 4738 | ||
4749 | Appearance = new AvatarAppearance(cAgent.Appearance); | 4739 | Appearance = new AvatarAppearance(cAgent.Appearance); |
4750 | /* | 4740 | /* |