mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 19:36:07 +08:00
* Hanling RequestGodlikePowers. On Request.. sends the sim owner's client the appropriate messages to make it think it's got god status. Will be used for finding more unimplemented packets....
This commit is contained in:
@@ -830,6 +830,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
new ParcelObjectOwnerRequest(m_LandManager.handleParcelObjectOwnersRequest);
|
||||
|
||||
client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage);
|
||||
client.OnRequestGodlikePowers += handleRequestGodlikePowers;
|
||||
|
||||
client.OnCreateNewInventoryItem += CreateNewInventoryItem;
|
||||
client.OnCreateNewInventoryFolder += CommsManager.UserProfileCache.HandleCreateInventoryFolder;
|
||||
@@ -1177,6 +1178,37 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
public void handleRequestGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token, IClientAPI controllingclient)
|
||||
{
|
||||
// First check that this is the sim owner
|
||||
|
||||
if (agentID == RegionInfo.MasterAvatarAssignedUUID)
|
||||
{
|
||||
|
||||
// User needs to be logged into this sim
|
||||
if (m_scenePresences.ContainsKey(agentID))
|
||||
{
|
||||
// Next we check for spoofing.....
|
||||
LLUUID testSessionID = m_scenePresences[agentID].ControllingClient.SessionId;
|
||||
if (sessionID == testSessionID)
|
||||
{
|
||||
if (sessionID == controllingclient.SessionId)
|
||||
{
|
||||
m_scenePresences[agentID].GrantGodlikePowers(agentID, testSessionID, token);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_scenePresences[agentID].ControllingClient.SendAgentAlertMessage("Request for god powers denied", false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void SendAlertToUser(string firstName, string lastName, string message, bool modal)
|
||||
{
|
||||
foreach (ScenePresence presence in m_scenePresences.Values)
|
||||
|
||||
@@ -1232,6 +1232,25 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
kupack.UserInfo.Reason = Helpers.StringToField(message);
|
||||
ControllingClient.OutPacket(kupack, ThrottleOutPacketType.Task);
|
||||
|
||||
}
|
||||
public void GrantGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token)
|
||||
{
|
||||
GrantGodlikePowersPacket respondPacket = new GrantGodlikePowersPacket();
|
||||
GrantGodlikePowersPacket.GrantDataBlock gdb = new GrantGodlikePowersPacket.GrantDataBlock();
|
||||
GrantGodlikePowersPacket.AgentDataBlock adb = new GrantGodlikePowersPacket.AgentDataBlock();
|
||||
|
||||
adb.AgentID = agentID;
|
||||
adb.SessionID = sessionID; // More security
|
||||
|
||||
gdb.GodLevel = (byte)100;
|
||||
gdb.Token = token;
|
||||
//respondPacket.AgentData = (GrantGodlikePowersPacket.AgentDataBlock)ablock;
|
||||
respondPacket.GrantData = gdb;
|
||||
respondPacket.AgentData = adb;
|
||||
ControllingClient.OutPacket(respondPacket, ThrottleOutPacketType.Task);
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user