From ce9c2ecac8aa41e5ff22203e5436a4596c14b370 Mon Sep 17 00:00:00 2001
From: Teravus Ovares
Date: Fri, 14 Mar 2008 15:52:32 +0000
Subject: * You can leave godmode if you want now. * Fixed a compile error.
---
OpenSim/Framework/IClientAPI.cs | 2 +-
OpenSim/Region/ClientStack/ClientView.cs | 3 ++-
OpenSim/Region/Environment/Scenes/InnerScene.cs | 2 +-
OpenSim/Region/Environment/Scenes/Scene.cs | 5 +++--
OpenSim/Region/Environment/Scenes/ScenePresence.cs | 14 ++++++++++++--
5 files changed, 19 insertions(+), 7 deletions(-)
(limited to 'OpenSim')
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
public delegate void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, byte RayEndIsIntersection);
- public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, IClientAPI remote_client);
+ public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, bool GodLike, IClientAPI remote_client);
public delegate void GodKickUser(
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
RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack;
RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock;
LLUUID token = rblock.Token;
+
RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData;
handlerReqGodlikePowers = OnRequestGodlikePowers;
if (handlerReqGodlikePowers != null)
{
- handlerReqGodlikePowers(ablock.AgentID, ablock.SessionID, token, this);
+ handlerReqGodlikePowers(ablock.AgentID, ablock.SessionID, token, rblock.Godlike, this);
}
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
}
catch (Exception e)
{
- m_log.ErrorFormat("[INNER SCENE]: Failed to update {0}, {1} - {2}", entity.Name, entity.m_uuid, e);
+ m_log.ErrorFormat("[INNER SCENE]: Failed to update {0}, - {1}", entity.Name, e);//entity.m_uuid
}
}
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
///
///
///
- public void handleRequestGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token,
+ public void handleRequestGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token, bool godLike,
IClientAPI controllingClient)
{
// First check that this is the sim owner
@@ -2102,7 +2102,8 @@ namespace OpenSim.Region.Environment.Scenes
{
if (sessionID == controllingClient.SessionId)
{
- m_scenePresences[agentID].GrantGodlikePowers(agentID, testSessionID, token);
+ //m_log.Info("godlike: " + godLike.ToString());
+ m_scenePresences[agentID].GrantGodlikePowers(agentID, testSessionID, token, godLike);
}
}
}
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
/// This allows the Sim owner the abiility to kick users from their sim currently.
/// It tells the client that the agent has permission to do so.
///
- public void GrantGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token)
+ public void GrantGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token, bool godStatus)
{
GrantGodlikePowersPacket respondPacket = new GrantGodlikePowersPacket();
GrantGodlikePowersPacket.GrantDataBlock gdb = new GrantGodlikePowersPacket.GrantDataBlock();
@@ -1640,7 +1640,17 @@ namespace OpenSim.Region.Environment.Scenes
adb.AgentID = agentID;
adb.SessionID = sessionID; // More security
- gdb.GodLevel = (byte) 250;
+ if (godStatus)
+ {
+ gdb.GodLevel = (byte)250;
+ m_godlevel = 250;
+ }
+ else
+ {
+ gdb.GodLevel = (byte)0;
+ m_godlevel = 0;
+ }
+
gdb.Token = token;
//respondPacket.AgentData = (GrantGodlikePowersPacket.AgentDataBlock)ablock;
respondPacket.GrantData = gdb;
--
cgit v1.1