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 | |
parent | a few changes to estates port handling (diff) | |
download | opensim-SC_OLD-cbc3501246d5250788634f6d1b6fbd1f60661c85.zip opensim-SC_OLD-cbc3501246d5250788634f6d1b6fbd1f60661c85.tar.gz opensim-SC_OLD-cbc3501246d5250788634f6d1b6fbd1f60661c85.tar.bz2 opensim-SC_OLD-cbc3501246d5250788634f6d1b6fbd1f60661c85.tar.xz |
a few changes to Gods ( ie administrators) control
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IGodsModule.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 36 |
2 files changed, 15 insertions, 26 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IGodsModule.cs b/OpenSim/Region/Framework/Interfaces/IGodsModule.cs index 552ce01..1cb9a30 100644 --- a/OpenSim/Region/Framework/Interfaces/IGodsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IGodsModule.cs | |||
@@ -43,16 +43,15 @@ namespace OpenSim.Region.Framework.Interfaces | |||
43 | /// <param name="token"></param> | 43 | /// <param name="token"></param> |
44 | /// <param name="godLike"></param> | 44 | /// <param name="godLike"></param> |
45 | /// <param name="controllingClient"></param> | 45 | /// <param name="controllingClient"></param> |
46 | void RequestGodlikePowers(UUID agentID, UUID sessionID, UUID token, bool godLike, IClientAPI controllingClient); | 46 | void RequestGodlikePowers(UUID agentID, UUID sessionID, UUID token, bool godLike); |
47 | 47 | ||
48 | /// <summary> | 48 | /// <summary> |
49 | /// Kicks User specified from the simulator. This logs them off of the grid. | 49 | /// Kicks User specified from the simulator. This logs them off of the grid. |
50 | /// </summary> | 50 | /// </summary> |
51 | /// <param name="godID">The person doing the kicking</param> | 51 | /// <param name="godID">The person doing the kicking</param> |
52 | /// <param name="sessionID">The session of the person doing the kicking</param> | ||
53 | /// <param name="agentID">the person that is being kicked</param> | 52 | /// <param name="agentID">the person that is being kicked</param> |
54 | /// <param name="kickflags">This isn't used apparently</param> | 53 | /// <param name="kickflags">This isn't used apparently</param> |
55 | /// <param name="reason">The message to send to the user after it's been turned into a field</param> | 54 | /// <param name="reason">The message to send to the user after it's been turned into a field</param> |
56 | void KickUser(UUID godID, UUID sessionID, UUID agentID, uint kickflags, byte[] reason); | 55 | void KickUser(UUID godID, UUID agentID, uint kickflags, byte[] reason); |
57 | } | 56 | } |
58 | } | 57 | } |
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 | /* |