* You can leave godmode if you want now.

* Fixed a compile error.
0.6.0-stable
Teravus Ovares 2008-03-14 15:52:32 +00:00
parent 24aedf52c6
commit ce9c2ecac8
5 changed files with 19 additions and 7 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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();

View File

@ -2087,7 +2087,7 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="sessionID"></param>
/// <param name="token"></param>
/// <param name="controllingClient"></param>
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);
}
}
}

View File

@ -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.
/// </summary>
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;