diff options
author | Teravus Ovares | 2008-03-14 15:52:32 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-03-14 15:52:32 +0000 |
commit | ce9c2ecac8aa41e5ff22203e5436a4596c14b370 (patch) | |
tree | a5833be8fa9b8838413616649403bccb076d1775 /OpenSim | |
parent | * Added null root part guard (diff) | |
download | opensim-SC_OLD-ce9c2ecac8aa41e5ff22203e5436a4596c14b370.zip opensim-SC_OLD-ce9c2ecac8aa41e5ff22203e5436a4596c14b370.tar.gz opensim-SC_OLD-ce9c2ecac8aa41e5ff22203e5436a4596c14b370.tar.bz2 opensim-SC_OLD-ce9c2ecac8aa41e5ff22203e5436a4596c14b370.tar.xz |
* You can leave godmode if you want now.
* Fixed a compile error.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/InnerScene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 14 |
5 files changed, 19 insertions, 7 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index d30e005..e6ccfda 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -347,7 +347,7 @@ namespace OpenSim.Framework | |||
347 | 347 | ||
348 | public delegate void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, byte RayEndIsIntersection); | 348 | public delegate void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, byte RayEndIsIntersection); |
349 | 349 | ||
350 | public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, IClientAPI remote_client); | 350 | public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, bool GodLike, IClientAPI remote_client); |
351 | 351 | ||
352 | public delegate void GodKickUser( | 352 | public delegate void GodKickUser( |
353 | LLUUID GodAgentID, LLUUID GodSessionID, LLUUID AgentID, uint kickflags, byte[] reason); | 353 | LLUUID GodAgentID, LLUUID GodSessionID, LLUUID AgentID, uint kickflags, byte[] reason); |
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index c5ce43c..14f9dc0 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -4256,13 +4256,14 @@ namespace OpenSim.Region.ClientStack | |||
4256 | RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; | 4256 | RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; |
4257 | RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock; | 4257 | RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock; |
4258 | LLUUID token = rblock.Token; | 4258 | LLUUID token = rblock.Token; |
4259 | |||
4259 | RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData; | 4260 | RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData; |
4260 | 4261 | ||
4261 | handlerReqGodlikePowers = OnRequestGodlikePowers; | 4262 | handlerReqGodlikePowers = OnRequestGodlikePowers; |
4262 | 4263 | ||
4263 | if (handlerReqGodlikePowers != null) | 4264 | if (handlerReqGodlikePowers != null) |
4264 | { | 4265 | { |
4265 | handlerReqGodlikePowers(ablock.AgentID, ablock.SessionID, token, this); | 4266 | handlerReqGodlikePowers(ablock.AgentID, ablock.SessionID, token, rblock.Godlike, this); |
4266 | } | 4267 | } |
4267 | 4268 | ||
4268 | break; | 4269 | break; |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index c75ca81..5d99f22 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -241,7 +241,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
241 | } | 241 | } |
242 | catch (Exception e) | 242 | catch (Exception e) |
243 | { | 243 | { |
244 | m_log.ErrorFormat("[INNER SCENE]: Failed to update {0}, {1} - {2}", entity.Name, entity.m_uuid, e); | 244 | m_log.ErrorFormat("[INNER SCENE]: Failed to update {0}, - {1}", entity.Name, e);//entity.m_uuid |
245 | } | 245 | } |
246 | } | 246 | } |
247 | m_updateList.Clear(); | 247 | m_updateList.Clear(); |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 58c32a4..7c1faa3 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -2087,7 +2087,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2087 | /// <param name="sessionID"></param> | 2087 | /// <param name="sessionID"></param> |
2088 | /// <param name="token"></param> | 2088 | /// <param name="token"></param> |
2089 | /// <param name="controllingClient"></param> | 2089 | /// <param name="controllingClient"></param> |
2090 | public void handleRequestGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token, | 2090 | public void handleRequestGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token, bool godLike, |
2091 | IClientAPI controllingClient) | 2091 | IClientAPI controllingClient) |
2092 | { | 2092 | { |
2093 | // First check that this is the sim owner | 2093 | // First check that this is the sim owner |
@@ -2102,7 +2102,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
2102 | { | 2102 | { |
2103 | if (sessionID == controllingClient.SessionId) | 2103 | if (sessionID == controllingClient.SessionId) |
2104 | { | 2104 | { |
2105 | m_scenePresences[agentID].GrantGodlikePowers(agentID, testSessionID, token); | 2105 | //m_log.Info("godlike: " + godLike.ToString()); |
2106 | m_scenePresences[agentID].GrantGodlikePowers(agentID, testSessionID, token, godLike); | ||
2106 | } | 2107 | } |
2107 | } | 2108 | } |
2108 | } | 2109 | } |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 1731cd9..fb0e836 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -1631,7 +1631,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1631 | /// This allows the Sim owner the abiility to kick users from their sim currently. | 1631 | /// This allows the Sim owner the abiility to kick users from their sim currently. |
1632 | /// It tells the client that the agent has permission to do so. | 1632 | /// It tells the client that the agent has permission to do so. |
1633 | /// </summary> | 1633 | /// </summary> |
1634 | public void GrantGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token) | 1634 | public void GrantGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token, bool godStatus) |
1635 | { | 1635 | { |
1636 | GrantGodlikePowersPacket respondPacket = new GrantGodlikePowersPacket(); | 1636 | GrantGodlikePowersPacket respondPacket = new GrantGodlikePowersPacket(); |
1637 | GrantGodlikePowersPacket.GrantDataBlock gdb = new GrantGodlikePowersPacket.GrantDataBlock(); | 1637 | GrantGodlikePowersPacket.GrantDataBlock gdb = new GrantGodlikePowersPacket.GrantDataBlock(); |
@@ -1640,7 +1640,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
1640 | adb.AgentID = agentID; | 1640 | adb.AgentID = agentID; |
1641 | adb.SessionID = sessionID; // More security | 1641 | adb.SessionID = sessionID; // More security |
1642 | 1642 | ||
1643 | gdb.GodLevel = (byte) 250; | 1643 | if (godStatus) |
1644 | { | ||
1645 | gdb.GodLevel = (byte)250; | ||
1646 | m_godlevel = 250; | ||
1647 | } | ||
1648 | else | ||
1649 | { | ||
1650 | gdb.GodLevel = (byte)0; | ||
1651 | m_godlevel = 0; | ||
1652 | } | ||
1653 | |||
1644 | gdb.Token = token; | 1654 | gdb.Token = token; |
1645 | //respondPacket.AgentData = (GrantGodlikePowersPacket.AgentDataBlock)ablock; | 1655 | //respondPacket.AgentData = (GrantGodlikePowersPacket.AgentDataBlock)ablock; |
1646 | respondPacket.GrantData = gdb; | 1656 | respondPacket.GrantData = gdb; |